Skip to content

Site briefing: PATCH and key_pages

The briefing is the site’s editorial document (audience, tone, pillars, banned topics, key pages). It lives in tenancy; the public API exposes GET, PUT and PATCH at /v1/sites/me/briefing and /v1/sites/{site}/briefing (same handler). See also the briefing reference.

Method Scope (flag on) Scope (flag off) Live site permission (cvt_ bearer)
GET briefing:read sites:read site.content:read
PUT briefing:write site:write flag on: site.content:create, edit_own or edit_any; flag off: site.appearance:manage or site.domain:manage
PATCH briefing:write (route does not exist, 404) site.content:create, edit_own or edit_any

A ck_ key does not issue the new fine-grained scopes (briefing:read, briefing:write). With the flag on it works through package expansion: sites:read covers briefing:read and site:write covers briefing:write. The fine-grained scopes arrive through an OAuth grant (cvt_). A ck_ key has no live permission, only scope. See scopes.

A key with no recorded author gets 403 BRIEFING_NO_AUTHOR when writing (PUT or PATCH): this key has no author on record; issue a new key to edit the briefing.

Janela do terminal
curl -s https://api.canverly.net/v1/sites/me/briefing \
-H "Authorization: Bearer $TOKEN"

The response is 200, with Cache-Control: private, no-store. A site with no briefing returns version: 0, texts "", lists [] and updated_at: null.

{
"version": 3,
"updated_at": "2026-10-20T14:02:11Z",
"audience": "Small business owners",
"tone": "Direct, no jargon",
"goal": "",
"skill_module": "marketing",
"pillars": ["Automation", "Applied AI"],
"banned_topics": [],
"editorial_rules": [],
"glossary": [],
"trusted_sources": [],
"competitors": [],
"default_cta": "",
"key_pages": [{ "title": "Pricing", "url": "/pricing" }],
"region": "Brazil",
"notes": ""
}

The API validates the fields you send and tenancy repeats the validation (it has the last word). Text limits count characters. Text is trimmed; empty becomes absent.

Field Type Limit
audience string 1000 characters
tone, goal, default_cta string 600, 600 and 300 characters
skill_module slug [a-z0-9-] 40 characters
pillars string[] 10 items, 120 characters each, item not empty
banned_topics string[] 30 items, 120 characters each
editorial_rules string[] 30 items, 300 characters each
glossary [{term, usage}] 50 items; term 1 to 80; usage up to 300
trusted_sources, competitors [{name, url}] 20 items; name 1 to 120; url https, up to 300 characters, no space or control character
key_pages [{title, url}] 20 items; see below
region string 60 characters
notes string 2000 characters
version integer >= 0 request input of PUT and PATCH only
updated_at date-time or null response only

The request body is at most 32 KiB; above that the response is 413 BRIEFING_TOO_LARGE (the body must be at most 32 KiB).

key_pages is a list of {title, url} objects, up to 20 items. An object with an extra property is rejected.

Rule Detail
title 1 to 120 characters
url a relative path that starts with one slash (/pricing) or an https:// URL; at most 300 characters, no space or control character
Rejected //host, http://, https:// without a host or with embedded credentials (user:password@), \ in the relative path

Typical errors (all 422 BRIEFING_INVALID, with field pointing at the item):

field message
key_pages[0].url must be a relative path (/x) or an https:// URL of at most 300 characters
key_pages[0].title 1 to 120 characters
key_pages at most 20 items

PUT replaces the whole document: a missing or empty field is erased. version is required (numeric; 0 creates the first briefing).

Janela do terminal
curl -s -X PUT https://api.canverly.net/v1/sites/me/briefing \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"version": 3, "audience": "Small business owners", "key_pages": [{"title": "Pricing", "url": "/pricing"}]}'

In this example every other briefing field is empty after the write. The response is 200 with the saved briefing and the new version.

PATCH merges the body into the current document. version is required and must be the one you read.

State of the field in the body Effect
absent unchanged; internal keys the public API does not know about are preserved too
null clears the field
"" or only spaces clears the field
[] clears the field
a value replaces the whole field (lists are not merged item by item)
unknown field name 422 BRIEFING_INVALID, field = the name, message = unknown field

Validation applies only to the fields you send: old data above the limit, in a field you did not touch, does not block the PATCH.

Janela do terminal
curl -s -X PATCH https://api.canverly.net/v1/sites/me/briefing \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"version": 3, "tone": null, "region": "Brazil", "key_pages": [{"title": "Pricing", "url": "/pricing"}]}'

Here tone is cleared, region is written, key_pages is replaced and the rest stays as it was. The response is 200 with the new briefing, including the next version. A body with only {"version": N} is valid and changes no field.

A PATCH that changes nothing still increments version: tenancy writes the revision and the event on every call. The PATCH body schema (BriefingPatch) declares additionalProperties: false, and an unknown field returns 422.

  • version is optimistic concurrency control. On PATCH the API reads the current briefing and compares before writing: a body version different from the current one returns 409 BRIEFING_CONFLICT with current_version, and nothing is written.
  • If someone else writes between the API’s read and its write, tenancy returns the same 409.
  • There is no automatic retry. Read again (GET), reapply your change and send it with the current version.
I want to Use
Change one or two fields without resending the rest PATCH (requires the v2 flag)
Clear one specific field PATCH with null, "" or []
Write the complete document, erasing what I did not send PUT
Work on a ring without the v2 scopes PUT (read with GET, edit locally, send everything)
Status error.code When
400 bad_request (invalid request body) unreadable JSON; on PATCH, also a body that is not an object
403 BRIEFING_NO_AUTHOR key with no recorded author
403 insufficient_scope / forbidden missing scope or live permission (see errors and limits)
404 not_found site out of reach; or PATCH with the flag off (not found)
409 BRIEFING_CONFLICT stale version; current_version is included
413 BRIEFING_TOO_LARGE body above 32 KiB
422 BRIEFING_INVALID unknown field, value above the limit, empty item, invalid key_pages, missing or non-numeric version
503 BRIEFING_UNAVAILABLE tenancy down; Retry-After is included

422 BRIEFING_INVALID without field happens in three cases: wrong type or unknown property inside a list object (a field has the wrong type or an unknown property on PATCH); missing or non-numeric version on PUT (unknown field or value of the wrong type (a numeric version is required)); and a document the API accepted but tenancy rejected (the briefing was rejected, for example HTML in text or an empty usage in a glossary item). On PATCH, a missing version carries field: "version" and the message a numeric version (the version you read) is required.

The success response of PUT and PATCH does not echo the body you sent: it is always the saved document.