Place one call from one of your workspace's phone numbers. Every request needs a unique Idempotency-Key; sending the same key again returns the same call instead of dialing twice.
curl https://evasay.com/api/v1/voice/calls \
-X POST \
-H "Authorization: Bearer sk-your-key" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "AGENT_ID",
"to": "+14155550100",
"variables": { "customer_name": "Alex", "order_id": "1234" }
}'
from is required when the workspace has more than one phone number. variables fill {{customer_name}}-style placeholders in the agent's first message and prompt.
With voicemail_detection on (the default), an outbound call listens for the other side to speak before the agent greets them; if they stay silent, the agent greets them after two or three seconds. When the agent hears a mailbox or a phone company's recording, it waits for the greeting and its beep to end, leaves voicemail_message, or hangs up when there is none. Such calls end with ended_reason voicemail, are charged for the time they lasted, and are not analyzed or notified.
In a campaign, a number that reached a mailbox is called again like one that did not answer, and the message is left only on its last attempt, so nobody gets the same message twice.
Every outbound call, from a campaign or from POST /api/v1/voice/calls, first checks the workspace's do-not-call list. A listed number is never dialed: the API answers 409 with code do_not_call, and a campaign marks the contact canceled with outcome do_not_call and goes on to the next one.
When the person on a call the agent placed asks not to be called again, the agent puts their number on the list itself, tells them so, and the call.do_not_call webhook is sent. Numbers can also be added and removed under Campaigns → Do-not-call list or with the API:
curl https://evasay.com/api/v1/voice/do-not-call \
-X POST \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{ "phones": ["+14155550100"], "note": "Asked by email" }'
Numbers are in international format; up to 1,000 at once. GET /api/v1/voice/do-not-call lists them, newest first (search, limit, page), each with its source (call, dashboard or api). DELETE /api/v1/voice/do-not-call/%2B14155550100 takes one off again; do that only when the person has agreed to be called.