Agents
Agents API
Create and manage the AI voice agents that handle calls. See Building agents for the concepts.
Agents are exposed on both API surfaces (see Two API surfaces):
- Dashboard API (
/api/agents) — full CRUD, the complete agent object,{ success, data }envelope. Auth with a user JWT +X-Org-Idor an API key. - Integration API (
/api/v1/agents) — a read‑only slim list for dropdowns in automation tools, flat JSON,X-API-Keyonly.
Dashboard API
All endpoints are organization‑scoped — authenticate with an API key (org implicit, no X-Org-Id needed) or a user JWT plus X-Org-Id.
Two things to know when using a key here:
- Writes need a privileged key.
POST,PUT,DELETEand version‑restore require a key with theowner,admin, ordeveloperrole. Aviewerormemberkey can read agents but gets403 — "This API key's role ('viewer') is read-only on this endpoint."Reads work with any valid key. - The AI builder routes are dashboard‑only.
/api/agents/copilot/*and/api/agents/{id}/simulate/*require a user JWT — they back interactive panels in the agent builder, not programmatic use. An API key gets401on those.
| Method | Path | Purpose |
|---|---|---|
GET | /api/agents | List your organization's agents (full objects) |
POST | /api/agents | Create an agent |
GET | /api/agents/{id} | Get one agent |
PUT | /api/agents/{id} | Update an agent |
DELETE | /api/agents/{id} | Soft‑delete an agent |
GET | /api/agents/{id}/stats | Call stats for an agent |
GET | /api/agents/{id}/versions | Version history (see Agent versioning) |
POST | /api/agents/{id}/versions/{version}/restore | Roll back to a version |
GET | /api/agents/{id}/versions/{version}/diff | Diff a version against current |
GET | /api/agents/{id}/versions/{version}/perf | Per‑version performance |
GET | /api/agents/public | List publicly‑listed agents (no auth) |
GET /api/agents supports search, isActive, limit (default 50), and offset query params. search and isActive are mutually exclusive — when a search term is present it takes the search path and the isActive filter is ignored.
List agents
curl "https://api.telenow.ai/api/agents?isActive=true&limit=50" \
-H "X-API-Key: vai_live_…"
{
"success": true,
"data": { "agents": [ /* full agent objects */ ], "total": 12, "limit": 50, "offset": 0 }
}
Create an agent
POST /api/agents
An agent is assembled from four provider slots (LLM, STT, TTS, telephony). Use the Catalog API (GET /api/catalog) to discover valid provider, model, and voice identifiers.
curl -X POST https://api.telenow.ai/api/agents \
-H "X-API-Key: vai_live_…" \
-H "Content-Type: application/json" \
-d '{
"name": "Support Bot",
"systemPrompt": "You are Acme'\''s friendly support agent…",
"llmProvider": "openai",
"llmModel": "gpt-4o-mini",
"sttProvider": "deepgram",
"ttsProvider": "elevenlabs",
"ttsVoice": "rachel",
"sessionConfig": {}
}'
Request fields
Field names are camelCase.
| Field | Type | Notes |
|---|---|---|
name | string | Required. Display name |
llmProvider, llmModel | string | Required. From the catalog |
sttProvider | string | Required. Speech‑to‑text provider |
ttsProvider, ttsVoice | string | Required. Text‑to‑speech provider + voice |
sessionConfig | object | Required. Runtime config ({} is valid) |
systemPrompt | string | Persona/instructions |
description | string | Optional |
isPublic | boolean | List under /api/agents/public (default false) |
llmConfig, sttConfig, ttsConfig | object | Optional provider‑specific settings |
telephonyProvider, telephonyConfig | string / object | Optional default carrier |
metadata | object | Extra config — notably metadata.tools (see below) |
tags | array/object | Optional labels |
Response: 201 Created with { "success": true, "data": { /* the agent */ } }.
Tools & custom models
- Tools (function calling, including call transfer) are defined in
metadata.tools— see Tools & function calling. - Custom / self‑hosted models are configured via
llmProvider: "customllm"(OpenAI‑compatible) or"customapi"(your agentic backend) plusllmConfig— see Custom LLM & API. - Context variables (
{placeholder}substitution) are configured inmetadata— see Context variables.
Update an agent
PUT /api/agents/{id}
Send only the fields you want to change (all are optional on update, including isActive to enable/disable the agent). Returns the updated agent. Every update creates a new version — see Agent versioning.
Get / delete / stats
GET /api/agents/{id} # the agent (public agents are viewable unauthenticated)
DELETE /api/agents/{id} # soft-deletes the agent
GET /api/agents/{id}/stats # totals: sessions, messages, duration
Integration API (slim list)
GET /api/v1/agents
Built for dynamic dropdowns in automation platforms (Zapier, Make, n8n, viaSocket). Authenticate with X-API-Key only — the org comes from the key. The response is flat JSON (no success/data envelope) and a slim projection: it returns ids and labels only. The full system prompt and provider configuration are deliberately excluded so they're never shipped to a third‑party app.
curl "https://api.telenow.ai/api/v1/agents?is_active=true&limit=100" \
-H "X-API-Key: vai_live_…"
{
"agents": [
{
"id": "…",
"name": "Support Bot",
"description": "Handles tier‑1 support",
"is_active": true,
"created_at": "2026-01-01T12:00:00Z",
"updated_at": "2026-01-02T09:30:00Z"
}
],
"total": 12
}
Query params: is_active (also accepts isActive / active), limit (default 100, max 200), offset (default 0).
Full /api/v1 surface
The Integration API exposes a curated slice of functionality. All endpoints take X-API-Key and return flat JSON.
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/me | Connection test — returns org_id, org_name, key_id, key_name, key_role |
GET | /api/v1/hooks | List REST‑hook subscriptions (filter with ?source=) |
POST | /api/v1/hooks | Subscribe a target_url to events |
DELETE | /api/v1/hooks/{id} | Unsubscribe (idempotent) |
GET | /api/v1/agents | Slim agent list (this page) |
GET | /api/v1/numbers | Slim owned‑number list |
GET | /api/v1/calls | Call history (filters: agent_id, status, sort, limit, offset) |
GET | /api/v1/calls/{id} | One call + transcript |
GET | /api/v1/events/sample | Latest real (or canned) payload for an event type (?type=) |
POST | /api/v1/chat | One chat turn (creates the session on first call) |
GET | /api/v1/chat/{id}/messages | Full transcript of a chat session |
POST | /api/v1/chat/{id}/end | End a chat session (idempotent) |
See Automation platforms for connector setup, Webhooks for hooks, and the Chat API guide for the /chat endpoints.
Using an agent
Once created, attach the agent to a phone number, start a web call, place an outbound call, publish it, or talk to it over text via the Chat API.
Tips
- Validate provider/model/voice ids against the Catalog before creating an agent — bad ids fail at create time.
- Use
/api/v1/meas a cheap health check that a key is valid and to read its role before attempting writes. - The slim
/api/v1/agentslist is the right source for "pick an agent" dropdowns; use the DashboardGET /api/agents/{id}when you actually need the full configuration.