Create a campaign
Creates the campaign in draft. With no config.mode it’s stored as live, or as legacy when the config sets a model, a voice or another field Live rejects.
Outbound: attach lead lists with lead_list_ids, then call start. Inbound: route a number to it with PATCH /v1/phone-numbers/{id} ({ inbound: { enabled: true, campaign_id } }), then call start. It answers only while running. Inbound needs no lead list and creates no run.
Authorizations
Use Authorization: Bearer tc_live_xxxxx
Headers
Makes a retry safe. A 2xx response is stored for 24 hours per account, and a retry with the same key gets it back with Idempotent-Replay: true instead of running again. Errors aren't stored, so a retry after one runs fresh. The key isn't tied to a path or body: use a new key for every different request. A malformed key gets 400.
8 - 255^[A-Za-z0-9_-]+$"a1b2c3d4-e5f6-7890-abcd-ef0123456789"
Body
A new campaign is always draft. Change its status with start, pause, resume and stop.
1outbound campaigns dial their lead lists. inbound campaigns never dial: they answer calls on a phone number routed to them with PATCH /v1/phone-numbers/{id}, and need no lead list.
outbound, inbound IANA timezone for the dispatch hours. Defaults to UTC.
Local time dialing may begin, HH:MM or HH:MM:SS.
^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$Local time dialing stops, HH:MM or HH:MM:SS.
^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$Days dialing is allowed, 1 (Monday) to 7 (Sunday).
1 <= x <= 7Per-day dispatch windows that replace the default hours, keyed by weekday "1" to "7". An empty array makes that day off.
x >= 1x >= 1UTC time with a Z suffix (an offset returns 400). If it's in the future, start schedules the campaign for then instead of running it now. Inbound campaigns ignore it.
Lead lists to attach. An id outside your account returns 400.
Settings for every call the campaign places. The shared fields behave as on CreateCallRequest. Unknown keys are refused with 400.
Response
Campaign created
A campaign as list, get, create and update return it. Only list and get include inbound_phone_numbers.
draft, scheduled, running, paused, completed, failed, cancelled outbound campaigns dial their leads. inbound campaigns are never dialled; they answer on a routed number only while running.
outbound, inbound Your active or verified numbers with inbound routing on and pointed at this campaign. Full inbound settings are on GET /v1/phone-numbers.
IANA timezone for the dispatch hours. schedule_time is always UTC.
Daily start of the dispatch window, HH:MM:SS local time.
Daily end of the dispatch window, HH:MM:SS local time.
Days dispatch may run. 1 is Monday, 7 is Sunday.
1 <= x <= 7Windows for specific weekdays, keyed "1" to "7". An empty list makes that day a day off.
Dispositions that count toward success_count. Set in the dashboard; the API doesn't accept it.
Maps raw call outcomes to dispositions. Set in the dashboard. Expect an object, an empty array [] (the default) or null.
Why the campaign is paused: manual from the pause endpoint, or an automatic reason such as quota_exceeded, payment_failed or phone_number_deleted.
Attached lead lists.
Configuration for every call the campaign places.