Create a persona
const url = 'https://api.traaker.ai/api/public/v1/brands/example/brand-personas';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","tone":"neutral","ageRange":"example","gender":"female","budget":"example","objections":["example"],"decisionCriteria":["example"],"selectionFocus":"broad","domainExpertise":"novice","languageStyle":"professional","receptiveness":"accepting","tags":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.traaker.ai/api/public/v1/brands/example/brand-personas \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "tone": "neutral", "ageRange": "example", "gender": "female", "budget": "example", "objections": [ "example" ], "decisionCriteria": [ "example" ], "selectionFocus": "broad", "domainExpertise": "novice", "languageStyle": "professional", "receptiveness": "accepting", "tags": [ "example" ] }'Counts toward the per-brand persona quota; over it the request gets 429 with code: QUOTA_EXCEEDED. Spends no credits.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Bodyrequired
Section titled “ Request Bodyrequired ”Unknown fields are rejected with 400. null on an optional field is the same as omitting it.
object
Title of the persona, as shown in the conversation editor.
Who this person is. Must not name the brand (400).
Objections the persona raises. Must not name the brand. At most 5 items of 200 characters.
What the persona decides on. Must not name the brand. At most 5 items of 200 characters.
At most 20. Normalised to lowercase-kebab (spaces become hyphens) and deduplicated.
Responses
Section titled “ Responses ”Created
object
A reusable buyer profile (« Qui est-il ? ») that conversations link to through their brandPersonaId. Edits are live: the next run of every linked conversation uses the new traits. Optional scalars are null and optional lists [] when unset, never omitted.
object
Conversations (any status) linking this persona. It cannot be deleted while this is above 0.
object
Example
{ "data": { "tone": "neutral", "gender": "female", "selectionFocus": "broad", "domainExpertise": "novice", "languageStyle": "professional", "receptiveness": "accepting" }}Invalid or unknown query parameter or body field, or a text field names the brand.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}Missing, malformed or revoked API key.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}The account’s subscription is not active.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}Conversations is not enabled for this account.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}No such brand or persona on this account.
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}Hourly rate limit exhausted, or the brand’s persona quota is full (code: QUOTA_EXCEEDED).
object
Machine-readable discriminator, present on some errors (e.g. RATE_LIMITED on 429).
On 429 only, how long to wait before retrying, in milliseconds.
Example generated
{ "statusCode": 1, "message": "example", "code": "example", "retryAfterMs": 1}