Cevanos

Search the docs

Search the API reference and every integration guide.

Developers

Cevanos API

Talk to your agents from your own app, website backend or CRM. Send a customer's message, get the agent's reply, and read the conversation back.

Base URL https://api.cevanos.aiStandard and Pro plans

Get an API key

Keys are made by a workspace owner or admin in the console.

  1. 1Open Settings → API keys and click Create API key.
  2. 2Name it, tick what it may do (Chat, Read conversations) and pick its agents.
  3. 3Copy the key. It starts with cvn_sk_ and is shown only once.

Send it on every request as Authorization: Bearer cvn_sk_…. To check it works, call GET /v1/me. GET /v1/agents lists the agents it can reach, with their IDs.

Send a message

Post the customer's message to an agent. The reply comes back in the same response.

curl https://api.cevanos.ai/v1/agents/AGENT_ID/chat \
  -H "Authorization: Bearer $CEVANOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "When are you open on Sunday?"}'
Reply
{
  "data": {
    "outcome": "answered",
    "reply": "We are closed on Sundays. We open again Monday at 9am.",
    "conversation_id": "01a12779-b041-728a-9b1d-2797cc84a905",
    "message_id": "01a12779-defc-7a33-88d5-5a79cddb6d5f",
    "usage": { "credits": 3.7 }
  }
}

outcome is answered when the agent replied. It can also be handed_over (a person will take it from here), could_not_answer, or no_reply (someone on your team is already handling the conversation).

Continue a conversation

Send back the conversation_id from the last reply. Leave it out to start a new conversation.

Example
curl https://api.cevanos.ai/v1/agents/AGENT_ID/chat \
  -H "Authorization: Bearer $CEVANOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "And on Saturday?",
       "conversation_id": "01a12779-b041-728a-9b1d-2797cc84a905"}'

Stream the reply

Add "stream": true to get the reply word by word as server-sent events.

EventWhat to do
deltaAdd its text to what you show.
restartClear what you have shown; the agent is starting its answer again.
doneThe final reply, the same object a normal request returns.
errorThe reply could not be finished.

Read conversations

Needs a key with Read conversations. You see the conversations your agents had through the API.

GET/v1/agents/{agent_id}/conversations

Newest first, 20 at a time. Pass next_cursor back as ?cursor= for the next page.

GET/v1/agents/{agent_id}/conversations/{conversation_id}/messages

Every message in one conversation, oldest first.

Rate an answer

Pass on your customer's thumbs up or down for an answer, using its message_id. Send helpful or not_helpful; rating again replaces the earlier rating. It needs the Chat permission.

Example
curl -X PATCH \
  https://api.cevanos.ai/v1/agents/AGENT_ID/conversations/CONVERSATION_ID/messages/MESSAGE_ID/feedback \
  -H "Authorization: Bearer $CEVANOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rating": "helpful"}'

As in the chat widget, helpful on the last answer closes the conversation.

Credits and limits

Same credits as your workspace

Each reply uses credits from your plan, like any other chat. usage.credits tells you how many. API usage is shown under Plans and billing.

60 requests a minute

Per key. Responses carry X-RateLimit-Remaining and X-RateLimit-Reset. Over the limit, wait Retry-After seconds.

Errors

Errors come back as { "error": { "code": "…", "message": "…" } }. The ones you'll meet:

StatusCodeMeaning
401unauthorizedMissing, wrong or revoked key.
403missing_scopeThe key can't do this. Tick it when you create the key.
403feature_not_in_planYour plan doesn't include the API.
404agent_not_foundThis agent isn't on the key.
404message_not_foundNot an agent answer in that conversation.
409conversation_not_ongoingThat conversation ended. Start a new one.
429rate_limitedToo many requests. Wait and retry.

Keep your key safe

  • Use it only on your server. Never put it in a web page or a mobile app.
  • One key per app, so you can replace one without touching the others.
  • If a key leaks, rotate it or revoke it in Settings → API keys. The old key stops working straight away.

Ready to try it?

Create a key and send your first message in a couple of minutes.

Create an API key