Add campaign contacts
Add one contact, or up to 500 at once. On a draft they are stored for launch. On a running campaign they are sent now. A contact already in the campaign is skipped, so a retry is safe. Each contact needs a phone_number; every other key is kept and can fill a template parameter through variable_mapping.
Set up WhatsApp first. Connect a WhatsApp number in the dashboard or with Connect numbers. Included on every paid plan. See plans.
campaign_idrequiredcurl -X POST 'https://omnidim.io/api/v1/whatsapp/campaigns/{campaign_id}/contacts' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{}'
{ "imported": 0, "skipped_invalid": 0, "skipped_duplicate": 0, "total_submitted": 0, "contacts": [ { "index": 0, "contact_id": 0, "duplicate": false } ], "errors": [ { "index": 0, "error": "string" } ] }
BearerAuthAuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
campaign_id*integerId of a WhatsApp campaign, from listWhatsappCampaigns.
application/jsonOne contact object, or an array of 1 to 500.
body?One contact object, or an array of 1 to 500.
Response body
application/jsonWhat happened to each contact.
application/jsonWhat happened to each contact you sent.
imported?integerskipped_invalid?integerskipped_duplicate?integertotal_submitted?integercontacts?One entry per contact that was accepted or already existed.
errors?One entry per contact that was skipped.
List campaign contacts
Per-contact status for a campaign, oldest first. A contact that read the message and then replied STOP counts as read and opted out.
Launch a campaign
Start a draft campaign: every pending contact is queued once. Needs at least one contact, unless the campaign's data_source is webhook. The plan's monthly broadcast allowance and the wallet balance are checked here. Idempotency-Key is required, so a retry does not start it twice.
