Add contacts in bulk
POST
/sms-api/contact/addBulkContactAdds many contacts to one group in a single call. All rows are validated before any are inserted.
Parameters
contact_group_idstringrequiredGroup id.
contactsobject[]requiredEach item has first_name (required), phone_number (required, up to 20 characters), last_name and email (optional).
| Field | Type | Required | Description |
|---|---|---|---|
contact_group_id | string | required | Group id. |
contacts | object[] | required | Each item has first_name (required), phone_number (required, up to 20 characters), last_name and email (optional). |
Errors
- 403Unauthorized. You do not own this contact group.
- 404Contact group not found.
Request
curl -X POST "https://api.bulkclix.com/api/v1/sms-api/contact/addBulkContact" \ -H "x-api-key: YOUR_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "contact_group_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d", "contacts": [ { "first_name": "Ama", "last_name": "Mensah", "phone_number": "0241234567", "email": "ama@example.com" }, { "first_name": "Kofi", "phone_number": "0551234567" } ] }'
Response · 200
application/json
{ "message": "Contacts Added Successfully", "data": [ { "id": "…", "first_name": "Ama", "last_name": "Mensah", "phone_number": "0241234567", "email": "ama@example.com" }, { "id": "…", "first_name": "Kofi", "phone_number": "0551234567" } ] }