Skip to main content

Contacts

Quick Overview

List, view, create, update, delete, and bulk delete contacts through the Public API.

List Contacts​

GET /v1/contacts

List all contacts with pagination, search, and filtering.

Query Parameters​

ParameterTypeDefaultDescription
searchParamstring-Search term for name, email, phone, or custom fields.
pageNumberinteger1Page number.
pageSizeinteger-Number of results per page.
sortBystring-Sort order: asc or desc.
labelIdsstring or array-Filter by label IDs. Can be a single value or comma-separated/list.
channelTypesstring or array-Filter by channel types (platform types). Can be comma-separated/list.
filterOperatorstring-Operator for label/channel filters: AND or OR. Defaults to combined logic as implemented.

Response​

{
"contacts": [
{
"id": "contact_abc123",
"name": "John Doe",
"email": "[email protected]",
"phone": "+1234567890",
"labels": [],
"channels": [],
"customFields": []
}
],
"count": 1,
"hasMore": false
}

Get a Contact​

GET /v1/contacts/{contactId}

Get details for a single contact.

Path Parameters​

ParameterTypeRequiredDescription
contactIdstringYesContact ID.

Response​

{
"contact": {
"id": "contact_abc123",
"name": "John Doe",
"email": "[email protected]",
"phone": "+1234567890",
"labels": [],
"channels": [],
"customFields": []
}
}

Errors​

StatusError CodeDescription
404ERR_CONTACT_NOT_FOUNDContact not found.

Create a Contact​

POST /v1/contacts

Create a new contact.

Request Body​

{
"name": "John Doe",
"phone": "+1234567890",
"email": "[email protected]",
"channels": [
{
"platform": "WHATSAPP",
"identifier": "+1234567890"
}
],
"customFields": [
{
"name": "company",
"value": "Acme Corp"
}
]
}
FieldTypeRequiredDescription
namestringYesContact name (minimum 2 characters).
phonestringYesPhone number.
emailstringNoEmail address.
channelsarrayNoChannel identifiers to link.
channels[].platformstringYesPlatform type.
channels[].identifierstringYesChannel identifier.
customFieldsarrayNoCustom fields.
customFields[].namestringYesField name.
customFields[].valuestringYesField value.

Response​

{
"contact": {
"id": "contact_abc123",
"name": "John Doe",
"phone": "+1234567890"
}
}

Errors​

StatusError CodeDescription
400Validation errorsInvalid input.
409ERR_CONTACT_ALREADY_EXISTSContact already exists.

Update a Contact​

PUT /v1/contacts/{contactId}

Update an existing contact.

Path Parameters​

ParameterTypeRequiredDescription
contactIdstringYesContact ID.

Request Body​

{
"name": "John Smith",
"email": "[email protected]",
"channels": [],
"customFields": [],
"labels": [
{
"labelSlug": "vip"
}
]
}
FieldTypeRequiredDescription
namestringNoContact name (minimum 2 characters).
phonestringNoPhone number.
emailstringNoEmail address.
channelsarrayNoChannel identifiers to link.
customFieldsarrayNoCustom fields.
labelsarrayNoLabels to assign by slug.

Response​

{
"contact": {
"id": "contact_abc123",
"name": "John Smith"
}
}

Errors​

StatusError CodeDescription
400Validation errorsInvalid input.
404ERR_CONTACT_NOT_FOUNDContact not found.

Delete a Contact​

DELETE /v1/contacts/{contactId}

Delete a single contact.

Path Parameters​

ParameterTypeRequiredDescription
contactIdstringYesContact ID.

Response​

{
"message": "Contact deleted successfully"
}

Errors​

StatusError CodeDescription
404ERR_CONTACT_NOT_FOUNDContact not found.

Bulk Delete Contacts​

DELETE /v1/contacts

Delete multiple contacts at once.

Request Body​

{
"contactIds": ["contact_abc123", "contact_def456"]
}
FieldTypeRequiredDescription
contactIdsarrayYesList of contact IDs to delete (minimum 1).

Response​

{
"message": "Contacts deleted successfully"
}

Errors​

StatusError CodeDescription
400Validation errorscontactIds required or empty.
404ERR_CONTACT_NOT_FOUNDOne or more contacts not found.