Add contacts in bulk
Add up to 1000 contacts to a campaign in one request.
campaign_idrequiredReseller keys only: act as one of your clients by its user id. Omit it to act on your own account. [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
Each row needs to_number. Note this differs from the contact_list on Create bulk call, which uses phone_number and takes loose keys: here the variables go in an explicit custom_variables object.
curl -X POST 'https://omnidim.io/api/v1/calls/bulk_call/{campaign_id}/add_contacts' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "user_id": 1234, "contacts": [ { "to_number": "+15551234567", "custom_variables": { "contact_name": "Ravi" } } ] }'
{ "status": "success", "message": "1 of 2 contacts added", "campaign_id": 314, "campaign_status": "in_progress", "added": [ { "line_id": 8801, "to_number": "+15551234567" } ], "added_count": 1, "rejected": [ { "index": 1, "reason": "to_number is not a valid phone number" } ], "rejected_count": 1 }
BearerAuthAuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
campaign_id*integerId of the bulk call campaign.
application/jsonuser_id?ClientUserIdReseller keys only: act as one of your clients by its user id. Omit it to act on your own account. How acting for a client works.
contacts*Each row needs to_number. Note this differs from the
contact_list on Create bulk call, which uses
phone_number and takes loose keys: here the variables go
in an explicit custom_variables object.
items <= 1000Response body
application/jsonWhat was added and what was not. added and rejected together
account for every row you sent.
application/jsonstatus?stringadded?rejected?One entry per row that was not added. index is the
row's position in the array you sent.
added_count?integerrejected_count?integermessage?stringcampaign_id?integercampaign_status?stringpost_call_actions_ignored?Present only when a contact carried __post_call_actions.
Bulk campaigns do not honor it: the key is removed from
those contacts and one item with code unsupported_route
is returned.
Was this page helpful?
