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.
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.
Response
Campaign created
A campaign as list, get, create and update return it. Only list and get include inbound_phone_numbers.