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

Create a Persona

Creates a Persona on a Brand. A Persona describes one audience that the brand speaks to. The body and both ends of the age range are optional, because you write a Persona one part at a time. The slug is unique in the Brand, not in your organization. The answer is 409 if the slug already exists on this Brand.

POST/context/brands/{slug}/personas
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
age_maxinteger

Upper age bound. Omit for "and older".

min 0 · max 120
age_mininteger

Lower age bound. Omit for "and younger".

min 0 · max 120
bodystring

Who this audience is (markdown), at most 50,000 characters. Suggested headings: Profile, Motivations, Frictions, Language. Language means the words the audience itself uses, not a locale. The headings are advice, not schema.

min length 1 · max length 50000
descriptionstringrequired

One-line summary — what agents read to pick this Persona.

min length 1 · max length 500
namestringrequired

Display name.

min length 1 · max length 120
slugstring

Optional explicit slug handle; normalized to kebab-case. Unique within this Brand, so two Brands may each hold the same one. Defaults to one derived from the name.

max length 120
Responses
201

The Persona as created, at revision 1. An unwritten body comes back null, which is a normal state rather than an error.

ageMaxnumber | nullrequired
ageMinnumber | nullrequired

Each bound is independently optional, so "35+" is expressible.

bodystring | nullrequired

Who this audience is, in markdown, or null when nobody wrote it. A listing answers hasBody, never the body.

brandIdstringrequired
createdAtnumberrequired

Milliseconds since the Unix epoch, UTC.

createdBystringrequired
descriptionstringrequired
idstringrequired
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.

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.

402

The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.

paywallUrlstring<uri>required

The page where an owner of the organization subscribes. Show it to the person.

errorstringrequired

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

Allowed:organization_unentitled
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

This Brand already has a Persona with that slug. error is slug_conflict. Another Brand may hold the same one — the scope of the uniqueness is the Brand, not the organization.

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 name and slug carry no letter or digit. invalid_age_range: the minimum is above the maximum.

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 POST 'https://api.adcrunch.dev/context/brands/string/personas' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "age_max": 45,
  "age_min": 28,
  "body": "## Profile\n\nRunners of 40 to 80 kilometres a week, ten years in, with one pair in rotation and one on the shelf.\n\n## Motivations\n\nThey want the same shoe again, and proof that it is the same. A resole keeps them running on a pair they trust.\n\n## Frictions\n\nThey fear the new model is worse than the one they know. A change of sole or of last reads to them as a risk, not as progress.\n\n## Language\n\nThey say \"my daily trainer\" and \"I got 900 out of the last pair\". They ask about the drop and the stack, never about the technology.",
  "description": "Runners who already own a pair, and who buy the next one without looking at another brand.",
  "name": "Loyalists",
  "slug": "loyalists"
}'
Response
{
  "ageMax": 45,
  "ageMin": 28,
  "body": null,
  "brandId": "brd_6a9c33",
  "createdAt": 1790000000000,
  "createdBy": "usr_4d8b12",
  "description": "Runners who already own a pair, and who buy the next one without looking at another brand.",
  "id": "psn_8c4a20",
  "name": "Loyalists",
  "revision": 1,
  "slug": "loyalists",
  "updatedAt": null
}