ResoneraDocs

Manage agents

Create, update, and delete agents with the API.

You can configure agents in the dashboard's Agent Studio or with the API. Use the API to manage many similar agents, such as one per branch, or to keep agent configuration in version control.

Before you begin

  • An API key with the agents:read scope to read agents, and agents:write to change them.

Choose a voice

GET /voices lists the available voices and does not require an API key. Filter by language with language_code:

curl "https://api.resonera.ai/v1/voices?language_code=hi-IN"
FieldDescription
voice_nameThe value to set on the agent.
language_codeThe voice's language, or mul for a multilingual voice. The language_code filter includes multilingual voices that speak the requested language.
previewsFor multilingual voices, a sample clip for each supported language.
supports_code_switchingtrue if the voice handles mixed-language speech, such as Hinglish.
demo_urlA sample clip of the voice.

Create an agent

curl -X POST https://api.resonera.ai/v1/agents \
  -H "X-API-Key: $RESONERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Neha",
    "voice_name": "neha_chariot",
    "greeting": "Namaste, this is Neha calling from Acme Dental.",
    "call_purpose": "Confirm tomorrow'\''s appointment",
    "prompt": "You are Neha from Acme Dental in Pune. Confirm the patient'\''s appointment for tomorrow. If they cannot attend, offer a callback to reschedule. Do not discuss treatment or prices.",
    "tools": ["schedule_callback", "take_message", "summarize_call"]
  }'

The response is the new agent, including its id.

language defaults to the voice's language. Multilingual voices have no default language: set language explicitly, or the agent speaks English (India).

Prompt guidelines

GuidelineExample
Identify the agent and the business it represents, in the second person."You are Neha from Acme Dental."
State one goal for the call."Confirm the patient's appointment for tomorrow."
List required and prohibited behavior."Do not quote prices."
Keep reference material out of the prompt.Attach price lists and FAQs as knowledge base files with kb_item_ids.
Move situation-specific procedures into skills.Refund and escalation procedures as skills, attached with skill_ids.

Resonera adds language, tone, and call-ending rules to every agent automatically. Do not repeat them in the prompt.

Update an agent

Send only the fields to change. Changes apply from the agent's next call. Calls in progress are not affected.

curl -X PATCH https://api.resonera.ai/v1/agents/$AGENT_ID \
  -H "X-API-Key: $RESONERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"greeting": "Hi, this is Neha from Acme Dental."}'

Configure call transfer

When the transfer_call tool is enabled, the agent transfers callers who ask for a person to the number in transfer_to. The number is accepted in any common format and stored in E.164 format.

curl -X PATCH https://api.resonera.ai/v1/agents/$AGENT_ID \
  -H "X-API-Key: $RESONERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"transfer_to": "+91 98765 43210"}'

The agent asks the caller to hold and calls the transfer number from the same line. When the call is answered, the agent stops speaking. If the call is not answered, the agent continues the conversation. Without a transfer_to number, the agent takes a message instead. To remove the number, set transfer_to to null or an empty string.

Call transfer requires the Live agent handoff add-on.

Configure the recording notice

Campaign calls are recorded, and the agent states this at the start of the call. recording_purpose sets the wording:

ValueNotice
quality (default)"This call is recorded for quality purposes."
quality_training"This call is recorded for quality and training purposes." Use this value when recordings are used to train your staff.

If the agent's greeting already mentions recording, the greeting is used as written.

Activate an inbound agent

An agent with "direction": "inbound" answers calls to a phone number. Assign the agent to a number in the dashboard, then set its status to active:

curl -X PATCH https://api.resonera.ai/v1/agents/$AGENT_ID \
  -H "X-API-Key: $RESONERA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "active"}'

If your plan's limit on active agents is reached, the request returns 402.

Delete an agent

DELETE /agents/{agent_id} deletes the agent. Its calls, transcripts, and campaigns are kept, with agent_id set to null.

Plan limits

Agents count toward your plan's agent limit, and an agent's language must be included in your plan. Requests that exceed a limit return 402, with error.limit set to the limit reached, such as agent_limit_exceeded or language_not_allowed.

Next steps

On this page