Skip to main content
An agent can place outbound phone calls. You start a call with one REST request. The call itself runs in the background, and you read the result when it ends.

Before you start

  • An API key.
  • An agent with a phone number set up through Twilio or Telnyx.
  • The agent’s agent_id.

Place a call

The response comes back right away with status initiated:

Request fields

string
required
The agent that makes the call.
string
required
The number to call, in E.164 format. For example, +15551234567.
object
Values for the {{placeholders}} in the agent’s instructions and first message. Keys and values are strings.
string
Replaces the agent’s first message for this call only.
string
twilio or telnyx. Use this when the agent has both. If you leave it out, Eclatira uses Twilio when it is set up, and Telnyx otherwise.
string
A URL that receives a POST when this call ends. See Webhooks.

Personalize each call

Put placeholders in the agent’s instructions or first message with double braces:
Then fill them in when you place the call:

Retry safely

Network errors happen. To retry a request without placing a second call, send an Idempotency-Key header:
  • If you repeat a request with the same key and the same body, you get the first response back. No new call is placed.
  • If you reuse a key with a different body, the request is rejected.
This works for both POST /api/v1/calls and POST /api/v1/batches.

Get the result

When the call ends, read it with GET /api/v1/calls/{call_id}:
The response includes:
Polling works, but a webhook is simpler. Eclatira sends you the full result when the call ends.
To list all calls, use GET /api/v1/calls with limit and offset.

Flag a call for review

You can mark a finished call for human review. This is the same as the review toggle in the dashboard:
This only works after the call has ended.

Call a list of numbers

A batch calls many people with the same agent. It uses the same engine as the CSV upload in the dashboard, with the same scheduling, retries and concurrency.
Each recipient needs a to_number. It can also have its own variables and first_message. A batch starts right away. To run it later, add scheduled_at with an ISO 8601 time. To get one notification when the whole batch is done, add webhook_url.

Manage a batch

Next steps

Webhooks

Get call results pushed to your server.

Calls API

The full request and response schema.