Contacts API
Create, read, update and delete the people you message, or bulk upsert them in a single request. Contacts can be grouped into lists for targeted campaigns.
/contacts/List contacts
Retrieve a paginated list of contacts in the project. Supports search and filtering by opt-in status.
Query Parameters
searchstringSearch by phone or name.
opted_inbooleanFilter by opt-in status (true or false).
limitintegerMaximum number of contacts to return. Defaults to 20.
offsetintegerNumber of contacts to skip. Defaults to 0.
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": "25659b22-d307-4912-907e-63ed0b353f39",
"phone": "+233201234567",
"first_name": "Alice",
"last_name": "Mensah",
"attributes": {},
"opted_in": true,
"opt_in_source": "MANUAL",
"opted_out_at": null,
"created_at": "2026-04-01T19:05:07.109303Z"
}
]
}/contacts/Create a contact
Create a new contact. A phone number is required. Optionally add the contact to lists at creation time with list_ids.
Body Parameters
phonestringrequiredPhone number in E.164 format (e.g. +233241234567). Maximum 30 characters.
first_namestringContact's first name. Maximum 100 characters.
last_namestringContact's last name. Maximum 100 characters.
attributesobjectCustom key-value attributes for the contact.
opted_inbooleanWhether the contact has opted in to receive messages.
opt_in_sourcestringHow the contact opted in. One of API, CSV, or MANUAL.
list_idsstring[]Array of list IDs to add the contact to. Maximum 10.
{
"phone": "+233241234567",
"first_name": "Alice",
"last_name": "Mensah",
"attributes": {},
"opted_in": true,
"opt_in_source": "API",
"list_ids": ["a7bd4b07-7e58-4785-933c-424d728a2790"]
}{
"id": "1597951f-e00f-42c3-9924-26a0044ba820",
"phone": "+233241234567",
"first_name": "Alice",
"last_name": "Mensah",
"attributes": {},
"opted_in": true,
"opt_in_source": "API",
"opted_out_at": null,
"created_at": "2026-04-03T13:56:18.900086Z"
}/contacts/{contact_id}/Get a contact
Retrieve a single contact by ID. The response includes the lists the contact belongs to.
Path Parameters
contact_idstringrequiredThe UUID of the contact.
{
"id": "25659b22-d307-4912-907e-63ed0b353f39",
"phone": "+233201234567",
"first_name": "Alice",
"last_name": "Mensah",
"attributes": {},
"opted_in": true,
"opt_in_source": "MANUAL",
"opted_out_at": null,
"created_at": "2026-04-01T19:05:07.109303Z",
"lists": [
{
"id": "a7bd4b07-7e58-4785-933c-424d728a2790",
"name": "VIP Customers",
"created_at": "2026-04-03T13:55:44.050666Z"
}
]
}/contacts/{contact_id}/Update a contact
Partially update a contact. All fields are optional — only the fields you include are changed. Updatable fields: first_name, last_name, attributes, opted_in.
Path Parameters
contact_idstringrequiredThe UUID of the contact.
Body Parameters
first_namestringContact's first name. Maximum 100 characters.
last_namestringContact's last name. Maximum 100 characters.
attributesobjectCustom key-value attributes for the contact.
opted_inbooleanWhether the contact has opted in to receive messages.
{
"last_name": "Owusu",
"opted_in": true
}{
"id": "25659b22-d307-4912-907e-63ed0b353f39",
"phone": "+233201234567",
"first_name": "Alice",
"last_name": "Owusu",
"attributes": {},
"opted_in": true,
"opt_in_source": "MANUAL",
"opted_out_at": null,
"created_at": "2026-04-01T19:05:07.109303Z"
}/contacts/{contact_id}/Delete a contact
Soft-delete a contact. Returns 204 No Content on success.
Path Parameters
contact_idstringrequiredThe UUID of the contact.
Empty body — no content is returned.
/contacts/bulk/Bulk upsert
Create or update contacts in bulk. Existing contacts are matched by phone. Maximum 500 contacts per request.
Body Parameters
contactsobject[]requiredArray of contact objects, each using the same fields as Create a contact. Maximum 500 items.
{
"contacts": [
{
"phone": "+233241000002",
"first_name": "Bob"
}
]
}{
"imported": 1,
"skipped": 0,
"failed": 0,
"errors": []
}