# Company Brain

> Read and save what Peach knows about a brand, with versions, suggestions from re-reading the site, competitor detection, the site's pages and brand documents.

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

> **In short.** Company Brain is what every article and check reads about a brand: what it sells, to whom, how it sounds and what it claims. Each save is a new version you can go back to. Re-reading the site suggests changes and never overwrites what you wrote.

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

## Reading and saving

| Endpoint | What it does | Credits | Key permission |
|---|---|---|---|
| `GET /sites/{domain}/brand-memory` | The site's Company Brain: products, buyers, tone, claims, competitors, suggestions. MCP: `get_brand_memory`. | Free | `memory` |
| `PUT /sites/{domain}/brand-memory` | Save Company Brain fields as a new version (only the fields sent change). | Free | `memory` + `write` |
| `GET /sites/{domain}/brand-memory/versions` | Company Brain's saved versions, newest first. | Free | `memory` |
| `GET /sites/{domain}/brand-memory/versions/{version}` | One version of Company Brain, with what changed from the one before. | Free | `memory` |
| `POST /sites/{domain}/brand-memory/restore/{version}` | Restore an earlier version (saved as a new version). | Free | `memory` + `write` |

`GET /sites/{domain}/brand-memory` answers with every field, how complete the memory is, any open suggestions and the status of a re-read.

To save, send only the fields you want to change, inside `fields`:

```bash
curl -X PUT https://app.gotopeach.com/api/v1/sites/acme.com/brand-memory \
  -H "Authorization: Bearer $PEACH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "fields": { "value_proposition": "Payroll for teams of 5 to 50, set up in a day." } }'
```

- **Fields:** `business_name`, `website_url`, `description`, `value_proposition`, `point_of_view`, `key_messaging`, `products`, `icp` (who buys), `tone`, `tone_profile`, `claims`, `competitors`, `classification` (what the site sells), `audience_country`, `audience_region`, `language`, `emojis_enabled`, `youtube_enabled`, `cta_enabled`, `cta_title`, `cta_subtitle`, `cta_button_label`, `cta_button_url`, `internal_link_count`, `authority_links`, `brand_document_ids`, `sitemap_url`, `blog_root_url`, `tracked_prompts`.
- A field that fails a check answers `400` with the `field` and a message.
- Every save that changes something is a new version. A save that changes nothing makes no version.
- If someone else saved at the same moment, it answers `409 save_conflict`: read it again, then save.
- **Claims.** Articles only state claims marked as verified as facts. Claims Peach found itself are unverified until you mark them.
- **Restore** makes a new version holding an earlier version's values, so nothing is lost.

## Letting Peach fill it in

| Endpoint | What it does | Credits | Key permission |
|---|---|---|---|
| `POST /sites/{domain}/brand-memory/reread` | Re-read the site (runs in the background; fields you edited come back as suggestions). Follow it with GET .../brand-memory's recrawl status. | 10 | `memory` + `write` + `spend` |
| `POST /sites/{domain}/brand-memory/complete` | Draft the business description, value proposition and messaging from the site with AI (not saved). | 10 | `memory` + `spend` |
| `POST /sites/{domain}/competitors/redetect` | Find the site's competitors again from what it sells (saved to Company Brain). | 30 | `memory` + `write` + `spend` |
| `POST /memory-suggestions/{id}/accept` | Accept a suggested Company Brain change from a re-read. | Free | `memory` + `write` |
| `POST /memory-suggestions/{id}/reject` | Reject a suggested Company Brain change. | Free | `memory` + `write` |

- **Re-read the site** runs in the background and answers `202`. A second one while the first is waiting answers `409 already_running`. Its progress is in `GET /sites/{domain}/brand-memory`.
- A re-read never overwrites a field you or your team wrote. It suggests the change instead, and you accept or reject each suggestion. A suggestion for a field that changed since answers `409 stale_suggestion`.
- **Complete with AI** drafts the description, value proposition, point of view and key messages from the site. Nothing is saved: save the parts you want with `PUT`.
- **Re-detect competitors** works out who the site competes with from what it sells, and saves them. If Peach has misread what the site sells, send a corrected `classification` with it.

## The site's pages

| Endpoint | What it does | Credits | Key permission |
|---|---|---|---|
| `POST /sites/{domain}/pages/scan` | Read the site's sitemap (or blog index) for its pages, used for internal links. | Free | `memory` + `write` |
| `GET /sites/{domain}/pages` | The site's pages Peach knows of. | Free | `memory` |

Peach reads the site's sitemap, or its blog index, for the pages articles can link to. Send `sitemap_url` or `blog_root_url` to read a different one.

## Brand documents

| Endpoint | What it does | Credits | Key permission |
|---|---|---|---|
| `GET /documents` | Brand documents (voice guides, buyer profiles) articles can draw on. Account-wide. | Free | `memory` |
| `POST /documents` | Upload a brand document (.docx, up to 10 MB): multipart/form-data with file and label. | Free | `memory` + `write` |
| `DELETE /documents/{id}` | Delete a brand document. | Free | `memory` + `write` |

Voice guides, buyer profiles and other reference documents that articles can draw on. They belong to the whole account, so these endpoints need a key that can see every site (`403 needs_all_sites` otherwise).

Upload a `.docx` file of up to 10 MB as `multipart/form-data`, with `file` and `label`:

```bash
curl -X POST https://app.gotopeach.com/api/v1/documents \
  -H "Authorization: Bearer $PEACH_API_KEY" \
  -F "file=@voice-guide.docx" \
  -F "label=Voice guide"
```

Only the text is kept. To use documents in an article, pass their ids as `documentIds` when you [write the article](https://www.gotopeach.com/docs/api-content.md#outlines-and-articles).
