API referenceConversations

Add turns

POST
/conversations/{id}/turns

Stores a batch of turns. A turn sent again under the same id replaces it; only final turns reach the gate, the first time each is final, so repeating a batch is safe. Turns in a batch go to the gate in start order; batches go in the order they arrive.

Authorization

apiKey
X-API-Key<token>

API key (prefix spk_test_ or spk_live_) or personal access token (prefix pat_)

In: header

Path Parameters

id*string

Conversation ID

Header Parameters

Idempotency-Key*string

Idempotency key that prevents processing a request twice. Use a unique UUID v4 per request.

Lengthlength <= 255

Request Body

application/json

turns*array<>

Up to 500 turns, in any order

Itemsitems <= 500

Response Body

application/json

curl -X POST "https://example.com/conversations/cnv_2jxsy8cc8v0348asy6t1/turns" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "turns": [      {        "channel": "mic",        "end": 0.1,        "final": true,        "id": "string",        "speaker": "string",        "start": 0.1,        "text": "string"      }    ]  }'
Empty