Skip to main content

Overview

An agent defines the AI persona that handles calls and widget interactions. It holds the system prompt, voice configuration, and language settings. Create one agent per use case and reuse it across calls, widgets, and workflows. All provider and model identifiers are aliased — you will never see internal provider names. Use the alias values returned by the API when updating agent settings. Required scopes: agents:read (read operations), agents:write (create/update)

GET /v1/agents/voices

Returns available voice providers and their supported models and voices. Use these values when updating an agent’s voice configuration.
200 OK
Common errors: 403 missing agents:read scope

GET /v1/agents

Returns all agents available to your organization.
200 OK
Common errors: 403 missing agents:read scope · 404 key or org context not found

POST /v1/agents

Creates a new conversational agent for your organization, configured from a short business description rather than a raw prompt — the system generates the agent’s prompt and voice setup from these fields. To build a one-way announcer agent instead (plays a message, doesn’t converse), use POST /v1/agents/announcer below. Request body
201 Created
Common errors: 400 validation error (missing required fields) · 403 missing agents:write scope

GET /v1/agents/{id}

Returns a single agent by ID.
200 OK
Common errors: 403 missing agents:read scope · 404 agent not found

PATCH /v1/agents/{id}

Replaces an agent’s prompt, name, language, and reasoning model. Unlike POST /v1/agents, this takes the finished system_prompt and first_message directly rather than generating them — fetch the agent first with GET /v1/agents/{id} if you want to edit its existing prompt rather than overwrite it blind.
This endpoint requires the agent id in both the URL path and the request body. Omitting it from the body will return a 400 validation error.
Request body
200 OK
Common errors: 400 validation error (check id is in body) · 403 missing agents:write scope · 404 agent not found

PATCH field reference


Announcer agents

An announcer agent is a one-way broadcast agent: it dials out, speaks a message (text-to-speech or pre-recorded audio), and hangs up — it never listens for or acts on caller audio. Announcer agents are created and configured with the endpoints below, then allocated to a purchased number and dialed out with the Phone API (POST /v1/phone/allocate-assistant, POST /v1/phone/announce, POST /v1/phone/schedule-announcer-campaign). Announcer agents are a distinct agent mode — they aren’t created or updated through POST /v1/agents / PATCH /v1/agents/{id} above, and a regular conversational agent can’t be converted into one.

POST /v1/agents/announcer

Creates a new announcer agent. Pass templateId to seed it from a built-in or custom template (see GET /v1/agents/announcer-templates below); omit it to start blank and configure the message yourself.
201 Created
Common errors: 400 validation error · 403 missing agents:write scope

GET /v1/agents/announcer-templates

Returns built-in and organization-accessible announcer templates, each with a preconfigured message, voice, and language.
200 OK
Common errors: 403 missing agents:read scope

POST /v1/agents/{id}/announcer-template

Applies a template’s message, voice, and language configuration to an existing announcer agent, replacing its current configuration.
200 OK
Common errors: 400 invalid or inaccessible templateId, or id is not an announcer agent · 403 missing agents:write scope · 404 agent not found

PUT /v1/agents/{id}/announcer-message

Sets the announcer message for an agent. Set personalized: true and include {placeholders} in the message (e.g. {name}, {amount}) to enable personalized campaigns via POST /v1/phone/schedule-announcer-campaign — the placeholders become the columns of that campaign’s contact sheet. The message and the uploaded audio are stored separately, and saving one never changes the other. Send source (message or upload) to choose which one the agent uses on calls; when source is upload, message is optional, so you can switch to an already-uploaded file without resending it. If source is omitted, the agent keeps using whichever it used before, except that a personalized: true message makes the message active.
200 OK
Common errors: 400 validation error, message exceeds the length allowed on the organization’s plan, source is upload but no audio has been uploaded, or source is message but no message is saved · 403 missing agents:write scope · 404 agent not found

POST /v1/agents/{id}/announcer-audio/generate

Synthesizes the announcer message to speech with the given voice and sets it as the agent’s announcement audio. Also sets the message and personalized flag, same as the endpoint above, and makes the message the agent’s active configuration — use this instead when you want to hear/preview the generated audio in the same call. Any uploaded audio is kept.
200 OK
voiceProvider uses the same aliases as GET /v1/agents/voices (e.g. indigenius_voice_model_1, indigenius_voice_model_2) — never the internal provider name. Common errors: 400 validation error, or message exceeds the length allowed on the organization’s plan · 403 missing agents:write scope · 404 agent not found

POST /v1/agents/{id}/announcer-audio/upload

Uploads a pre-recorded audio file (.mp3, .wav, .ogg, or .m4a) and makes it the audio the agent plays. The uploaded file is stored separately from the message; call PUT /v1/agents/{id}/announcer-message with source: "message" to switch back to the message. Personalized campaigns use the message, so they require the message to be the active configuration.
200 OK
Common errors: 400 no file uploaded, unsupported file type, or file exceeds the size allowed on the organization’s plan · 403 missing agents:write scope · 404 agent not found

Personalized campaign flow

To run a personalized announcer campaign end-to-end:
  1. POST /v1/agents/announcer — create the agent.
  2. PUT /v1/agents/{id}/announcer-message (or announcer-audio/generate) with personalized: true and {placeholders} in the message.
  3. POST /v1/phone/allocate-assistant — allocate the agent as the number’s outboundAssistantId. An inboundAssistantId is still required by that endpoint even for an announcer-only number; use any conversational agent you don’t otherwise route inbound calls to.
  4. GET /v1/phone/announcer/{phoneId}/campaign-template — download the contact sheet template; its columns are generated from the placeholders set in step 2.
  5. POST /v1/phone/schedule-announcer-campaign — upload the filled sheet to schedule the campaign.
See the Phone API for details on steps 3–5.
  1. Create an agent with your base persona (POST /v1/agents).
  2. Copy the returned id.
  3. List available voices with GET /v1/agents/voices to get valid provider and model aliases.
  4. Use the id when creating widgets, calls, or workflows.
  5. Update prompts and model settings over time with PATCH /v1/agents/{id}.