Chat

Send the visitor's message and get the agent's reply

Requires the chat:write scope.

With stream: true the answer is text/event-stream in the AI SDK UI message stream format: data: lines with chunks such as {"type":"text-delta","delta":"…"}, ending with data: [DONE]. A streamed answer is never stored for Idempotency-Key replay.

post/chat/sessions/{id}/messages

Request

  • Base URL: https://api.meetdarwin.ai/v1
  • URL: https://api.meetdarwin.ai/v1/chat/sessions/{id}/messages
  • Auth: HTTP bearer

Path parameters

idstring required

Headers

Idempotency-Keystring

Retry safely: the first response is replayed for 24 hours (not for streamed answers).

Request body

textstring required
streamboolean

true: answer as server-sent events while the agent writes.

Response

OK

object'chat_reply' required
sessionstring required

Changes

No recorded changes to this operation across all 1 revision of this API.