Skip to main content
In this quickstart you’ll drive an outbound Voice agent entirely from code: find the agent, register a webhook, add contacts, start the agent, and then read each call’s result and recording. It takes about 15 minutes.

Before you begin

  • An outbound Voice agent in the dashboard with a script, a voice, and a phone number. If you don’t have one yet, follow the dashboard quickstart. The agent should be stopped while you set it up.
  • A public HTTPS endpoint that can receive POST requests. For local testing, a tunneling tool such as ngrok works.
  • Node.js 18+ or Python 3.9+ if you want to run the code samples (cURL works too).
1

Create an API key

In the dashboard, open Settings → API Keys and create a key. See API keys for details.Store it in an environment variable so the samples below can use it:
Send the key in the Authorization header with no Bearer prefix.
2

Find your agent ID

GET /agents needs your account ID, so first fetch it from GET /organization. The first item is the account the key belongs to; any subaccounts follow.
Copy the id of your outbound agent:
You can also copy the agent ID from the agent’s URL in the dashboard.
3

Subscribe a webhook

Tell Callers where to send results. This example asks for two events: CALL_FINISHED (every call, once the call has fully ended) and POST_PROCESSING_FINISHED:INTERESTED (the contact reached the agent’s goal).
The URL must be HTTPS. Subscribing the same URL again merges the new events into the existing webhook instead of adding a duplicate. See Webhook events for every event you can subscribe to.
4

Add contacts

Add the people to call with the bulk endpoint. Each contact needs a name, a phone number in international format, and a data object. Keys in data become variables in your script, so {{company}} in the script is filled from data.company.
Response
If added + modified is lower than requested, some contacts were skipped (for example, an invalid phone number). See Manage contacts.
5

Start the agent

The agent starts calling eligible contacts within its availability hours. If you call start on an agent that is already active, you get 400 with Campaign already activated., which is safe to ignore.
6

Receive the webhook

When a call ends, Callers sends a POST with the full call payload to your URL. Respond with any 2xx status quickly, then process the data.This minimal receiver also verifies the X-Signature header so you only trust requests from Callers. Download the public key from Validating webhook signatures and save it as callers-public-key.pem.
Key fields in the payload:See Webhook payload for every field.
7

Fetch the call and recording

You can re-fetch the same payload at any time, for example to backfill a missed delivery. Use campaign.id and id from the webhook:
Recording links can expire (signed links are valid for about an hour), so request a fresh URL whenever you need to play or download a recording rather than storing the link.

Troubleshooting

The key is missing, mistyped, revoked, or sent with a Bearer prefix. Send the raw key: Authorization: <key>. If you send x-sub-organization-id, make sure it’s a subaccount of the key’s account.
organizationId is a required query parameter. Get it from GET /organization.
The agent is an inbound agent. Contacts can only be added to outbound agents.
Check the agent’s availability hours and time zone, that it has an outbound phone number, and that the contacts still have attempts left (not already completed or archived). Contacts on the Do Not Call list are skipped.
Confirm the URL is public HTTPS and returns 2xx. Check which events you subscribed to: CALL_FINISHED fires for every call, while POST_PROCESSING_FINISHED:* events fire only for the matching outcome. Delivery attempts are logged on each call in the dashboard. See Webhooks overview.

Next steps

Launch outbound calls

Production patterns for running outbound agents from your system.

Webhook events

Choose the events your integration needs.

Validate signatures

Verify that webhooks come from Callers.

API introduction

Errors, pagination, and conventions.