Skip to main content

Save a persona's structure

POST/personas

Creates a persona from structured fields, or with personaId changes one: its name, its recorded criteria (each a segment's name and the values that count, all of which must hold), and optionally its brief and its traits not recorded yet. A field left out of a change keeps its value, except criteria, which are always replaced. Use it for a direct edit of the structure; to make a persona from a description in plain words, use draft_persona. Take segment names and values from list_segments: a criterion naming a segment no study records is kept but matches nobody until a study records it. Names are unique in the workspace, ignoring case. Returns the persona and who matches it. Counts are computed in code from interviews that completed and passed the quality check, one per person and study, for one basis at a time (people by default; never twins). A person matches when every criterion's segment is recorded for them and its value is one of the listed values, ignoring case. People in a study that did not record one of the criteria's segments, or with no value for it, are counted as not recorded, never as not matching. Traits in unrecorded are not part of any count. Calls no model. (The MCP tool save_persona.)

Scope studies:write · Credential a workspace API key (jean_sk_…, make one in the Jean app) or an OAuth access token. See scopes.

curl --fail-with-body -X POST "https://app.jeantechnologies.com/api/v1/personas" \
-H "Authorization: Bearer $JEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Churn interviews",
"criteria": [
{
"segment": "segment",
"values": [
"value"
]
}
]
}'

An Idempotency-Key header is optional here and makes a retry safe. See idempotency.

Body​

FieldTypeRequiredNotes
personaIdstringnoTo change an existing persona. Leave out to create one. At most 64 characters.
namestringyes1 to 80 characters.
criteria[]object[]yesAll must hold for a person to match. May be empty. At most 10 items.
criteria[].segmentstringyesA segment's name, as list_segments gives it. Matched across studies ignoring case and surrounding spaces. 1 to 60 characters.
criteria[].values[]string[]yesThe values that count, as list_segments gives them. Matched ignoring case. At most 20 items.
briefstring or nullnoThe researcher's own words for the group. Left out of a change: kept.
unrecorded[]object[]noTraits not recorded by any study yet. Left out of a change: kept. At most 20 items.
unrecorded[].traitstringyesA trait in plain words, such as: has a coffee every Saturday. 1 to 200 characters.

Response · 200​

FieldTypeRequiredNotes
personaobjectyes
persona.idstringyes
persona.namestringyes
persona.briefstring or nullyesThe researcher's own words for this group, word for word. Null when it was written as criteria only.
persona.criteria[]object[]yesThe structured part, all of which must hold for a person to match. Matching uses these only.
persona.unrecorded[]object[]yesTraits the brief asks for that no study in this workspace records yet. Never part of any count.
persona.createdAtstringyes
persona.updatedAtstringyes
countsobjectyes
counts.basis"people", "test-scripts"yesWhose interviews: people (the default) or test-script interviews (SIM, used to rehearse a study, not people). Never both at once. Twins are never included.
counts.peopleintegeryesEvery person read: completed, passed the quality check, of this basis, in all studies.
counts.matchingintegeryesOf those, how many meet every criterion.
counts.notMatchingintegeryes
counts.notRecordedintegeryesOf those, how many sit in a study that did not record a criterion's segment, or have no value for one. Not known either way.
counts.studies[]object[]yes
createdbooleanyes
The full response schema
{
"type": "object",
"properties": {
"persona": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"brief": {
"description": "The researcher's own words for this group, word for word. Null when it was written as criteria only.",
"type": [
"string",
"null"
]
},
"criteria": {
"type": "array",
"items": {
"type": "object",
"properties": {
"segment": {
"type": "string",
"minLength": 1,
"maxLength": 60,
"description": "A segment's name, as list_segments gives it. Matched across studies ignoring case and surrounding spaces."
},
"values": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": "The values that count, as list_segments gives them. Matched ignoring case."
}
},
"required": [
"segment",
"values"
],
"additionalProperties": false
},
"description": "The structured part, all of which must hold for a person to match. Matching uses these only."
},
"unrecorded": {
"type": "array",
"items": {
"type": "object",
"properties": {
"trait": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "A trait in plain words, such as: has a coffee every Saturday."
}
},
"required": [
"trait"
],
"additionalProperties": false
},
"description": "Traits the brief asks for that no study in this workspace records yet. Never part of any count."
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
}
},
"required": [
"id",
"name",
"brief",
"criteria",
"unrecorded",
"createdAt",
"updatedAt"
],
"additionalProperties": false
},
"counts": {
"type": "object",
"properties": {
"basis": {
"type": "string",
"enum": [
"people",
"test-scripts"
],
"description": "Whose interviews: people (the default) or test-script interviews (SIM, used to rehearse a study, not people). Never both at once. Twins are never included."
},
"people": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Every person read: completed, passed the quality check, of this basis, in all studies."
},
"matching": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, how many meet every criterion."
},
"notMatching": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"notRecorded": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Of those, how many sit in a study that did not record a criterion's segment, or have no value for one. Not known either way."
},
"studies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"recordsEverySegment": {
"type": "boolean",
"description": "False when this study's design does not record one of the criteria's segments: its people are then counted as not recorded."
},
"people": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "People in this study who completed and passed the quality check."
},
"matching": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"notMatching": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Recorded, and a value is not one of the criteria's."
},
"notRecorded": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "A segment the criteria name is not recorded for them. Never counted as not matching."
}
},
"required": [
"id",
"title",
"recordsEverySegment",
"people",
"matching",
"notMatching",
"notRecorded"
],
"additionalProperties": false
}
}
},
"required": [
"basis",
"people",
"matching",
"notMatching",
"notRecorded",
"studies"
],
"additionalProperties": false
},
"created": {
"type": "boolean"
}
},
"required": [
"persona",
"counts",
"created"
],
"additionalProperties": false
}

Errors​

StatusMeaning
400The request is not valid: the body is not JSON, a field is wrong (listed in errors), or a required Idempotency-Key is missing.
401No key or token, or one that is wrong, expired or revoked.
403The key or connection lacks the scope this operation needs. scope names it.
404No such address, or no study (or conversation) with that id in this workspace. Another workspace's id is answered the same way.
409The study is not in a state that allows this (the detail says what to do instead), or the Idempotency-Key was used with a different request.
429Too many requests from this key or connection, or the workspace has reached its hourly or daily limit for model calls (title "Workspace model limit reached", window says which). Retry-After says when to try again.
503The language model is not available. Try again later.

Every error is application/problem+json, the same shape on every endpoint.

API overview · OpenAPI document