Skip to content
AI agents

Agents API

Talk to an agent from your own app, create and change agents, start a call and read conversations from code.


The same API key as the speech API (x-api-key), and the same error shape. Everything here works on the workspace the key belongs to. Field names are the ones the dashboard uses (systemPrompt, firstMessage).

RequestWhat it does
GET /v1/agentsYour agents.
POST /v1/agentsMake an agent. It starts as a draft.
GET /v1/agents/{id}One agent.
PATCH /v1/agents/{id}Change some of its settings. Each change is saved as a version.
POST /v1/agents/{id}/messagesSend a person's message to the agent and get its reply: chat in your own app.
GET /v1/conversationsCalls and chats, newest first, 50 at a time. Filter with agent_id, channel, caller; page with before (the last one's lastAt).
GET /v1/conversations/{id}One conversation with its transcript and the webhooks it called.
POST /v1/callsRing one person from one of your numbers; that number's agent talks to them.
GET /v1/calls/{id}Where that call stands.

Make an agent

POST

/v1/agents

FieldTypeDescription
namerequiredstringShown in the dashboard and the conversation log.
systemPromptstringWho the agent is, what it helps with and what it must never do.
firstMessagestringWhat it says when a conversation starts.
languagesstring[]The languages it speaks, main one first, e.g. ["en-IN", "hi-IN"].
voiceIdstringA voice from Models and voices, e.g. voice:shubh.
behaviourobjectTone, reply length, interruptions, silences and the other settings on the Behaviour tab.
statusstringdraft (default), active or paused.
curl -X POST https://lipivo.com/v1/agents \
  -H "x-api-key: $LIPIVO_API_KEY" -H "content-type: application/json" \
  -d '{"name": "Priya", "languages": ["en-IN"],
       "systemPrompt": "You are Priya, the customer support assistant for ShopX...",
       "firstMessage": "Hello, this is Priya from ShopX. How can I help you today?"}'

The answer is {"agent": {...}} with its id. Webhooks, knowledge and phone numbers are added in the dashboard.

Talk to an agent from your app

POST

/v1/agents/{id}/messages

Chat with one of your agents from your own app, website backend or mobile app. Each user id you send keeps its own conversation, with the agent's memory of earlier messages, its knowledge, webhooks and rules. Call it from your server: the API key must never be in a browser or app. For a chat bubble on a web page, use the website widget instead.

FieldTypeDescription
userrequiredstringYour id for the person: letters, digits and _ . : @ + -, up to 100 characters. One conversation per id.
textstringWhat they wrote, up to 4,000 characters. Required unless start is true.
startbooleanBegin a new conversation: the reply is the agent's first message, and earlier messages are forgotten.
curl -X POST https://lipivo.com/v1/agents/AGENT_ID/messages \
  -H "x-api-key: $LIPIVO_API_KEY" -H "content-type: application/json" \
  -d '{"user": "customer-42", "text": "Meri delivery kab aayegi?"}'

The answer is {"user": "customer-42", "message": "…", "conversationId": "…"}. It also has takenOver: true when a teammate has taken the chat over in the Inbox (their replies are in the conversation), and ended: true when the agent ended the conversation. The conversation shows in the dashboard under the channel api. Replies use credits for the agent's AI model, like any chat; with no credits left the answer is 402 INSUFFICIENT_CREDITS. A wrong agent id is 404.

Start a call

POST

/v1/calls

FieldTypeDescription
connectionIdrequiredstringOne of your phone numbers (its id, from the Phone numbers page). Its agent takes the call.
torequiredstringWho to ring. A 10-digit number is taken as Indian.
namestringThe person's name; {{name}} in the agent's first message becomes it.
detailsobjectOther facts the agent is given about the person, as text values.
consentrequiredtrueYou confirm the person agreed to be called.
curl -X POST https://lipivo.com/v1/calls \
  -H "x-api-key: $LIPIVO_API_KEY" -H "content-type: application/json" \
  -d '{"connectionId": "…", "to": "+919800000001", "name": "Ravi",
       "details": {"order": "A17", "amount": "₹1,250"}, "consent": true}'

A call follows the same rules as a call list in the dashboard: it is placed between 9:00 and 21:00 India time, never to a number on your do-not-call list, and only while you have credits and a free line. Poll GET /v1/calls/{id} for its status, or read the conversation once it has happened.