Contacts
Manage the people you message and the lists you group them into.
Required scopes: contacts.read for reads, contacts.write for writes.
List contacts
GET /api/v1/contacts
Query parameters:
| Parameter | Type | Description |
|---|---|---|
search |
string | Match name, phone, or email |
page |
integer | Page number (default 1) |
pageSize |
integer | Items per page (default 50, max 100) |
Response:
{
"success": true,
"contacts": [
{ "id": 42, "phoneNumber": "+919812345678", "firstName": "Raj", "email": "[email protected]" }
],
"pagination": { "page": 1, "pageSize": 50, "total": 1 }
}
cURL Example:
curl "https://waflow.edesy.in/api/v1/contacts?search=raj&pageSize=20" \
-H "X-API-Key: wc_your_api_key"
Create a contact
POST /api/v1/contacts
Request Body:
{
"phoneNumber": "+919812345678",
"firstName": "Raj",
"lastName": "Sharma",
"email": "[email protected]",
"customFields": { "plan": "gold" },
"notes": "VIP customer"
}
Only phoneNumber is required. Created contacts are tagged source: api.
cURL Example:
curl -X POST "https://waflow.edesy.in/api/v1/contacts" \
-H "X-API-Key: wc_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "phoneNumber": "+919812345678", "firstName": "Raj" }'
Get a contact
GET /api/v1/contacts/{id}
Returns 404 with code: NOT_FOUND if the contact doesn't exist.
Update a contact
PATCH /api/v1/contacts/{id}
Request Body (any subset):
{
"firstName": "Rajesh",
"email": "[email protected]",
"customFields": { "plan": "platinum" },
"optedOut": false
}
Delete a contact
DELETE /api/v1/contacts/{id}
Response:
{ "success": true }
Contact lists
Group contacts into static lists (useful as campaign audiences).
List all lists
GET /api/v1/contact-lists
Create a list
POST /api/v1/contact-lists
Request Body:
{ "name": "VIP Customers", "description": "High‑value accounts" }
Get a list
GET /api/v1/contact-lists/{id}
Add contacts to a list
POST /api/v1/contact-lists/{id}/contacts
Request Body:
{ "contactIds": [42, 43, 44] }
Response:
{ "success": true, "added": 3 }
Delete a list
DELETE /api/v1/contact-lists/{id}
cURL Example:
curl -X POST "https://waflow.edesy.in/api/v1/contact-lists" \
-H "X-API-Key: wc_your_api_key" \
-H "Content-Type: application/json" \
-d '{ "name": "VIP Customers" }'