Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview

Update a Brand

Updates a Brand. Send the base_revision you read. Omit a narrative section to keep it. Send null to clear it. The slug changes only when you send a slug: a new name alone never moves the handle. The answer is 409 with error=revision_mismatch if the Brand changed after you read it. It is 409 with error=slug_conflict if another Brand already holds the slug you send.

PATCH/context/brands/{slug}
Authorization
AuthorizationBearer token · headerrequired

Send Authorization: Bearer <credential>.

Use an API key (acr_…), from the AdCrunch console under Settings → API keys.

The credential names the organization, and no operation takes an organization parameter.

See https://docs.adcrunch.dev/api/authentication.

Path parameters
slugstringrequired
Request body
requiredapplication/json
base_revisionintegerrequired

The revision last read via GET — guards concurrent edits.

min -9007199254740991 · max 9007199254740991
descriptionstring
min length 1 · max length 500
guidelinesstring | null

Do's and don'ts; null clears the section.

min length 1
identitystring | null

Positioning and mission; null clears it.

min length 1
logo_document_idstring | null

Nominate one of the Brand's documents as its logo; null clears the nomination.

matches ^doc_[\s\S]{0,}$
messagingstring | null

Key messages; null clears the section.

min length 1
namestring
min length 1 · max length 120
slugstring

Optional new slug handle (a deliberate rename).

max length 120
voicestring | null

Tone of voice; null clears the section.

min length 1
website_urlstring<uri> | null

The Brand's public site; null clears it. Changing it starts no read.

Responses
200

The Brand as it now stands, at the next revision. Send that one back on your next edit.

createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

createdBystringrequired
descriptionstringrequired
guidelinesstring | nullrequired

Do’s and don’ts, claims to avoid.

idstringrequired
identitystring | nullrequired

Positioning, mission, what is on offer.

logoDocumentIdstring | nullrequired

The Document this Brand nominates as its logo.

messagingstring | nullrequired

Key messages, value propositions, proof points.

namestringrequired
revisionnumberrequired

Increments on every write. Send it back as base_revision to edit; a stale one answers 409.

slugstringrequired
updatedAtnumber | nullrequired

Milliseconds since the Unix epoch, UTC.

voicestring | nullrequired

Tone and personality.

websiteUrlstring | nullrequired

The brand’s public site. A locator only — its contents are not stored.

400

The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. error is invalid_request, and issues names each field. Nothing was changed.

issuesobject[]required

One entry for each field that does not match.

Show properties
Array of object
instringrequired

The part of the request that holds the field.

Allowed:bodycookieheadersparamsquery
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

pathstringrequired

A JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:invalid_request
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

401

No API key, or one that does not resolve. See the security scheme. error is unauthorized.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:unauthorized
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

403

The caller does not hold brand:write. error is forbidden.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:forbidden
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

404

No Brand with that slug. error is not_found.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

409

error tells the two conflicts apart. revision_mismatch means somebody wrote first — re-read, re-apply, and send currentRevision back. slug_conflict means the rename collides.

Any of:
object
currentRevisionnumberrequired

The revision the row holds now. Re-read, re-apply your edit on top, and send this back as base_revision.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:revision_mismatch
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

object
slugstringrequired

The slug that is already taken.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

Allowed:slug_conflict
messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

422

Two codes share this status. invalid_slug: the new slug has no letter or digit. invalid_logo: the nominated logo is not one of this Brand’s own finished documents.

errorstringrequired

A stable code for the failure. This is the field to branch on. It does not change for a given failure.

messagestringrequired

A sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.

Request
curl -X PATCH "https://api.pr-701.adcrunch.dev/context/brands/string" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "base_revision": 4,
  "guidelines": "- Name the distance, never the \"journey\".\n- Claim the kilometres the shoe is tested to, and no more.\n- Do not compare the shoe to a named competitor.",
  "logo_document_id": "doc_5e2b41",
  "messaging": "- One shoe, a thousand kilometres.\n- Resole it twice, and keep running on it.\n- Sold direct, so the price is the cost of the shoe."
}'
Response
{
  "createdAt": 1790000000000,
  "createdBy": "usr_4d8b12",
  "description": "Running shoes sold direct to the runner, made to last a thousand kilometres.",
  "guidelines": "- Name the distance, never the \"journey\".\n- Claim the kilometres the shoe is tested to, and no more.\n- Do not compare the shoe to a named competitor.",
  "id": "brd_6a9c33",
  "identity": "Acme makes one running shoe and sells it direct. The promise is a thousand kilometres on the same pair, and a resole rather than a replacement.",
  "logoDocumentId": "doc_5e2b41",
  "messaging": "- One shoe, a thousand kilometres.\n- Resole it twice, and keep running on it.\n- Sold direct, so the price is the cost of the shoe.",
  "name": "Acme",
  "revision": 5,
  "slug": "acme",
  "updatedAt": 1790086400000,
  "voice": "Plain and measured. Short sentences. No superlative the shoe cannot earn.",
  "websiteUrl": "https://acme.example"
}