Skip to main content
POST
Create a new agent
What it does: Creates a new voice agent and returns a botId. The agent starts with dashboard defaults — you configure voice, prompt, and integrations in a follow-up Update Agent call.

Required Permission

agents

Minimum working example

Save the botId from the response — you need it for every other Agents API call.

Success (201)

Request body

New agents inherit sensible defaults: barge-in enabled, TTS caching on, LLM temperature 0.5, max tokens 300. Override any setting via Update Agent.

What to do next

Edge cases

Errors

409 Conflict — name already taken
403 Forbidden — insufficient permissions
Call Get Regions and Get Timezones before your first create request so you use valid values.
Save the requestId from every response. You will need it if you contact Gnani support to trace a specific request.

Authorizations

x-api-key
string
header
required

API key with 'agents' permission

Body

application/json
botName
string
required
Example:

"Support Agent"

description
string
Example:

"Handles inbound customer support calls."

region
enum<string>
default:asia
Available options:
asia,
america,
europe
Example:

"asia"

timeZone
string
default:Asia/Kolkata
Example:

"Asia/Kolkata"

Response

Agent created successfully

status
string
Example:

"success"

requestId
string
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

message
string
response
object