Skip to main content
REST API · for developers

Your assistant, inside
your software.
A few endpoints.

CRM, app, internal tool, customer portal: if it can make an HTTP request, it can talk to your assistant. The API is the freest way to bring AnyDialog into what you already use.

7 days free to try the assistant · API from the Professional plan · Cancel anytime

// Send a message to your assistant
curl -X POST https://anydialog.com/api/v1/chat \
-H "X-API-Key: cs_live_***" \
-d '{"message": "What is your refund policy?"}'
// Response
{ "response": "Refunds are accepted within 30 days...",
"tokens": { "tokens_total": 91 },
"session_id": "sess_8f3k2m9x" }

Try it now

The answers your app would receive.

Try it here in chat before you integrate it: over the API the answers arrive as JSON.

AnyDialog AI assistant
Live

How to connect it

Ready in a few steps

You need the assistant published and a plan with the API. Then you generate a key and start calling.

  1. 1

    Generate an API key

    1 min
    Details

    In your assistant settings go to Channels, API section, and click Generate key. Copy it right away: it is shown only once. Keep it safe.

  2. 2

    Send your first request

    2 min
    Details

    Put the key in the X-API-Key header, or as a Bearer token. POST to /api/v1/chat with the message: the assistant answers.

  3. 3

    Manage sessions

    1 min
    Details

    Open a session with POST /api/v1/chat/session. Read the history back with GET /api/v1/chat/{session}/history. Each session keeps the thread of the conversation.

What it can do

What changes over the API

What it can do is the same everywhere. Here you host the conversation: the interface is yours, the answers are still its own.

Key-based access

Each key has a prefix (cs_live_*) and is stored hashed. Pass it in the X-API-Key header. Several keys per assistant: rotate them without stopping anything.

  • Sessions

    With a session_id the conversation keeps its thread from one request to the next: the assistant remembers what was said.

  • Conversation history

    GET /api/v1/chat/{session}/history returns every message in a session. Useful to show the chat in your own interface.

  • Request limits

    Each key can make 60 requests per minute, on every plan. The X-RateLimit-Remaining header tells you how many you have left.

  • Your keys under control

    In the dashboard you see your keys and when each was last used. Revoke the one you no longer need, and it stops working right away.

  • Any language

    It is REST with JSON, nothing more. Call it from Python, Node.js, PHP, Ruby, Go, Swift, Kotlin: anything that makes an HTTP request.

The channel does not change what it can do

On API it does what it does on your website: the place changes, not what it can do.

Good to know

What is worth knowing before you integrate.

  • Limits apply per key. Each key can make 60 requests per minute. Go over that and you get a 429. Keep an eye on X-RateLimit-Remaining in the response headers.
  • Sessions do not expire. With the same session_id the conversation picks up its thread even days later. To start from scratch, open a new session.
  • The assistant must be published. A draft doesn't answer calls. Publish it from the dashboard before you put the integration live.

Where do you want to put your assistant?

Get your API key and start: a few endpoints, no library to install.

Get your API key

7 days free to try the assistant · API from the Professional plan · Cancel anytime