Send messages via the API
The Chat API lets you send a message to your bot and read its reply from your own code, the same brain as the widget, without the interface. Useful for a custom chat UI, a mobile app, or a backend that just needs an answer.
Make a request
POST to /api/v1/chat with your API key as a Bearer token. The body needs the bot_id and the visitor's message. Pass a session_id to continue a conversation; leave it out and a fresh one is returned to you.
curl https://ovellan.com/api/v1/chat \
-H "Authorization: Bearer awk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"bot_id":"YOUR_BOT_ID","message":"What are your opening hours?"}'Read the response
You get back the response text, the sources it used (each a title and URL), and a session_id. Feed that session_id into your next call and the bot remembers the thread. Replies come as a single JSON body, not streamed, and product cards and buttons are returned through the widget only, not this endpoint.
Plan and limits
- Available on the Business and Enterprise plans; other plans get a
403. - 30 requests per minute and 1,000 per day per key. Over that you get a
429with aretry-afterheader. - A single message can be up to 2,000 characters.
Without a session_id, every call starts a fresh conversation with no memory. Store the one you get back per visitor and send it each time, so the bot keeps the context of the chat.