Add a contact
POST
/sms-api/contact/addContactAdds one contact to a group you own.
Parameters
first_namestringrequiredlast_namestringoptionalphone_numberstringrequiredemailstringoptionalMust be a valid email when given.
contact_group_idstringrequiredGroup id.
| Field | Type | Required | Description |
|---|---|---|---|
first_name | string | required | |
last_name | string | optional | |
phone_number | string | required | |
email | string | optional | Must be a valid email when given. |
contact_group_id | string | required | Group id. |
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/addContact" \ -H "x-api-key: YOUR_API_KEY" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "first_name": "Ama", "last_name": "Mensah", "phone_number": "0241234567", "email": "ama@example.com", "contact_group_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d" }'
Response · 200
application/json
{ "message": "Contact Added Successfully", "data": { "id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b", "first_name": "Ama", "last_name": "Mensah", "phone_number": "0241234567", "email": "ama@example.com", "contact_group_id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d" } }