POST /v1/sessions/{sessionId}/messages/sync
Send a message and wait for the full reply — Runs one turn on a session you own and returns the complete result as JSON once the turn finishes…
ivy_ API key (Authorization: Bearer ivy_… or X-Ivy-Api-Key), a Clerk session JWT (Authorization: Bearer …) or the Clerk __session cookie (browser sessions). See Authentication.Runs one turn on a session you own and returns the complete result as JSON once the turn finishes, instead of streaming. Use it when you cannot consume Server-Sent Events.
The response has the same shape as the batch form of the execute operation: every event produced during the turn, plus the final session state. Long turns hold the request open until they complete.
Request
Path parameters
Session UUID (UUIDv7 — time-ordered)
Request body
User message text.
Client identifier for version vector tracking. Generated when omitted.
Optional opt-in to include a per-turn diagnostic report in the result.
Responses
200 OK
Response shape:
Full session state snapshot persisted in Supabase
400 Bad Request
Response shape: object
401 Unauthorized
Response shape: object
404 Not Found
Response shape: object
429 Too Many Requests
Response shape: object
500 Internal Server Error
Response shape: object
Was this page helpful?