Contacts via the API
The API lets you fetch your contact list and add or update contacts programmatically, for example, to sync your own customer base through webhooks.
POST /v1/contacts: create or update contacts
Adds new contacts and updates the names of existing ones in the channel you specify.
URL
POST https://api.wazzabee.com/api-gateway/v1/contacts
Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Request body: a single contact
{
"channel_id": "channel UUID",
"phone": "+996550202160",
"name": "Diana"
}
Request body: a list (up to 1000 at a time)
{
"channel_id": "channel UUID",
"contacts": [
{ "phone": "+996550202160", "name": "Diana" },
{ "phone": "77011234567", "name": "Ivan" }
]
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string (UUID) | ✅ Yes | The channel ID. Get it via GET /v1/channels |
phone | string | ✅ Yes | The number in any format: extra characters (+, spaces, brackets) are stripped out |
name | string | No | The contact's name. If you leave it out, a new contact gets its number as the name and an existing contact keeps the name it has |
How it behaves
- If the channel has no contact with that number, it is created.
- If the contact exists and
nameis passed, only the name is updated. Notes, avatar and other data are left untouched. - The number is normalized down to digits; duplicate numbers within one request are merged.
Response
{ "success": true, "added": 2, "updated": 0, "skipped": 0 }
🔒 Data isolation: contacts are only ever added to your own channel. Your API key cannot write or read contacts belonging to another account.
Example (curl)
curl -X POST https://api.wazzabee.com/api-gateway/v1/contacts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_id":"UUID","phone":"+996550202160","name":"Diana"}'
GET /v1/contacts: the contact list
Returns contacts with pagination and search.
GET https://api.wazzabee.com/api-gateway/v1/contacts?limit=50&offset=0&search=Diana
| Parameter | Description |
|---|---|
limit | How many to return (1–200, 50 by default) |
offset | The offset for pagination |
channel_id | Optional: only contacts from this channel |
search | Search by name or number |
Response
{
"success": true,
"contacts": [
{ "id": "...", "name": "Diana", "phone": "996550202160", "channelId": "...", "channelType": "whatsapp_qr" }
],
"total": 120
}