Turn
Submit a conversation turn
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Session identifier
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/sessions/string/turn" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "user" } ], "userId": "string" }'{
"$schema": "/api/v1/schemas/TurnResponseBody.json",
"extraction_id": "string",
"extraction_status": "string",
"mood": {
"affiliation": 0.1,
"arousal": 0.1,
"reason": "string",
"tension": 0.1,
"trigger_type": "string",
"valence": 0.1
},
"next_context": null,
"success": true
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Poll deferred-turn processing status
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Agent UUID or URL-encoded agent name
Extraction ID returned by POST /turn
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/turns/string/status"{
"$schema": "/api/v1/schemas/TurnStatusOutputBody.json",
"error": "string",
"extraction_id": "string",
"state": "string"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}