Chats

Start a chat

Sends a message to the AI agent in a new chat, like sending the first message in the app. The response includes the new chat, your message, and the assistant message. The assistant responds asynchronously by default: use the wait parameter to receive the finished response directly, or poll the assistant message (or stream its events) after receiving HTTP 202. To continue the conversation, use "Send a follow-up message".

post/api/public/organizations/{orgId}/chats

Request

  • Base URL
    https://charts.basedash.com
  • Auth
    HTTP bearer

Path parameters

orgIdstring required

Organization ID

Query parameters

waitinteger

Maximum number of seconds (1-300) to hold the request open while the assistant responds. If the response finishes in time the completed message is returned; otherwise the request returns HTTP 202 with the in-progress message. Omit to return immediately.

Headers

Idempotency-Keystring

A unique key (up to 255 characters) that makes retries safe: repeating a request with the same key and body within 30 days returns the original result instead of creating a duplicate. Reusing a key with a different body returns HTTP 409; repeating one whose chat was since deleted returns HTTP 404.

Request body

messagestring required

The message to send to the AI agent, e.g. a question about your data. Maximum 10,000 characters.

Response

The Idempotency-Key was already used, so the existing chat is returned instead of creating a duplicate

Changes

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