Skip to main content
POST
/
api
/
create-agent
curl -X POST https://api.vaanivoice.ai/api/create-agent \
  -H "X-API-Key: vaani_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_display_name": "support-bot",
    "config": {
      "persona": {
        "identity": {
          "system_prompt": "You are a helpful customer support agent."
        }
      }
    }
  }'
{
  "success": true,
  "agent_id": "7ec4155e-0e62-440a-b983-5974f7697854",
  "agent_name": "support-bot",
  "client_id": "9abf5eff-e978-4e87-954d-7ff6ba570796"
}

Create Agent

Create a new agent and associate it with the authenticated user’s client. The client_id is automatically extracted from your API key — you don’t need to supply it.

Parameters

agent_display_name
string
required
Human-readable name for the agent (e.g. "support-bot")
config
object
default:"{}"
Optional initial configuration for the agent. You can pass any subset of the agent config sections here or leave it empty and configure them later via the section PATCH endpoints.

Request Example

curl -X POST https://api.vaanivoice.ai/api/create-agent \
  -H "X-API-Key: vaani_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_display_name": "support-bot",
    "config": {
      "persona": {
        "identity": {
          "system_prompt": "You are a helpful customer support agent."
        }
      }
    }
  }'

Response

{
  "success": true,
  "agent_id": "7ec4155e-0e62-440a-b983-5974f7697854",
  "agent_name": "support-bot",
  "client_id": "9abf5eff-e978-4e87-954d-7ff6ba570796"
}
success
boolean
true when the agent was created successfully.
agent_id
string
UUID of the newly created agent. Use this in subsequent PATCH calls and when triggering calls.
agent_name
string
Display name of the new agent.
client_id
string
Client UUID the agent was associated with (resolved from your API key).