Authorization: Bearer <key> or X-API-Key); every call sees only your account. The MCP server exposes the same operations as tools.
Agents
GET /v1/agents
Your agents, newest first: id, name, description, voice, language, first_message, created_at, updated_at.
POST /v1/agents
Creates an agent. It can take web calls at once; assign a phone number to give it a line.
Settings, merged into the agent’s configuration (a setting sent as
null goes back to its default):
Tools, integrations (CRM, calendar, call transfer) and the language model are set in the dashboard;
GET shows them in config and the API leaves them as they are. An unknown setting answers 400 with the list above.
201 with the agent.
GET /v1/agents/{id}
One agent in full, with its prompt and its whole config (your own language-model key, if set, shows as "(set)").
PATCH /v1/agents/{id}
Changes the fields you send, with the same fields and settings as POST; settings are merged, never replacing the rest of the configuration. Takes effect from the agent’s next call.
DELETE /v1/agents/{id}?confirm_name=<name>
Deletes the agent with its conversations, knowledge documents and evaluation rules; its phone numbers stay yours, unassigned. confirm_name must be the agent’s exact name. Cannot be undone.
Conversations
GET /v1/conversations
Your calls, newest first. Query: agent_id (one agent’s), limit (1–100, default 20), before (RFC 3339 time, to page back).
Each: id, agent_id, agent_name, created_at, duration_seconds, channel (web or phone), caller (phone), summary, sentiment (−1 to 1), flagged (failed an evaluation rule), has_recording.
GET /v1/conversations/{id}
One call, adding the transcript, the evaluation results and the data_fields extracted from it.
Balance
GET /v1/account/balance
{"balance_usd": 18.42, "billing_mode": "wallet", "top_up": "https://app.lokutor.com/billing", "prices": "https://api.lokutor.com/v1/pricing"}