Skip to main content
Chat endpoints:
  • POST /v1/bots/{botId}/chat
  • POST /v1/bots/{botId}/chat/stream
Use GET /v1/bots first to find a bot ID.

Standard chat response

curl https://behaviq.io/v1/bots/YOUR_BOT_ID/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Draft a short script for a tense handover."
  }'
Request fields:
  • message required
  • sessionId
  • userId
  • includeCitations
  • webSearch
  • useMcp

Streaming

If you want a streamed reply, use the SSE endpoint:
curl https://behaviq.io/v1/bots/YOUR_BOT_ID/chat/stream \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Talk me through the first thirty seconds."
  }'
That endpoint returns text/event-stream.

Session context

If you want the next request to continue the same conversation, pass the sessionId from the previous response.

Credits

Each chat response costs 1 credit. If the workspace has no credits left, the API returns 402.