Skip to main content

Voice Agents API

The Voice Agents API creates, reads, updates and deletes voice agents from your own system. Send instructions and tools, and everything else takes the platform defaults, the same ones New agent uses in the builder. To change an agent later, send only the part that changes: one tool, one parameter or one setting.

When to Use This​

  • Create an agent for each of your customers from your own product.
  • Keep an agent's instructions and tools in sync with your system.
  • Set the values its {{variable.NAME}} placeholders fill in, such as a store name or an API key.
  • Copy a tool from one agent to another.
  • Delete agents you no longer need.

Prerequisites​

  • An API Key with the Voice agents scope, or the older Agent Creator scope.
  • The Voice agents scope gives no access to calls, dispatch or campaigns, and the Calls and Campaigns scopes give no access to this API. A key that builds agents and also calls them needs both, for example Voice agents and Calls.
  • The key's Agent Access sets which agents it can read, change and delete:
    • All Agents: every voice agent in the workspace.
    • Specific agents: only the agents on the list. List agents leaves the others out, and a request for one of them fails with 403. An agent the key creates is added to its list, so the key can keep managing what it builds.

Authentication​

Every request must include your key, in the api-key header or as a Bearer token. See API Keys for how to create one. The examples on this page use api-key.

api-key: sk_<your-secret>

or

Authorization: Bearer sk_<your-secret>

Every request made with one of your keys is recorded in Request Logs, including the failures.

Base path

These endpoints are served at the root of your DronaHQ host: https://<your-dronahq-host>/voice/agents. There is no /api/v1 prefix.

Responses contain your secrets

An agent is returned as stored, including the secrets you put in it, such as a fixed x-api-key header on a tool. The exceptions: webhook auth tokens come back as <redacted>, and variables masked. Call this API from your backend, and don't log full responses.

Endpoints​

MethodPathWhat it does
GET/voice/agentsList agents
GET/voice/agents/{agent_uuid}Get an agent, or one part of it
POST/voice/agentsCreate an agent
PATCH/voice/agents/{agent_uuid}Update an agent
DELETE/voice/agents/{agent_uuid}Delete an agent
GET/voice/agents/{agent_uuid}/variablesList variables
PUT/voice/agents/{agent_uuid}/variables/{name}Set a variable
DELETE/voice/agents/{agent_uuid}/variables/{name}Delete a variable
GET/voice/llm_modelsList LLM models for config.llm
GET/voice/voicesList voices for config.voice_config.voiceId

agent_uuid is the id other APIs call agent_id, for example dispatch.

Draft and published​

Like the builder, create and update change the agent's draft, and Get an agent reads it: its instructions, tools and config are the draft's.

Where the agent runsUses
The builder's playground and test callsThe draft, so changes show at once
Inbound numbers, dispatch, campaigns and shared web widgetsThe published version

So while the draft has changes that aren't published yet, what Get an agent returns is not what inbound calls, dispatch and campaigns run. Publish to make them the same.

A new agent has no published version. Dispatch and campaigns refuse it until it is published, unless dispatch sends "agent_version": "draft".

To publish, send "publish": true on create or update, or click Publish in the builder. Each publish saves a new minor version. The publish field of the response says what happened:

publishMeaning
nullYou didn't ask to publish
{"published": true, "version": "0.1.0", "version_uuid": "…", "release_type": "minor", "release_notes": "…"}Published
{"published": false, "error": "…"}The publish failed. Your changes were saved to the draft first, so they are kept. Retry with {"publish": true}. An unexpected failure reads "Publish failed; the draft was saved."

List agents​

GET /voice/agents

Returns every voice agent the key can see, most recently changed first. There are no parameters and no pagination. Each item's fields mean the same as in Get an agent.

curl https://<your-dronahq-host>/voice/agents \
-H "api-key: sk_your-generated-secret-here"

Response — 200 OK​

{
"status": "success",
"count": 1,
"agents": [
{
"agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a",
"name": "Order Helper",
"description": "",
"published": true,
"last_published_version": "0.1.0",
"last_published_at": "2026-11-10T09:12:45.318204+00:00",
"created_at": "2026-11-10T09:12:44.120394+00:00",
"updated_at": "2026-11-10T09:12:44.120394+00:00"
}
]
}

Get an agent​

GET /voice/agents/{agent_uuid}

Returns the agent's draft. See Draft and published.

curl https://<your-dronahq-host>/voice/agents/3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a \
-H "api-key: sk_your-generated-secret-here"

Response — 200 OK​

{
"status": "success",
"agent": {
"agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a",
"name": "Order Helper",
"description": "",
"published": true,
"last_published_version": "0.1.0",
"last_published_version_uuid": "a6f0d2c4-1b3e-4d5f-8a7b-9c0e1f2a3b4c",
"last_published_at": "2026-11-10T09:12:45.318204+00:00",
"last_published_by": "api-key:Production backend",
"created_by": "api-key:Production backend",
"created_at": "2026-11-10T09:12:44.120394+00:00",
"updated_by": "api-key:Production backend",
"updated_at": "2026-11-10T09:12:44.120394+00:00",
"instructions": "You help callers check their order status. …",
"tools": [
{ "id": "f4513ecc-50e6-41c5-8961-27e5ece2824c", "name": "get_order_status", "tool_type": "http", "…": "…" }
],
"variables": [
{ "name": "store_name", "value": "Ac***re", "created_at": "2026-11-10T09:12:44.120394+00:00", "updated_at": "2026-11-10T09:12:44.120394+00:00" }
],
"config": {
"llm": { "provider": "…", "model": "…", "temperature": 0.7, "…": "…" },
"voice_config": { "…": "…" },
"transcriber": { "…": "…" },
"call": { "conversationSettings": { "…": "…" }, "…": "…" },
"knowledge_base": {},
"memory": {},
"runtime_behaviour": { "firstMessage": "Hi, this is Order Helper. How can I help?", "…": "…" },
"avatar": { "…": "…" },
"privacy": { "…": "…" },
"webhook_settings": { "…": "…" },
"structured_outputs_json": []
}
}
}
FieldDescription
publishedtrue while the agent has a published version
last_published_version, last_published_atThe latest publish, or null
last_published_version_uuidThe latest publish's id, or null. It matches the publish.version_uuid your publish returned; a different one means the agent was published again, or rolled back, in the builder
created_by, updated_by, last_published_byWho created the agent, who last changed it and who last published it (null if no one has). A change made through this API reads api-key:<key name>. A change made in the builder shows the person's email
created_at, updated_at, last_published_atISO 8601 in UTC, with a +00:00 offset
instructionsThe system prompt. The same value as config.llm.system_instructions
variablesThe agent's variables, oldest first, with masked values
toolsEach tool exactly as stored. You can send one back to the API, for example to copy it to another agent
configEvery other setting, as the builder shows it: a setting the agent has never had a value for reads as its default. See Config

Get one part with query​

Add ?query= to get one piece of the agent instead of the whole document. The path is read against the agent object above.

curl -G https://<your-dronahq-host>/voice/agents/3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a \
-H "api-key: sk_your-generated-secret-here" \
--data-urlencode "query=tools[name=get_order_status].metadata.url"
{
"status": "success",
"agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a",
"query": "tools[name=get_order_status].metadata.url",
"result": "https://api.example.com/orders/{{order_number}}"
}

result is exactly what the path points to: an object, an array, a string, a number, a boolean or null.

WriteTo getExample
key.keyA field inside an objectconfig.llm.model
[n] or .nThe item at position n, from 0. A negative n counts from the endtools[0], tools.0, tools[-1]
[field=value]The first item whose field equals value, compared as texttools[id=f4513ecc-…], tools[active=true]
[field="value"]The same, for a value with spaces or ] in ittools[name="order status"]
["key"]A field whose name has ., [ or ] in itproperties["a.b"]
[*]Every item. The rest of the path applies to each, and the result is a listtools[*].name
  • After [*], items that lack the rest of the path are skipped. tools[*].metadata.url lists the URLs of the tools that have one.
  • Without [*], a step that matches nothing is a 404 that names the step in detail.at. A typo never comes back as null.
  • A path can be up to 500 characters and 32 steps. URL-encode it: curl -G --data-urlencode does it for you.
HTTP statusCause
400The path is empty, malformed, or longer than 32 steps. detail.message says what is wrong
404The path matched nothing. detail.at names the step that failed
422query is longer than 500 characters

Create an agent​

POST /voice/agents

Every field is optional. What you leave out takes the platform default.

Body​

FieldTypeRequiredDescription
namestringNoDisplay name, up to 128 characters. Left out or empty: New_Voice_Agent
descriptionstringNoShown in the agent list. Default ""
instructionsstringNoThe system prompt. Default: the platform's prompt. If you also send config.llm.system_instructions, instructions wins
toolsarrayNoTools to create. See Tools
configobjectNoAny other setting, deep-merged onto the defaults. See Config
variablesobjectNo{name: value}: the values {{variable.NAME}} fills in. See Variables
publishbooleanNotrue publishes the agent once it is created. Default false

An unknown top-level field is rejected with 422, so a misspelt field fails loudly.

Example request​

curl -X POST https://<your-dronahq-host>/voice/agents \
-H "api-key: sk_your-generated-secret-here" \
-H "Content-Type: application/json" \
-d '{
"name": "Order Helper",
"instructions": "You help callers check their order status. Ask for the order number, then call get_order_status.",
"tools": [
{
"name": "get_order_status",
"description": "Look up an order by its number. Returns the order status and the delivery date.",
"method": "GET",
"url": "https://api.example.com/orders/{{order_number}}",
"parameters": [
{ "name": "order_number", "in": "path", "required": true, "description": "The order number the caller gives, digits only." },
{ "name": "x-api-key", "in": "header", "value": "<your-api-key>" }
]
}
],
"config": {
"runtime_behaviour": { "speakingBehaviourType": "custom", "firstMessage": "Hi, this is Order Helper. How can I help?" }
},
"publish": true
}'

Response — 201 Created​

{
"status": "success",
"agent": { "agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a", "name": "Order Helper", "…": "…" },
"tools": { "added": ["get_order_status"], "updated": [], "removed": [] },
"variables": { "added": [], "updated": [], "removed": [] },
"publish": { "published": true, "version": "0.1.0", "…": "…" }
}

agent has the same shape as Get an agent. Save agent.agent_uuid: every later request uses it.

A short response​

The whole agent runs to several kilobytes. Add ?response=summary to a create or an update to get the agent as List agents shows it instead, plus publish_state:

{
"status": "success",
"agent": {
"agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a",
"name": "Order Helper",
"description": "",
"published": true,
"last_published_version": "0.1.0",
"last_published_at": "2026-11-19T10:02:12.318204+00:00",
"created_at": "2026-11-19T10:02:11.120394+00:00",
"updated_at": "2026-11-19T10:02:11.120394+00:00"
},
"tools": { "added": ["get_order_status"], "updated": [], "removed": [] },
"variables": { "added": [], "updated": [], "removed": [] },
"publish": { "published": true, "version": "0.1.0", "…": "…" },
"publish_state": "up_to_date"
}
publish_stateMeans
not_publishedThe agent has never been published
unpublished_changesThe draft differs from the published version, which live calls still run
up_to_dateLive calls run what the draft holds. Variables aren't compared, so publish after changing them

full, the whole agent, is the default. Any other value is a 422.


Tools​

A tool lets the agent call your API during a conversation. The agent reads the tool's description to decide when to call it, and each parameter's description to decide what to send.

A tool entry takes one of two forms:

  • The HTTP form, without tool_type: the flat fields below. Use it to create and edit HTTP tools.
  • The raw form, with tool_type: a tool exactly as Get an agent returns it. Use it to copy a tool, or for tool types the HTTP form doesn't cover. See Raw tool entries.

HTTP tool fields​

FieldTypeRequiredDescription
namestringAlwaysThe function name the agent sees. It starts with a letter or _, then has only letters, digits, _ and -, up to 64 characters. It must be unique within the agent, ignoring case. knowledgebase_search, DronahqEndCall, DronahqTransferCall, DronahqSendDtmf and DronahqSendText are reserved, in any case
descriptionstringNew toolsWhen to call the tool and what it returns
urlstringNew toolsThe endpoint to call. Put a path parameter in it as {{name}}
methodstringNoGET (default), POST, PUT, PATCH, DELETE or HEAD
timeout_msintegerNo1000 to 120000. Default 10000
parametersarrayNoThe tool's inputs. See Parameter fields
static_bodyobjectNoFixed fields added to every JSON body. Values can be strings, numbers, booleans or objects, not arrays. They keep their JSON type
activebooleanNofalse keeps the tool but hides it from the agent. Default true
voice_configurationobjectNoWhat the agent says while the tool runs. Replaced whole when sent
bgtoolcall_configurationobjectNoThe background sound while the tool runs. Default {"sound": "keyboard2", "volume": 0.3, "customUrl": ""}. Replaced whole when sent
idstringUpdate onlyMatch the tool by id instead of name
new_namestringUpdate onlyRename the tool
remove_parametersarray of stringsUpdate onlyNames of parameters to delete

Unknown fields on a tool or a parameter are rejected with 422.

Parameter fields​

FieldTypeDescription
namestringRequired, up to 128 characters. The wire name (header name, query key or body key) and the argument name the agent sees
instringbody (default), query, header or path. A path parameter isn't sent on its own: use it in url as {{name}}
typestringstring (default), number (the same as integer), boolean, enum, datetime, object or array
descriptionstringWhat the agent should put here
requiredbooleanThe agent must fill it before calling the tool. Default false
valueanyA fixed value. With agent_decides: true, the default used when the agent leaves it out. Only for single values: put fixed objects and arrays in static_body
agent_decidesbooleantrue: the agent fills the value. false: value is always sent. Left out, it is true when there is no value and false when there is one
enumarray of stringsThe allowed values. Required when type is enum
items_typestringThe item type of an array. Default string
propertiesarray of parametersThe child fields of an object, or of an array whose items_type is object. Children ignore in
Fixed values are sent as strings

A fixed parameter value is always sent as text, so 5 arrives as "5". To send a real number, boolean or object, put it in static_body.

Raw tool entries​

An entry with a tool_type is stored as you send it.

  • tool_type must be a type the platform supports. The error for an unknown one lists them.
  • A missing id, key or active, and the default voice settings, are filled in. Apart from the name rules, nothing else is checked.
  • On update, a raw entry is matched like any other: by id if it has one, otherwise by name. A match is deep-merged onto the stored tool. With no match, the tool is added, and an id this agent doesn't have is kept.
  • To change a tool that isn't an HTTP tool, use the raw form. The HTTP form refuses it with 422.
  • Keep a tool's key as it is: for some tool types it selects what the tool does. When a raw entry renames a tool, send the tool's current key with it, or the key is rebuilt from the new name.

Update an agent​

PATCH /voice/agents/{agent_uuid}

Changes only what you send. A field you leave out stays as it is.

Body​

FieldTypeDescription
namestringReplaced. 1 to 128 characters: "" is a 422, and a name of only spaces is ignored
descriptionstringReplaced
instructionsstringReplaced. If you also send config.llm.system_instructions, instructions wins
toolsarrayEach entry updates its matching tool, or is added. See below
remove_toolsarray of stringsTools to delete, by name or id
configobjectDeep-merged onto the current settings. See Config
variablesobjectEach name is set to its value, and null deletes it. Variables you leave out are kept. See Variables
add_knowledge_basesarray of stringsKnowledge bases to attach, by name, keeping the others. See Attach or detach one
remove_knowledge_basesarray of stringsKnowledge bases to detach, by name
add_structured_outputsarray of stringsStructured output ids to link, keeping the others
remove_structured_outputsarray of stringsStructured output ids to unlink
publishbooleantrue publishes the agent after the update

An unknown top-level field is rejected with 422. Every update, even an empty one, sets updated_at and updated_by.

Attach or detach one knowledge base or structured output​

Sending config.knowledge_base.consumed or config.structured_outputs_json replaces the whole list. To change one entry, use the add and remove fields:

{
"add_knowledge_bases": ["pricing_faq"],
"remove_structured_outputs": ["SO-12"]
}
  • Removes run first. Removing one the agent doesn't have is a 422. Adding one it already has changes nothing.
  • A knowledge base is added by its name from the Knowledge Bases API, with the settings the builder gives a newly attached one: its embedding model, the default lookup sound and message, and the agent's "run in background" setting. All of an agent's knowledge bases must use the same embedding model. A mix, or a name your workspace doesn't have, is a 422.
  • A structured output is added by id: one of your workspace's (SO-…) or a library entry (LSO-…). It goes at the end of the list.
  • A key limited to some agents can't attach a knowledge base or link an output that only other agents use.
  • Don't send both forms for one list in the same request: that is a 422.

If you send the whole consumed list yourself, give each entry its default_embedding_model (the embedding_model the Knowledge Bases API returns). Without it, every knowledge base search on the agent fails.

How tool changes are applied​

  1. remove_tools runs first. Each value is a tool's exact name or its id. One that matches no tool is a 422. So one request can remove a tool and add a new one with the same name.
  2. Each tools entry is then matched to a tool on the agent: by id when it has one, otherwise by name. Names match exactly, so Get_Order_Status doesn't match get_order_status.
  3. A match is updated.
    • The fields you send replace the old ones. The fields you leave out keep their values.
    • parameters merge by parameter name. A parameter you name keeps every field you don't send, and a new name is added. Sending a value without agent_decides makes the parameter fixed.
    • required: false takes a parameter out of the required list. remove_parameters deletes parameters.
    • static_body merges by key. A key set to null is removed.
  4. No match: the tool is added. A new HTTP tool needs description and url. An HTTP-form entry whose id isn't on the agent is a 422 (no tool with id). A raw entry with that id is added instead.
  5. name is required on every HTTP-form entry, even one matched by id. If it differs from the tool's current name, the tool is renamed. new_name also renames.
  6. All or nothing. If any entry is invalid, or two tools would share a name (ignoring case), nothing is saved.

"tools": [] changes nothing: it doesn't remove your tools. Use remove_tools for that.

If the change would take the agent over your plan's tool limit, the request fails with 403 and detail.upgrade_required: true. The limit is checked only when the number of tools grows.

Example: add a tool​

An entry whose name the agent doesn't have yet is created:

curl -X PATCH https://<your-dronahq-host>/voice/agents/3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a \
-H "api-key: sk_your-generated-secret-here" \
-H "Content-Type: application/json" \
-d '{
"tools": [
{
"name": "cancel_order",
"description": "Cancel an order the caller asks to cancel. Call it only after the caller confirms.",
"method": "POST",
"url": "https://api.example.com/orders/{{order_number}}/cancel",
"parameters": [
{ "name": "order_number", "in": "path", "required": true, "description": "The order number to cancel." },
{ "name": "x-api-key", "in": "header", "value": "<your-api-key>" }
]
}
]
}'

Example: change one parameter​

Only the x-api-key value changes. The rest of the tool stays as it is:

{ "tools": [ { "name": "get_order_status", "parameters": [ { "name": "x-api-key", "value": "<your-new-api-key>" } ] } ] }

Example: remove a tool​

curl -X PATCH https://<your-dronahq-host>/voice/agents/3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a \
-H "api-key: sk_your-generated-secret-here" \
-H "Content-Type: application/json" \
-d '{ "remove_tools": ["cancel_order"] }'

Copy a tool from another agent​

Read the tool from the source agent, then send the result unchanged in tools on the target agent:

curl -G https://<your-dronahq-host>/voice/agents/<source-agent-uuid> \
-H "api-key: sk_your-generated-secret-here" \
--data-urlencode "query=tools[name=get_order_status]"

curl -X PATCH https://<your-dronahq-host>/voice/agents/<target-agent-uuid> \
-H "api-key: sk_your-generated-secret-here" \
-H "Content-Type: application/json" \
-d '{ "tools": [ <the result object from the first request> ] }'
  • The copy keeps the tool's id, as duplicating an agent in the builder does.
  • If the target already has a tool with that id, for example because it was duplicated from the source, that tool is updated instead.
  • If the target already has a tool with the same name, the request fails with 422. Rename the copy by changing its name before you send it.
  • Agent variables the tool uses ({{variable.NAME}}) belong to each agent. Create them on the target agent too.

Response — 200 OK​

{
"status": "success",
"agent": { "…": "the whole agent, as in Get an agent" },
"changed": ["tools"],
"tools": { "added": ["cancel_order"], "updated": [], "removed": [] },
"variables": { "added": [], "updated": [], "removed": [] },
"publish": null
}

changed lists what the update actually changed: name, description, instructions, config.<section>, tools, variables. A value the agent already had doesn't count, so [] means nothing changed. With ?response=summary, agent is the short one and publish_state is added (see A short response).


Variables​

An agent's variables are the values {{variable.NAME}} fills in. They work in:

  • the instructions;
  • the greeting (runtime_behaviour.firstMessage);
  • tool URLs and fixed parameter values;
  • the pre-call and post-call webhooks.

A variable gives a placeholder its default value. Dispatch can override it for the calls it places with dynamic_variables, and a campaign can map a CSV column to it. A placeholder whose variable doesn't exist is left as written.

  • Names start with a letter or underscore and hold only letters, digits and underscores, up to 200 characters: customer_name, amount_due. Any other name is a 422.
  • Values are strings. They are stored encrypted. Every read returns them masked: the first two and last two characters (As***ma), or **** for four characters or fewer. No request returns a value in full.
Publish after you change a variable

Variables belong to the draft, like every other change. Live calls use the variables of the published version. Dispatch's dynamic_variables may only name variables of the version it calls; other names are dropped and listed in ignored_variables. The builder's unpublished-changes marker doesn't track variables, so a variable-only change doesn't show there.

With the rest of the agent​

Send variables on create or update. On an update, each name you send is set, null deletes one, and the variables you leave out are kept. They are saved with the rest of the request, so "publish": true publishes them too.

curl -X PATCH https://<your-dronahq-host>/voice/agents/3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a \
-H "api-key: sk_your-generated-secret-here" \
-H "Content-Type: application/json" \
-d '{
"instructions": "You call {{variable.customer_name}} about an unpaid bill of {{variable.amount_due}}.",
"variables": { "customer_name": "there", "amount_due": "your balance", "old_promo": null },
"publish": true
}'

The response's variables says what changed: {"added": [...], "updated": [...], "removed": [...]}. Setting a variable to the value it already has, or deleting one that doesn't exist, changes nothing and isn't listed.

List variables​

GET /voice/agents/{agent_uuid}/variables

{
"status": "success",
"agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a",
"count": 1,
"variables": [
{ "name": "store_name", "value": "Ac***re", "created_at": "2026-11-10T09:12:44.120394+00:00", "updated_at": "2026-11-10T09:12:44.120394+00:00" }
]
}

Set a variable​

PUT /voice/agents/{agent_uuid}/variables/{name} creates the variable, or replaces its value. The body is {"value": "..."}; an empty string is a value. It doesn't publish.

curl -X PUT https://<your-dronahq-host>/voice/agents/3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a/variables/store_name \
-H "api-key: sk_your-generated-secret-here" \
-H "Content-Type: application/json" \
-d '{ "value": "Acme Store, Pune" }'
{
"status": "success",
"agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a",
"variable": { "name": "store_name", "value": "Ac***ne", "created_at": "…", "updated_at": "…" },
"created": false,
"changed": true
}

created is true for a new variable. changed is false when it already had this value.

Delete a variable​

DELETE /voice/agents/{agent_uuid}/variables/{name} deletes it from the draft. A name the agent doesn't have is a 404. It doesn't publish: live calls keep the published value until you publish again.

{ "status": "success", "agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a", "name": "store_name" }

Config​

config holds every setting other than the name, description, instructions, tools and variables. It has the same sections as agent.config in Get an agent, and it is deep-merged onto what the agent already has:

  • An object merges key by key, at every depth. Send only the keys you change.
  • Anything else, including an array, replaces the old value at that path. Send the whole list.
{ "config": { "llm": { "temperature": 0.4 } } }

This changes the temperature and leaves every other setting as it was.

SectionWhat it controls
llmThe language model: provider, model, temperature, token limit, guardrails
voice_configText-to-speech: provider, model, voice
transcriberSpeech-to-text: provider, model, key terms, end of turn
runtime_behaviourThe greeting, language, time zone and interruptions
callOnly conversationSettings: idle callers, hanging up, the call time limit
privacyRecording, transcripts and compliance modes
webhook_settingsThe pre-call and post-call webhooks
knowledge_base, memory, avatarSet these up in the builder. To reuse a setup, copy the section from an agent in the same workspace
structured_outputs_jsonWhat to extract from each call: an array of output_ids from the Structured Outputs API, replaced whole

The keys in each section are the ones Get an agent returns. To find a key, open an agent set up in the builder and read its config.

Checked: the request fails with 422 and nothing is savedNot checked
The section namesThe keys inside a section. A misspelt key is saved and has no effect
Each section's type: an object, or an array for structured_outputs_jsonThe other values. Model names, voice ids and numbers are saved as sent
provider in llm, voice_config, transcriber and avatar: a provider calls can run, in any letter case. The error lists them
tools inside config. Use the top-level tools and remove_tools
call keys other than conversationSettings. Link phone numbers with Link a number to an agent; the inbound data source is set in the builder
Each id added to structured_outputs_json: one of your workspace's structured outputs or a library entry (LSO-…), listed once. A key limited to some agents can't add an output that only other agents use. Ids the agent already has aren't rechecked
Each knowledge base added to knowledge_base, for a key limited to some agents: it can't add one that only other agents use. Knowledge bases the agent already has aren't recheckedThe knowledge base names, for a key with All Agents
Check what you changed

Read the value back with ?query=, for example ?query=config.llm.temperature. A misspelt key comes back as a 404 naming the path.

Some common changes:

ToSend in config
Speak a fixed greeting{"runtime_behaviour": {"speakingBehaviourType": "custom", "firstMessage": "…"}}. With the default dynamic, the model writes its own greeting and firstMessage is not used
Record calls{"privacy": {"artifacts": {"recording": {"enabled": true}}}}. This turns on stereo too, as the builder's "Enable recording" box does: stereo is the only recording mode. Sending "stereo": false with it records nothing
Limit calls to 5 minutes{"call": {"conversationSettings": {"totalCallTimeout": {"timeoutSeconds": 300}}}}
Recognise product names{"transcriber": {"generation_config": {"keyterm": ["DronaHQ"]}}}

List LLM models​

GET /voice/llm_models

The language models an agent can use, grouped by provider: the values for config.llm.provider and config.llm.model, as the builder's model list offers them. Providers that calls can't run aren't listed. The key needs the Voice agents scope.

Query parameterDescription
providerOnly this provider's models, such as openai. Aliases such as gemini are accepted. A provider that calls can't run returns 422
regionThe agent's privacy.dataResidency.region: global (the default) or in. With in, providers that don't process data in India show available: false
{
"status": "success",
"region": "global",
"plan_uses_own_keys": false,
"count": 1,
"providers": [
{
"provider": "openai",
"name": "OpenAI",
"available": true,
"unavailable_reason": null,
"managed": true,
"key_source": "managed",
"models": [
{ "model": "gpt-4o", "description": "…", "context_window": 128000, "max_output_tokens": 16384, "temperature": true, "thinking": false, "intelligence": 9, "latency_ms": 1040 }
]
}
]
}

key_source is the key a call on that provider would use right now:

ValueMeaning
workspaceYour workspace's own key
managedThe platform's key
noneNo key, so the call fails

temperature: false means the model ignores llm.temperature.

List voices​

GET /voice/voices

The voices for config.voice_config.voiceId. These are the shared voice library plus the voices your workspace added, as the builder's voice picker lists them. Cloned voices aren't listed. The key needs the Voice agents scope.

Query parameterDescription
providervoice_config.provider, such as elevenlabs. Aliases are accepted. Leave it out to list every provider's voices. A provider that calls can't run returns 422
modelvoice_config.model. Only voices that work on that model are returned. A voice with no model works on every model of its provider, so it is always included
languageA language code. hi matches hi and hi-IN; hi-IN matches only hi-IN
gender, accentAs the voices list them, such as female or indian. Not case-sensitive
searchPart of the voice's name or voice_id
limit, offsetPaging. limit is 1–500 and defaults to 50. Keep paging while has_more is true
{
"status": "success",
"total": 64,
"count": 50,
"has_more": true,
"voices": [
{
"voice_id": "aura-2-thalia-en",
"name": "Thalia",
"provider": "deepgram",
"model": "aura-2",
"description": "…",
"gender": "female",
"accent": "american",
"age_group": "adult",
"languages": ["en-US"],
"tags": ["aura-2"],
"preview_url": null,
"featured": true,
"source": "library"
}
]
}

source is library for a shared voice and added for one your workspace added. A voice id belongs to one provider, so set provider, model and voiceId together, from the same voice.


Delete an agent​

DELETE /voice/agents/{agent_uuid}

Deletes a voice agent permanently, as Delete does in the builder. Its draft and published versions, version history, tools, variables, share link and agent memories are deleted, and nothing can restore them.

curl -X DELETE https://<your-dronahq-host>/voice/agents/3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a \
-H "api-key: sk_your-generated-secret-here"

Response — 200 OK​

{
"status": "success",
"agent_uuid": "3b7e1c2a-5d4f-4e8a-9b6c-0f1e2d3c4b5a",
"unlinked_numbers": ["+14155550100"],
"disabled_keys": 0,
"this_key_disabled": false
}
FieldDescription
unlinked_numbersPhone numbers that stopped answering for this agent. Numbers are unlinked, never deleted. A number left with no agent goes back to your pool
disabled_keysAPI keys this request disabled. See below
this_key_disabledtrue when one of them is the key you sent the request with
  • API keys. The agent is removed from every key's Agent Access list. A key whose list ends up empty can't reach any agent, so it is disabled. That includes the key making the request: if you delete the last agent on its list, this_key_disabled is true and the key's next request fails with 401. Keys set to All Agents are not affected.
  • Call logs, recordings and finished campaigns are kept as history.

When the delete is refused​

Each of these refusals happens before anything is deleted, so the agent stays as it was.

Calls in progress: 409. A call is running on the agent: an inbound or outbound phone call (including one still ringing), a web call or a test simulation. detail.live_calls lists them, with direction set to inbound, outbound, web or simulation. call_id can be null. Try again once they have ended.

{
"detail": {
"status": "error",
"message": "This agent has 1 call(s) in progress. Try again once they have ended.",
"live_calls": [ { "call_id": "0d9c41e2a6f84b7c9e3f5a1b2c4d6e8f", "direction": "inbound" } ]
}
}

Calls can't be checked: 503. DronaHQ couldn't check for calls in progress. Retry.

Campaigns: 409. A campaign that uses the agent is scheduled, queued, running or paused. detail.blocking lists each one with the action that clears it: stop a campaign that has started, or reconfigure a scheduled one to use another agent.

{
"detail": {
"status": "error",
"message": "This agent is used by 1 campaign(s) that must be dealt with first.",
"blocking": [
{
"campaign_uuid": "cccccccc-1111-2222-3333-444444444444",
"campaign_name": "Renewal reminders",
"status": "running",
"required_action": "stop"
}
]
}
}

A second delete of the same agent returns 404.


Errors​

Error shapes​

Every error has a detail field, but its shape depends on the error:

detail isWhen
A string, for example "Voice agent not found."401 and 403 from the key or its Agent Access, and 404 for an agent
An object with a messageA bad tool (detail.tool names it), a bad config section or a provider calls can't run (422), a query error (400 or 404, with query and at), the plan's tool limit (403, with upgrade_required), a refused delete (409 or 503), and 500
An array of errorsA body or parameter that fails validation (422): an unknown top-level field, a wrong type, a name over 128 characters, or a query over 500 characters
{ "detail": { "message": "no tool with id 'f4513ecc-50e6-41c5-8961-27e5ece2824c'", "tool": "get_order_status" } }
{ "detail": [ { "type": "extra_forbidden", "loc": ["body", "instruction"], "msg": "Extra inputs are not permitted", "input": "…" } ] }

Body validation errors are 422, never 400.

Status codes​

HTTP statusCauseFix
400A malformed query pathFix the path; detail.message says what is wrong
401The key is missing, unknown, disabled or expiredCheck the key under Developer → API Keys: it must be enabled and not expired
403The key lacks the Voice agents scope, or the agent isn't on its Agent Access listFix the key's scopes or Agent Access
403The change would exceed your plan's tool limit (detail.upgrade_required: true)Remove tools, or upgrade
404No voice agent with this id in the key's workspace, or a query path that matched nothingCheck the id with List agents. An agent in another workspace is a 404 too
409Delete only: a call or a campaign is in progress on the agentSee When the delete is refused
422The body is invalid: an unknown field, a bad tool or parameter, a config section that isn't allowed, or a provider calls can't run. On the model and voice lists: a provider calls can't run, or an unknown regionRead detail
500Unexpected server error. Nothing was saved or deletedRetry; contact support if it persists
503Delete only: calls in progress couldn't be checked. Nothing was deletedRetry

What's Next​