Not available yet. Campaigns are switched off by default, so creating a campaign or adding leads is refused, and no calls are placed. This guide describes the campaign API so you can plan an integration. It will say when campaigns can place calls.
How a campaign is organized
Simple and advanced campaigns
Choose withvariant when you create a campaign:
Advanced campaigns are switched on separately from campaigns as a whole. A workspace that may create campaigns but not advanced ones gets
403 feature_not_available for variant: advanced.
Campaigns call over a phone number. The contract also describes WhatsApp campaigns, but they are refused for every workspace with 403 feature_not_available.
The calling policy
Save a default policy for your workspace with Replace campaign configuration. Send theversion you last read as expected_version, or leave it out to create the first configuration. If someone saved in between, the save is refused with 409 outbound_campaign_state_conflict; read the configuration again with Get campaign configuration and retry. Before the first save, reading it answers 404 outbound_campaign_config_not_found.
A campaign’s policy is worked out once, when the campaign is created, in this order. Each layer replaces whole sections (timezone, retries, calling windows, date overrides, data collection, follow-up context) rather than single fields:
- The workspace
policy. - The override for the campaign’s agent in
agent_policies, if there is one. - A
policysent with the campaign, which wins over both.
policy needs a saved configuration; without one it is refused with 404 outbound_campaign_config_not_found. Changing the configuration later changes only campaigns created afterwards.
Calling windows and date overrides
calling_periods are the weekly windows calls may be placed in. Weekdays run from 0 (Monday) to 6 (Sunday). Times are local HH:MM in the policy’s timezone; 24:00 ends a window at midnight. Each period needs at least one weekday and one interval, an interval must end after it starts, and windows may not overlap on any day, also across periods.
Without your own windows, the policy uses Monday to Friday, 10:00 to 12:00 and 16:00 to 18:00, in UTC. Set timezone to where your contacts are.
date_overrides replace the weekly windows on the dates they cover, from start_date to end_date inclusive. An empty intervals list means no calls on those days, for a holiday. Date ranges may not overlap.
A call that comes due outside a window moves to the start of the next window. Windows are read in the lead’s timezone_override when you set one, then the campaign’s timezone, then the policy’s. A callback the contact asked for is placed at the time they asked for, even outside the windows.
Retries
retry limits how persistent a campaign is with each lead:
Short retries, callbacks and redirects must each stay below
max_total_calls, and max_consecutive_failures_per_number may not exceed it.
Follow-ups
Thedata_collection section names the agent’s data collection items that steer follow-up calls: callback_time (when the contact asked to be called back), redirect_phone_number (another number they gave) and stop (they asked not to be called again). Each defaults to a built-in item; set one to null to turn it off. mappings copies other data collection results into dynamic variables for later calls. A mapping’s variable name may not be empty or start with campaign__.
followup_context chooses which variables a follow-up call receives: campaign__call_type, campaign__previous_conversation_id, campaign__previous_summary and campaign__previous_transcript. Each is on by default. Use them in the agent’s prompt so a retry or callback continues the earlier conversation.
Create a campaign
Call Create a campaign with the agent, the number to call from, and the recipients. Each recipient becomes a lead.503 outbound_campaigns_unavailable. A workspace that is not switched on for campaigns gets 403 feature_not_available.
Leave out scheduled_time_unix to start now, or set it to start later. A time in the past starts at once. The response has the campaign, created, and within_calling_window, which says whether calling starts right away or waits for the next window.
Before the campaign is written, every recipient is checked. If any can’t be called, nothing is created and the answer is 400 outbound_campaign_invalid_recipients. The error’s data.invalid_rows lists every bad row at once, by its position in recipients:
error is missing, invalid or not_allowed. See Errors for the rest of the error body. Other refusals at create: 403 outbound_campaign_zero_retention for an agent in zero-retention mode, because a campaign stores lead and call state, and 403 outbound_campaigns_terms_not_accepted until the workspace accepts the terms below.
Repeating a create request
A create request is safe to retry. Send anidempotency_key and a repeat with the same key and the same body returns the campaign it created, with created: false and status 200 instead of 201. The same key with a different body is refused with 409 outbound_campaign_idempotency_key_reused; send a new key to create another campaign. Without a key, a repeat of the same body returns the matching campaign while that campaign has not finished.
Adding leads
Add campaign leads adds up to 10,000 recipients to a campaign that is notstopping, stopped or failed. A recipient whose id the campaign already has is skipped, so retrying an addition with ids is safe; recipients without an id are always added. Adding leads to a completed campaign makes it active again.
Statuses
A change the status doesn’t allow is refused with
409 outbound_campaign_state_conflict. A campaign can’t be edited or deleted after it is created; stop it and create another. Pause all campaigns and Stop all campaigns act on every campaign of the workspace at once and list the campaigns they changed.
Resume, like create and add leads, is refused while campaigns are switched off for the platform or the workspace, or while the workspace has not accepted the current terms. Pause, stop and removing a lead always work.
Attention items
List campaign attention items shows what holds calls back.reason is one of agent_branch_unavailable, agent_unavailable, calling_terms_not_accepted, concurrency_limit_exceeded, phone_number_unavailable, zero_retention_enabled or credits_exhausted, and detail explains it. Fix the cause, then:
- Retry an item that is
retryable. It checks the cause again and places the held calls. If the cause is still there, it answers409 outbound_campaign_attention_unresolvedand the item stays open. - Resolve an item that can’t be retried, with a
resolutionsaying how you handled it.
Removing a recipient and do-not-call
Remove a campaign lead stops a campaign from ever calling that lead again, in any campaign status. Its waiting call is cancelled and the lead is markeddo_not_call. If a call was already handed off for dialing, the answer is 202 with has_calls_in_flight: true, because that call may still go through. Removing the last lead left to call completes the campaign.
A lead is also marked do_not_call when the campaign is stopped, or when the contact asks not to be called again (the stop data collection item). A number whose contact asked not to be called is skipped if you add it to the same campaign again. Do-not-call belongs to the campaign: it does not carry over to other campaigns, so keep your own list and leave those numbers out of new campaigns.
Track a campaign
Lists return up to
page_size items (1 to 500, default 100). Pass next_cursor as cursor while has_more is true.
The recipients file
In the dashboard you upload recipients as a file instead of sending them in a request:- CSV only, UTF-8, comma-separated. Save a spreadsheet as CSV UTF-8 first.
- Up to 10,000 rows and 4 MB.
- Numbers with a leading
+and the country code, such as+919876543210. phone_numberis required for a phone campaign.phone_number_2tophone_number_5add up to four more numbers, tried in order.user_idandtimezone_override(an IANA name such asAsia/Kolkata) are optional.language,first_message,promptandvoice_idoverride the agent for that recipient when the agent allows those overrides.- Every other column is a dynamic variable with the column’s name. Headers are matched exactly, and a column may not start with
system__,campaign__orsecret__.
Outbound communications terms
Before a workspace can create campaigns, add leads or resume a campaign, a workspace admin must accept the outbound communications terms in the dashboard. This covers requests made with API keys too. Until then those requests are refused with403 outbound_campaigns_terms_not_accepted. Any member can accept for themselves, but only an admin’s acceptance unlocks the workspace. When the terms change, an admin must accept the new version before new work is accepted.
You remain responsible for calling only people who agreed to be called, at hours the law allows where they live, and for telling them they are speaking with an AI agent. See call consent and AI disclosure.
Limits
Frequently asked questions
Can I create a campaign today?
Can I create a campaign today?
No. Campaigns are switched off by default, and no workspace places calls with them yet. Create and add-leads requests are refused while campaigns are off. This page will say when that changes.
Can I change a running campaign's policy?
Can I change a running campaign's policy?
No. A campaign keeps the policy it took when it was created. Save a new configuration and create a new campaign; stop the old one if you no longer need it.
What happens to batch calling?
What happens to batch calling?
Nothing changes yet. The batch calling pages stay as they are. Campaigns are planned to replace batch calling for outbound calling at scale.