# Content

> Topics, outlines and articles through the API, the approval workflow, and how to pull approved articles into your own CMS.

Web page: https://www.gotopeach.com/docs/api-content (updated 2026-11-03)

> **In short.** Content goes topic, outline, article. Generate or add topics, write an outline for an approved topic, then write the article for an approved outline as a background job. Approved articles come out with Markdown, HTML and JSON-LD for any CMS.

All paths are relative to `https://app.gotopeach.com/api/v1`.

## Topics

| Endpoint | What it does | Credits | Key permission |
|---|---|---|---|
| `GET /sites/{domain}/topics` | Article topics for the site. MCP: `list_topics`. | Free | `content` |
| `POST /sites/{domain}/topics` | Add a topic by hand (approved, ready for an outline). | Free | `content` + `write` |
| `POST /sites/{domain}/topics/generate` | Generate this month's topics from the site's latest analysis (a background job). Runs as a background job: answers 202 with a job. | 10 | `content` + `write` + `spend` |
| `PATCH /sites/{domain}/topics` | Approve, reject or reset many topics at once (up to 200). | Free | `content` + `write` |
| `PATCH /topics/{id}` | Approve, reject or edit a topic. | Free | `content` + `write` |
| `POST /topics/{id}/outline` | Write an outline for an approved topic. MCP: `generate_outline`. | 10 | `content` + `write` + `spend` |

- Topics come from the site's latest analysis, so a site needs one first: otherwise `409 no_analysis`. See [Full analyses](https://www.gotopeach.com/docs/api-sites-and-analyses.md#full-analyses).
- **Generate** makes this month's topics as a background job. If the month already has topics, they come back and the credits are refunded, as they are if the batch comes out empty. Send `force: true` for another batch. An optional `brief` steers them: `primaryKeyword`, `niche`, `secondaryKeywords`, `tone` and more.
- **Add one by hand** with a `title`, and optionally `reasoning`, `targetQuery` (the buyer question it answers), `format` (`general`, `how_to` or `listicle`) and `funnelStage` (`tofu` for buyers learning about the problem, `mofu` for buyers comparing options). It is approved straight away.
- **Approve or reject** one topic with `PATCH /topics/{id}`, or up to 200 at once with `PATCH /sites/{domain}/topics` and their `ids`.
- **Outline.** `POST /topics/{id}/outline` writes the outline for an approved topic. If the topic already has one, it comes back and the credits are refunded.

## Outlines and articles

| Endpoint | What it does | Credits | Key permission |
|---|---|---|---|
| `GET /sites/{domain}/outlines` | The site's outlines. MCP: `list_outlines`. | Free | `content` |
| `GET /outlines/{id}` | An outline, its topic, and its article if written. MCP: `get_outline`. | Free | `content` |
| `PATCH /outlines/{id}` | Edit an outline's H1, sections, target keyword or angle. | Free | `content` + `write` |
| `POST /outlines/{id}/approve` | Approve an outline so its article can be written. MCP: `approve_outline`. | Free | `content` + `write` |
| `POST /outlines/{id}/article` | Write the article for an approved outline (1 to 3 minutes; a background job). Runs as a background job: answers 202 with a job. MCP: `write_article`. | 90 | `content` + `write` + `spend` |

- Edit an outline's `h1`, sections (`outline_json`), `target_keyword` or `angle`, then approve it.
- **Writing the article** takes one to three minutes and runs as a background job: it answers `202` with a job. Follow it with `GET /jobs/{id}`, whose result holds the `articleId`, or receive the `article.generated` [webhook](https://www.gotopeach.com/docs/api-webhooks.md).
- For this article only, `overrides` can set `wordCountMin`, `wordCountMax` and `ctaLinkText`. `documentIds` names [brand documents](https://www.gotopeach.com/docs/api-brand-memory.md#brand-documents) to draw on. Brand documents belong to the whole account, so a key limited to some sites can't pick them.
- If the outline already has an article, it comes back and the credits are refunded.
- Articles are written with web research and link to the sources they cite. They only state claims from your Company Brain that are marked verified.

## Articles

| Endpoint | What it does | Credits | Key permission |
|---|---|---|---|
| `GET /sites/{domain}/articles` | The site's articles. ?status=approved for the ones ready to publish in your CMS. MCP: `list_articles`. | Free | `content` |
| `GET /articles/{id}` | An article for your CMS: title, H1, meta description, Markdown, HTML, JSON-LD, target questions, who approved it. MCP: `get_article`. | Free | `content` |
| `PATCH /articles/{id}` | Edit an article's Markdown, title, SEO title, meta description, slug or focus keyword (send expectedUpdatedAt to avoid overwriting newer edits). | Free | `content` + `write` |
| `POST /articles/{id}/workflow` | Submit an article for review, approve it, or request changes. | Free | `content` + `write`; `approve` and `request_changes` also need `publish` |
| `GET /articles/{id}/revisions` | An article's saved revisions, newest first. | Free | `content` |
| `GET /articles/{id}/revisions/{revisionId}` | One revision in full. | Free | `content` |
| `POST /articles/{id}/revisions/{revisionId}/restore` | Restore a revision. | Free | `content` + `write` |
| `GET /articles/{id}/readiness` | How ready the article is to be cited (0 to 100), and what to fix. MCP: `get_article_readiness`. | Free | `content` |
| `POST /articles/{id}/rewrite` | Rewrite chosen sections (by their H2 heading) with fresh research; charged per section. | 10 per section | `content` + `write` + `spend` |
| `POST /sites/{domain}/refresh` | Turn an existing page on the site into a draft to refresh, with a diagnosis of each section. | Free | `content` + `write` |

- **Editing.** `PATCH /articles/{id}` takes `markdown` (the whole article), `title` and `metaDescription`. Send `expectedUpdatedAt`, the `updatedAt` you last read, and if someone edited it since, it answers `409 edited_elsewhere` instead of overwriting their change.
- **Workflow.** An article is `draft`, then `in_review`, `approved` and `published`. `POST /articles/{id}/workflow` takes `action`: `submit` for review, `approve`, or `request_changes`, with an optional `note`. Approving and asking for changes need a key with the `publish` permission, as they need the publishing role in the app.
- **Revisions** are kept for every generation, edit, rewrite and publish, and any one can be restored.
- **Readiness** scores from 0 to 100 how ready the article is to be cited by AI engines, and says what to fix.
- **Rewrite** up to 6 sections, named by their H2 heading, with fresh research and an optional `instructions` note. Charged per section; a section that couldn't be rewritten is refunded.
- **Refresh an existing page.** `POST /sites/{domain}/refresh` with the `url` of an https page on that site turns it into a draft, with a diagnosis of each section. A page on another site answers `400 wrong_site`. Send `opportunityId` if it answers one of the site's opportunities. Free; rewriting sections of it is what costs.

## The CMS flow

One integration works with any CMS, with no Peach connector for it:

1. **Find what is ready.** `GET /sites/{domain}/articles?status=approved` lists the articles approved in Peach. Or listen for the `article.approved` [webhook](https://www.gotopeach.com/docs/api-webhooks.md) instead of asking.
2. **Fetch one.** `GET /articles/{id}` answers with everything a CMS needs:

   | Field | What it holds |
   |---|---|
   | `title`, `h1` | The title and the page heading |
   | `metaDescription` | The meta description. `metaDescriptionIsDerived` is true when Peach wrote it from the text. |
   | `slug` | A suggested address for the page |
   | `markdown`, `html` | The article as Markdown and as HTML |
   | `jsonLd` | Article schema for the page's `<script type="application/ld+json">` |
   | `targetQuery`, `targetQuestionIds` | The buyer question it answers, and the tracked questions it targets |
   | `approvedBy`, `approvedAt` | Who approved it, and when |
   | `wordCount`, `quality`, `status`, `updatedAt` | The rest of its record |

3. **Publish it** in your CMS.
4. **Tell Peach where it went live** with `POST /articles/{id}/published` and its `url`. Peach checks AI crawlers can reach the page, and if the article targets tracked questions, starts re-checking them 7, 14 and 30 days later. See [Publishing](https://www.gotopeach.com/docs/api-publishing.md).

Steps 1 and 2 need a key with `content`. Step 4 needs `content`, `write` and `publish`, because it marks the article published.

The results of those re-checks are in [Results and reports](https://www.gotopeach.com/docs/api-results-and-reports.md).
