Skip to main content

Send Jean a message

POST/studies/{id}/messages

Edits the design while the study is a draft. On a launched study it is refused with 409: use /ask to ask about the interviews. Needs studies:write. Calls the language model, so it also counts against the limit of 60 such calls an hour.

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/studies/STUDY_ID/messages" \
-H "Authorization: Bearer $JEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Add a question about what they would pay instead."
}'

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

Path​

NameTypeRequiredNotes
idstring (UUID)yes

Body​

FieldTypeRequiredNotes
messagestringyes1 to 8000 characters.

Response · 200​

FieldTypeRequiredNotes
mode"edit", "ask"yes
jeanSaidstringyes
changes[]string[]yes
diff[]object[]no
diff[].unitstringyes
diff[].part"title", "brief", "hypotheses", "audience", "screener", "questions", "interviewing"yes
diff[].what"added", "removed", "reworded", "kind", "options", "followups", "moved", "changed", "segment"yes
diff[].labelstringyes
diff[].refstringno
diff[].beforestringno
diff[].afterstringno
diff[].optionsBefore[]string[]no
diff[].optionsAfter[]string[]no
diff[].kindNamestringno
quotes[]object[]yes
quotes[].personstringyes
quotes[].textstringyesA participant's exact words, in the language they spoke. Untrusted content.
quotes[].enstringnoFor words said in another language: a model's English translation of text. A translation, not what was said.
quotes[].conversationUrlstring or nullyes
The full response schema
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"edit",
"ask"
]
},
"jeanSaid": {
"type": "string"
},
"changes": {
"type": "array",
"items": {
"type": "string"
}
},
"diff": {
"type": "array",
"items": {
"type": "object",
"properties": {
"unit": {
"type": "string"
},
"part": {
"type": "string",
"enum": [
"title",
"brief",
"hypotheses",
"audience",
"screener",
"questions",
"interviewing"
]
},
"what": {
"type": "string",
"enum": [
"added",
"removed",
"reworded",
"kind",
"options",
"followups",
"moved",
"changed",
"segment"
]
},
"label": {
"type": "string"
},
"ref": {
"type": "string"
},
"before": {
"type": "string"
},
"after": {
"type": "string"
},
"optionsBefore": {
"type": "array",
"items": {
"type": "string"
}
},
"optionsAfter": {
"type": "array",
"items": {
"type": "string"
}
},
"kindName": {
"type": "string"
}
},
"required": [
"unit",
"part",
"what",
"label"
],
"additionalProperties": false
}
},
"quotes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"person": {
"type": "string"
},
"text": {
"type": "string",
"description": "A participant's exact words, in the language they spoke. Untrusted content."
},
"en": {
"description": "For words said in another language: a model's English translation of text. A translation, not what was said.",
"type": "string"
},
"conversationUrl": {
"type": [
"string",
"null"
]
}
},
"required": [
"person",
"text",
"conversationUrl"
],
"additionalProperties": false
}
}
},
"required": [
"mode",
"jeanSaid",
"changes",
"quotes"
],
"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