Skip to main content
POST
Trigger outbound test call
What it does: Tells an agent to call a phone number. The agent runs a live conversation using its current configuration.
Or skip steps 3–4: enable a post-call webhook and receive call data automatically when the call ends.

Required Permission

agents

Minimum working example

Always pass ?environment=development unless your API key has production access.

Path and query parameters

Outbound calls only work to whitelisted phone numbers. Calling an unregistered number returns HTTP 400. Contact your account manager to register numbers.

Request body

clientReferenceId

Optional free-form string to tie the call back to your records (CRM lead ID, booking reference, campaign code). When provided:
  • Stored on the conversation record
  • Forwarded to the dynamic greeting API if hasDynamicGreeting is enabled
  • Returned in the trigger response under response.clientReferenceId
  • May appear in post-call webhook payloads
When omitted, response is null on success.

Response

Success (200) — with clientReferenceId

Success (200) — without clientReferenceId

A 200 response means the call is being placed — not that it has finished. Use Get Conversation Logs or a post-call webhook to read the outcome after the call ends.

What happens after you trigger

Edge cases

Errors

403 Forbidden — missing environment
400 Bad Request — phone not whitelisted
400 Bad Request — dynamic greeting / pre-call failure
Ensure you have proper consent and comply with local telecommunications regulations before triggering outbound calls. This endpoint is for testing — not large-scale production campaigns.
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

Path Parameters

botId
string
required

Unique identifier of the agent

Query Parameters

environment
enum<string>

Target environment

Available options:
development,
staging,
production

Body

application/json
phone
string
required
Example:

"9876543210"

countryCode
string
required
Example:

"+91"

name
string
required
Example:

"Jane Doe"

clientReferenceId
string

Optional client-supplied reference ID. Stored against the conversation and forwarded to the dynamic greeting API.

Example:

"my-ref-001"

Response

Call triggered successfully

status
string
Example:

"success"

requestId
string
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

message
string
response
object