Skip to main content

Send a message to the agent

POST 

/chat/turns

Sends one message to the same agent the Mocart app talks to, as the account that owns the key. Answers 202 at once with the turn; poll GET /chat/turns/{turnId} until status is done or failed. The first message of a conversation has no sessionId; send the sessionId the reply carries on the next one. A turn never runs twice: if it fails, send the message again with a NEW Idempotency-Key, in the SAME conversation (its sessionId) when the problem names one. Idempotency-Key is required.

Request​

Responses​

Accepted - or the replay of an earlier send with this key.

Response Headers
    Location

    The turn: /api/public/v1/chat/turns/{turnId}.

    Retry-After

    While the turn is not finished: seconds to wait before polling again (2).