Skip to main content

Contacts

Full CRUD over your organization's contacts. All endpoints use API-key authentication and the standard response envelope — see Getting Started for x-api-key, base URL, and rate limits.


List Contacts

GET /v1/contacts

cURL

curl -X GET 'https://app.superwaba.com/api/developer/v1/contacts?page=1&limit=20&search=priya' \
-H 'x-api-key: sgk_YOUR_API_KEY'

Query Parameters

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber20Results per page (max: 100)
searchstring-Search by name or phone number

Response - 200 OK

{
"success": true,
"data": {
"data": [
{
"id": "contact_f1e2d3c4-5678-90ab-cdef-abcdefabcdef",
"name": "Priya Sharma",
"phone": "+919876543210",
"email": "priya@example.com",
"tags": ["vip", "returning"],
"created_at": "2026-03-10T08:00:00.000Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 150
}
}
}

Response - 401 Invalid API Key

{
"success": false,
"message": "Invalid or missing API key",
"code": "INVALID_API_KEY",
"fix": "Include a valid x-api-key header"
}

Create / Update Contact

POST /v1/contacts

cURL

curl -X POST 'https://app.superwaba.com/api/developer/v1/contacts' \
-H 'x-api-key: sgk_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"phone": "919876543210",
"name": "Priya Sharma",
"email": "priya@example.com",
"tags": ["lead", "vip"],
"attributes": {
"company": "Acme Inc",
"source": "website"
}
}'

Request Body

{
"phone": "919876543210",
"name": "Priya Sharma",
"email": "priya@example.com",
"tags": ["lead", "vip"],
"attributes": {
"company": "Acme Inc",
"source": "website"
}
}

Parameters

ParameterTypeRequiredDescription
phonestringYesPhone number (E.164 format without +)
namestringNoContact display name
emailstringNoEmail address
tagsstring[]NoArray of tag strings
attributesobjectNoCustom key-value attributes

Response - 201 Created

{
"success": true,
"data": {
"id": "contact_new12345-6789-01ab-cdef-abcdefabcdef",
"phone": "919876543210",
"name": "Priya Sharma",
"email": "priya@example.com",
"tags": ["lead", "vip"]
}
}

Response - 400 Missing Phone

{
"success": false,
"message": "Missing required field: phone",
"code": "MISSING_FIELD",
"fix": "Include \"phone\" with phone number in E.164 format without \"+\" (e.g. \"919876543210\")"
}

Response - 401 Invalid API Key

{
"success": false,
"message": "Invalid or missing API key",
"code": "INVALID_API_KEY",
"fix": "Include a valid x-api-key header"
}

Get Contact

Fetch a single contact by its id (the id returned by List / Create).

GET /v1/contacts/{id}

cURL

curl -X GET 'https://app.superwaba.com/api/developer/v1/contacts/CONTACT_ID' \
-H 'x-api-key: sgk_YOUR_API_KEY'

Path Parameters

ParameterTypeRequiredDescription
idstringYesContact id (UUID)

Response - 200 OK

{
"success": true,
"data": {
"id": "contact_f1e2d3c4-5678-90ab-cdef-abcdefabcdef",
"userNumber": "919876543210",
"userName": "Priya Sharma",
"countryCode": "91",
"tags": ["vip", "returning"],
"params": { "company": "Acme Inc" }
}
}

Response - 404 Not Found

{
"success": false,
"message": "Contact not found",
"code": "NOT_FOUND"
}

Update Contact

Update an existing contact. Only the fields you include are changed. Tag changes are synced to WhatsApp on a best-effort basis.

PATCH /v1/contacts/{id}

cURL

curl -X PATCH 'https://app.superwaba.com/api/developer/v1/contacts/CONTACT_ID' \
-H 'x-api-key: sgk_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Priya Sharma",
"tags": ["lead", "vip"]
}'

Request Body

{
"name": "Priya Sharma",
"email": "priya@example.com",
"countryCode": "91",
"tags": ["lead", "vip"],
"attributes": { "company": "Acme Inc" }
}

Parameters

ParameterTypeRequiredDescription
idstringYesContact id (path parameter)
namestringNoContact display name
emailstringNoEmail address
countryCodestringNoCountry calling code
tagsstring[]NoFull array of tags (replaces existing tags)
attributesobjectNoCustom key-value attributes (merged)

Response - 200 OK

{
"success": true,
"data": {
"id": "contact_f1e2d3c4-5678-90ab-cdef-abcdefabcdef",
"userNumber": "919876543210",
"userName": "Priya Sharma",
"tags": ["lead", "vip"]
}
}

Response - 404 Not Found

{
"success": false,
"message": "Contact not found",
"code": "NOT_FOUND"
}

Delete Contact

Delete a contact by id.

DELETE /v1/contacts/{id}

cURL

curl -X DELETE 'https://app.superwaba.com/api/developer/v1/contacts/CONTACT_ID' \
-H 'x-api-key: sgk_YOUR_API_KEY'

Path Parameters

ParameterTypeRequiredDescription
idstringYesContact id (UUID)

Response - 200 OK

{
"success": true,
"data": {
"id": "contact_f1e2d3c4-5678-90ab-cdef-abcdefabcdef",
"deleted": true
}
}

Response - 404 Not Found

{
"success": false,
"message": "Contact not found",
"code": "NOT_FOUND"
}