Skip to main content
    Ivy Biosciences Docs/Call the platform/API/Reference/Reference/Execution/POST /v1/sessions/{sessionId}/messages/sync

    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…

    Auth: required. Send an 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

    sessionIdstring (uuid)

    Session UUID (UUIDv7 — time-ordered)

    Request body

    contentstring

    User message text.

    clientIdstring

    Client identifier for version vector tracking. Generated when omitted.

    diagnosticsany

    Optional opt-in to include a per-turn diagnostic report in the result.

    Responses

    200 OK

    Turn finished

    Response shape:

    successboolean
    eventsobject[]
    stateobject

    Full session state snapshot persisted in Supabase

    400 Bad Request

    Invalid request

    Response shape: object

    401 Unauthorized

    Authentication required

    Response shape: object

    404 Not Found

    Resource not found

    Response shape: object

    429 Too Many Requests

    Rate limit exceeded

    Response shape: object

    500 Internal Server Error

    The turn failed to execute

    Response shape: object

    curl -X POST 'https://ivybiosciences.com/api/v1/sessions/{sessionId}/messages/sync' \
      -H "Authorization: Bearer $IVY_API_KEY" \
      -H 'Content-Type: application/json' \
      -d '{
      "content": ""
    }'

    Was this page helpful?

    Loading...