Chat API for agents
The chat on C∞A∞I∞O is an AI bot that answers questions about C∞A∞I∞O's website and AI chat bot services, and hands the conversation to a real person on our team when asked. An agent can use the same public endpoints the widget uses.
Machine-readable: OpenAPI 3.1 · API catalog · auth.md · agent skills
Access
No API key, no OAuth. Endpoints are public and scoped per workspace. C∞A∞I∞O's own workspace is chrismai. You pick a visitor_id (v_ plus 16–60 random URL-safe characters) and reuse it for the conversation; it is the only proof the conversation is yours, so keep it private.
Base URL (the Worker that currently serves the C∞A∞I∞O widget):
https://chrismai.ai/api/chat
Flow
# 1. Greeting, availability and help articles
curl 'https://chrismai.ai/api/chat/api/widget/config?workspace_id=chrismai'
# 2. Start a conversation with a first message (201; the bot's reply is in "messages")
curl -X POST https://chrismai.ai/api/chat/api/widget/conversations \
-H 'content-type: application/json' \
-d '{"workspace_id":"chrismai","visitor_id":"v_REPLACE_WITH_RANDOM_ID","message":"How much is a website for a small bakery?"}'
# 3. Follow up (use conversation_id from step 2)
curl -X POST https://chrismai.ai/api/chat/api/widget/conversations/CONVERSATION_ID/messages \
-H 'content-type: application/json' \
-d '{"visitor_id":"v_REPLACE_WITH_RANDOM_ID","message":"Can you email me a quote?"}'
# 4. Leave an email so a human can reply, and/or ask for a human
curl -X POST .../conversations/CONVERSATION_ID/email -H 'content-type: application/json' -d '{"visitor_id":"v_…","email":"you@example.com","name":"Your Name"}'
curl -X POST .../conversations/CONVERSATION_ID/handoff -H 'content-type: application/json' -d '{"visitor_id":"v_…"}'
# 5. Later: read the transcript (human replies have role "human")
curl 'https://chrismai.ai/api/chat/api/widget/conversations/CONVERSATION_ID?visitor_id=v_…'
Endpoints
| Method and path | What it does |
|---|---|
GET /api/widget/config | Greeting, contact email, whether a human is online, help articles |
GET /api/widget/articles?q= | Search help articles (pricing, services, process) |
POST /api/widget/conversations | Start a conversation, optionally with a first message |
GET /api/widget/conversations | Your recent conversations for a visitor_id |
GET /api/widget/conversations/{id} | State and full transcript |
POST /api/widget/conversations/{id}/messages | Send a message; the bot's reply comes back in the response |
POST /api/widget/conversations/{id}/handoff | Ask for a human (a real person) |
POST /api/widget/conversations/{id}/email | Leave a reply address |
POST /api/widget/conversations/{id}/rating | Thumbs up or down |
GET /api/health | Liveness |
Errors are JSON: {"error": "…", "code": "…"}, with 400, 403, 404, 409 (closed), 413 (too long) or 429 (rate limited).
Limits and etiquette
- Messages up to 2,000 characters; 60 messages per conversation.
- Per IP: 20 new conversations and 40 messages per 10 minutes. Honour
Retry-After. - Every conversation is stored and read by a human on our team. Use it for real questions on behalf of a real person, not for automated testing.
- Human replies are not instant. Leave an email rather than polling often.
What is not offered
There is no payment API, account API, OAuth server, MCP server or A2A endpoint. Every project is quoted per project. There is no public checkout. Our team works remotely. Questions: support@chrismai.ai