---
title: "API overview"
url: "https://blogautopost.com/docs/api.md"
canonical_url: "https://blogautopost.com/docs/api"
last_updated: "2026-11-24"
type: "reference"
summary: "The BlogAutoPost REST API: how keys, rate limits and errors work, and every route grouped by what it does, with its method and path."
---

# API overview

> **For AI agents:** the complete index of BlogAutoPost pages is [llms.txt](https://blogautopost.com/llms.txt). Every page is also served as markdown at its URL plus .md.

The BlogAutoPost REST API: how keys, rate limits and errors work, and every route grouped by what it does, with its method and path.

> **Machine-readable docs.** This site publishes `/llms.txt` with a short guide for agents and `/docs/errors.md` with the error list.

## How the API is built

- A REST API that returns JSON.
- Every answer is JSON, and every failure uses one error format. See [Errors and failure codes](https://blogautopost.com/docs/errors.md).
- Paths are under `/v1`. Request and response fields use snake_case.

## API keys

Send an API key with each request, as `Authorization: Bearer <key>` or in an `X-API-Key` header. Keys are stored hashed, so a stolen database does not reveal them. Each key has its own rate limit, and a request over the limit is refused with a `rate_limited` error. API access is set up for your account on request: email hello@blogautopost.com and a person creates the key and revokes it when you ask. The full key is shown once when it is created.

API access is part of every plan.

## Routes

Routes marked public take no API key. The sample-article request is limited to a few requests an hour per address.

Lists come one page at a time. Every list route takes `limit` (20 when left out, at most 100) and `cursor`, and answers `next_cursor`: send it back as `cursor` to get the next page, with the same filters. It is `null` on the last page. A list that is ordered by something that can change while you read (the keyword list follows each keyword's priority) is not a snapshot: a row can be skipped or seen twice if it moves between two page requests.

| Group | Routes | What you can do |
| --- | --- | --- |
| Plans | `GET /v1/plans` (public) | List plans and prices. |
| Account | `GET /v1/account`, `GET /v1/usage` | Read the account, its keys and sites, and count articles by kind for a date range. |
| Sites | `GET` and `POST /v1/sites`, `GET` and `PATCH /v1/sites/{siteId}` | Add a website, list sites, change name, niche, writing style, the schedule switch and the publishing mode. |
| Connection | `POST` and `DELETE /v1/sites/{siteId}/connection` | Connect WordPress, Shopify, Webflow or a signed webhook with credentials that are checked first and stored encrypted, or disconnect and turn the schedule off. |
| Allowance | `GET /v1/sites/{siteId}/allowance` | Scheduled articles used and left, and manual credits available, for the current period. |
| Keywords | `GET` and `POST /v1/sites/{siteId}/keywords`, `PATCH /v1/sites/{siteId}/keywords/{keywordId}`, `GET .../keywords/opportunities`, `GET .../keywords/paid-weak-organic`, `POST .../keywords/research`, `POST .../keywords/volumes`, `POST .../keywords/competitor-gap` | List, add, select or drop keywords, see the topics your Search Console data ranks, list the search terms you pay Google Ads for that your site does not rank for, research from a seed and add volumes with your own Google Ads Keyword Planner, and run competitor gap analysis (topics from a competitor's public sitemap) on a plan that includes it. |
| Ideas | `GET` and `POST /v1/sites/{siteId}/ideas` | List article ideas and ask for more. |
| Articles | `GET` and `POST /v1/sites/{siteId}/articles`, `GET` and `PATCH /v1/articles/{articleId}`, `POST /v1/articles/{articleId}/approve`, `.../reject`, `.../publish` | List by status, start one now with a manual credit (the call answers 202 with the draft, and `GET /v1/articles/{articleId}` shows it until it is waiting for approval or failed), read one, edit, approve, reject, and publish an approved post. |
| Search Console | `GET /v1/sites/{siteId}/search-console/authorize`, `POST .../search-console`, `POST .../search-console/sync`, `GET .../rankings` | Start and finish the Google connection, pull the latest queries, and read rankings. |
| Google Ads | `GET /v1/sites/{siteId}/google-ads/authorize`, `POST` and `DELETE .../google-ads` | Optionally connect your own Google Ads account for Keyword Planner volumes, or forget the connection. |
| Billing | `GET /v1/sites/{siteId}/billing`, `POST .../start-plan` | Read the site plan and its invoices, and start the plan now after a trial. To start a trial or a plan or change payment details, write to hello@blogautopost.com; to cancel, use the [Billing page](https://blogautopost.com/billing). See [Billing and credits](https://blogautopost.com/docs/billing-and-credits.md). |
| Sample article | `POST /v1/public/demo-article`, `POST /v1/public/demo/confirm` (public) | Request a sample by email, then confirm it with the button on the page the link opens. The sample is written only after confirmation: the call answers 202 at once, and the same call again with the same token says whether the sample is still being written, sent or failed. |

## Rules the API enforces

Plan limits and feature gates are enforced by the API, not by the interface. For example, custom writing style and competitor gap work only on a plan that includes them, writing length must be between 300 and 3,000 words, and the auto-publish daily cap must be between 1 and 5. An article that would go past the plan allowance or the daily ceiling is refused with `plan_limit`, and a manual article without a credit left is refused with `insufficient_credits`.

## Background job

There are no scheduled HTTP routes to call. The scheduler pass runs every 15 minutes on its own. It writes each automated site's share of the period, publishes for sites that opted in up to their daily cap, and recovers interrupted drafts and publishes.

## Outside services

An operation that depends on an outside service (the writing model, cover images, Google Ads Keyword Planner, email sending, Google) answers with a 503 `provider_unavailable` when that service cannot be used right now, rather than inventing a result. See [Errors and failure codes](https://blogautopost.com/docs/errors.md).
