# Publishing

> Publish approved articles to the Peach blog or a connected destination, see where each one lives, and tell Peach about articles your own CMS published.

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

> **In short.** Peach can publish an approved article to its own blog, or to WordPress.com or GitHub once you have connected them in the app. If your CMS publishes it instead, tell Peach the address so it can check the page and start its re-checks.

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

## Endpoints

| Endpoint | What it does | Credits | Key permission |
|---|---|---|---|
| `POST /articles/{id}/publish` | Publish (or update) an approved article on the Peach blog or a connected destination. MCP: `publish_article`. | Free | `content` + `write` + `publish` |
| `GET /articles/{id}/publications` | Where an article is published, and whether each copy is up to date. | Free | `content` |
| `POST /articles/{id}/published` | Tell Peach the article is live at a URL (published by your CMS); starts the day 0/7/14/30 re-checks. MCP: `mark_article_published`. | Free | `content` + `write` + `publish` |
| `POST /articles/{id}/findability` | Check again that AI crawlers can reach the published page. | Free | `content` + `write` |
| `GET /publishing/destinations` | The publishing destinations connected in the app (connect them there). | Free | `content` |

## Publishing from Peach

`POST /articles/{id}/publish` needs a key with `content`, `write` and `publish`.

- **`target`:** `peach_hosted` (your blog on gotopeach.com), `wordpress_com` or `github`. For WordPress.com and GitHub, send the destination's `targetId` from `GET /publishing/destinations`.
- **Only approved articles** are published: anything else answers `409 not_approved`. Send `approve: true` to approve and publish in one step.
- **Publishing again updates the same post or file.** It doesn't make a second copy, and a Peach blog post keeps its address.
- **If the live copy was changed outside Peach** since it last published it, the answer is `409 live_changed` and nothing is overwritten. Send `force: true` to publish anyway.
- After publishing, Peach checks the page can be found: that it loads, isn't marked noindex, has the right canonical, and that robots.txt lets AI crawlers in. The answer's `findability` holds the result.
- An article's first publish also starts its re-checks on days 0, 7, 14 and 30, when it targets tracked questions. They are part of your plan and don't use credits.

Destinations are connected in the Peach app, because they hold your credentials. Self-hosted WordPress publishes from your browser in the app, so it isn't available through the API: publish from your own system and use `POST /articles/{id}/published` instead.

## Published by your own CMS

`POST /articles/{id}/published` with the page's https `url`:

```bash
curl -X POST https://app.gotopeach.com/api/v1/articles/ARTICLE_ID/published \
  -H "Authorization: Bearer $PEACH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://acme.com/blog/payroll-for-small-teams" }'
```

Peach records the address, marks the article published, checks the page can be found and starts the re-checks, as if it had published the article itself. Because it marks the article published, it needs the same permissions as publishing: `content`, `write` and `publish`. It can be called 30 times an hour per account.

## Where an article lives

`GET /articles/{id}/publications` lists every place the article is published and whether each copy is up to date with the latest approved text. `POST /articles/{id}/findability` checks one of its addresses again, up to 20 times an hour per account.
