curl -X POST https://api.nedzo.ai/v1/call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"type": "contact",
"contactId": "456e4567-e89b-12d3-a456-426614174000"
}'
curl -X POST https://api.nedzo.ai/v1/call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"type": "phoneNumber",
"phoneNumber": "+14155551234",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"businessName": "Acme Inc",
"customFields": {
"Lead Source": "Website",
"Company Size": "50-100"
}
}'
{
"conversationId": "123e4567-e89b-12d3-a456-426614174000"
}
{
"type": "https://api.nedzo.ai/errors/outbound-trial-gate",
"title": "Payment Required",
"status": 402,
"detail": "Outbound goes live when your trial converts. Go live now to start calling, texting, and emailing contacts."
}
Calls
Make a call
Initiate an outbound AI voice call via the Nedzo REST API. Specify the agent, phone number, and optional metadata to start an automated conversation.
POST
/
call
curl -X POST https://api.nedzo.ai/v1/call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"type": "contact",
"contactId": "456e4567-e89b-12d3-a456-426614174000"
}'
curl -X POST https://api.nedzo.ai/v1/call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"type": "phoneNumber",
"phoneNumber": "+14155551234",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"businessName": "Acme Inc",
"customFields": {
"Lead Source": "Website",
"Company Size": "50-100"
}
}'
{
"conversationId": "123e4567-e89b-12d3-a456-426614174000"
}
{
"type": "https://api.nedzo.ai/errors/outbound-trial-gate",
"title": "Payment Required",
"status": 402,
"detail": "Outbound goes live when your trial converts. Go live now to start calling, texting, and emailing contacts."
}
string
required
UUID of the agent to use for the call
string
required
Type of call target. Valid values:
contact, phoneNumberobject
Custom variables to pass to the assistant. These override contact field values.
- Contact
- Phone Number
The agent must have a phone number assigned in Agent Builder > Settings before you can make outbound calls. Calls fail with
400 Bad Request if the agent has no number connected — Nedzo never falls back to another workspace number, since that would surface the wrong caller ID to the recipient.Every call ends at the agent’s Max call duration (set on the agent’s Settings tab, 1 to 60 minutes, 30 by default). The cap covers the whole call, including any time after a transfer to a person. See How Max call duration works.
Outbound calls go live when your trial converts to a paid plan. Until then,
/v1/call refuses the call with 402 and type outbound-trial-gate, and no call is placed. The one exception is a number verified in your workspace, such as your own phone, which you can call during the trial.Errors
| Status | Detail | Cause |
|---|---|---|
400 | Agent does not have a phone number assigned. Please assign a number in Agent Builder > Settings before making outbound calls. | The agent has no phone number connected. |
400 | Phone number is not synced to voice engine. | The agent’s assigned number hasn’t finished syncing to the voice engine yet. |
400 | Phone number is not active. | The agent’s assigned number is in pending or another non-active status. |
400 | Invalid call type | type is something other than contact or phoneNumber. |
402 | Outbound goes live when your trial converts. Go live now to start calling, texting, and emailing contacts. | The account is on a trial. The type ends in outbound-trial-gate. |
402 | Varies | The account has no plan, its subscription is not active, or its wallet has no balance left. The type ends in payment-required. |
curl -X POST https://api.nedzo.ai/v1/call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"type": "contact",
"contactId": "456e4567-e89b-12d3-a456-426614174000"
}'
curl -X POST https://api.nedzo.ai/v1/call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"type": "phoneNumber",
"phoneNumber": "+14155551234",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"businessName": "Acme Inc",
"customFields": {
"Lead Source": "Website",
"Company Size": "50-100"
}
}'
{
"conversationId": "123e4567-e89b-12d3-a456-426614174000"
}
{
"type": "https://api.nedzo.ai/errors/outbound-trial-gate",
"title": "Payment Required",
"status": 402,
"detail": "Outbound goes live when your trial converts. Go live now to start calling, texting, and emailing contacts."
}
Was this page helpful?
