These endpoints let an AI agent work on your websites safely. It can only build from sections you have approved and fill in their text, so it cannot break your design. Everything it makes is a draft until something with publish permission publishes it.
Websites must be on your plan; otherwise these endpoints answer 403. All paths below start with https://YOUR-CRM-ADDRESS.
Permission | What it allows |
|---|
sites:read
| Read sites, pages, posts, approved sections, copy fields, blog categories and job status. |
sites:write
| Create and edit drafts, blog posts, categories and tags, and add images. |
sites:publish
| Publish. Never included with sites:write; tick it separately. |
Read
Method | Path | What it returns |
|---|
GET
| /api/v1/sites
| Your websites |
GET
| /api/v1/sites/{siteId}/pages
| A site's pages and posts, without their content |
GET
| /api/v1/sites/pages/{pageId}
| One page or post with its blocks and version |
GET
| /api/v1/sites/{siteId}/sections
| The approved sections new content may be built from |
GET
| /api/v1/sites/vocabulary
| Each element type and the copy fields that may be changed |
GET
| /api/v1/sites/{siteId}/taxonomy
| Blog categories and tags |
GET
| /api/v1/sites/jobs/{jobId}
| The status of a publish run or AI website job |
Create a page
POST /api/v1/sites/{siteId}/pages
{ "title": "Our services", "path": "/our-services", "sections": ["tpl-cedar-hero-1", "tpl-cedar-services-3"] }
sections are keys from GET /api/v1/sites/{siteId}/sections, used in order (up to 40). The page is created as a draft.
Edit a draft
PATCH /api/v1/sites/pages/{pageId} with a list of actions, applied in order, all or nothing:
{
"expectedVersion": 3,
"actions": [
{ "type": "insert_section", "sectionKey": "tpl-cedar-home-2" },
{ "type": "update_props", "id": "hero-heading", "props": { "content": "Same-day tree removal" } }
]
}
Allowed actions: insert_section, update_props (copy fields only), delete, and move or duplicate of whole sections.
Send the version you read as expectedVersion. If someone saved in the meantime you get 409, so nobody's work is overwritten.
Writing advice (for example a missing heading) comes back in the response.
POST /api/v1/sites/check checks a set of blocks without saving anything.
Blog posts
POST /api/v1/sites/{siteId}/posts creates a draft post from Markdown: { "title": "5 signs you need a new roof", "markdown": "## 1. Missing shingles\n...", "categorySlug": "roofing", "tagSlugs": ["maintenance"] }. Categories and tags must exist first.
PATCH /api/v1/sites/posts/{pageId} updates a draft post. Sending markdown replaces the whole body.
POST /api/v1/sites/{siteId}/taxonomy creates a category or tag: { "kind": "category", "name": "Roofing" }.
Images
POST /api/v1/sites/media with { "url": "https://images.example.com/roof.jpg", "alt": "New roof on a brick house" } copies a JPEG, PNG, WebP, GIF or AVIF image (up to 10 MB) into your media library. Use the returned url in an image field or in Markdown.
Publish
POST /api/v1/sites/{siteId}/publish with { "pageIds": ["..."] } publishes those pages, or the whole site when you leave pageIds out (posts go live only when listed). It returns a job straight away; check it with GET /api/v1/sites/jobs/{jobId} until its status is succeeded or failed.
A page or post that is scheduled to publish cannot be edited through the API.