Respos·ai← Back to journal
§ API ReferenceVersion · 1.0 · 10 May 2026

One endpoint. Plain JSON.

The public chat API is intentionally minimal. A question in, a reply out, an optional conversation ID to link turns.

Authentication

No API key is required for the public chat endpoint. Your agent’s embed token is the credential — keep it out of public source code if you want to restrict access. You can lock the endpoint to specific domains from the Configure tab.

Base URL

https://resposai.com

POST /api/chat/[token]

Send a message to an agent and receive a reply. Optionally pass a conversation ID to continue a prior session.

Request

POST /api/chat/{token}
Content-Type: application/json

{
  "question": "What are your opening hours?",
  "conversation_id": "optional-uuid-to-continue"
}
FieldTypeRequiredDescription
questionstringYesThe visitor's message.
conversation_idstring (UUID)NoOmit to start a new conversation. Include to append to an existing one.

Response

{
  "conversation_id": "550e8400-e29b-41d4-a716-446655440000",
  "reply": "We're open Monday–Friday, 9 am to 6 pm."
}

Error responses

CodeMeaning
400Missing or empty question field.
403Origin not in allowed-domain list, or agent is paused/draft.
404Token not found — check the token in your URL.
500Upstream error (AI inference or database). Retry with backoff.

CORS

All POST and OPTIONS requests to /api/chat/* return permissive CORS headers by default. If you have configured allowed domains, only those origins will receive a non-403 response.

Rate limits

60 messages per visitor per hour per agent. Exceeded requests return HTTP 429. The limit resets on the clock hour.

Example: curl

curl -X POST https://resposai.com/api/chat/YOUR_TOKEN \
  -H "Content-Type: application/json" \
  -d '{"question":"What is your return policy?"}'

Example: JavaScript fetch

const res = await fetch('https://resposai.com/api/chat/YOUR_TOKEN', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    question: 'Do you ship internationally?',
    conversation_id: savedConversationId ?? undefined,
  }),
})
const { reply, conversation_id } = await res.json()
// save conversation_id for the next turn

Need a webhook for WhatsApp? See the documentation or the integrations page.