Contacts API
Manage contacts with custom fields, group assignments, and company-scoped isolation.
Overview
The Contacts API provides a standalone contact management system separate from the Wpbox WhatsApp contacts. Use this API to manage your customer database with custom fields, group assignments, and soft-delete support.
Base URL
https://api.wacm.in/api/v1Authentication
All Contacts API requests require a valid Laravel Sanctum personal access token:
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://api.wacm.in/api/v1/contactsList Contacts
Returns a paginated list of contacts for the authenticated user's company.
/v1/contactsQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | Number of results per page (default: 15) |
| page | integer | Optional | Page number for pagination |
curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.wacm.in/api/v1/contacts?limit=10&page=1"Response
{
"data": [
{
"id": 1,
"name": "John Doe",
"phone": "+1234567890",
"email": "john@example.com",
"avatar": null,
"country_id": 1,
"enabled_ai_bot": true,
"subscribed": true,
"credits": 0,
"catalog_token": "abc123...",
"catalog_link": "https://app.wacm.in/s/abc123...",
"created_at": "2026-07-14T10:00:00.000000Z",
"updated_at": "2026-07-14T10:00:00.000000Z",
"first_name": "John",
"company_name": "Acme Inc"
}
],
"links": { "first": "...", "last": "...", "prev": null, "next": "..." },
"meta": { "current_page": 1, "last_page": 5, "per_page": 15, "total": 75 }
}Custom fields are flattened into the root object using their snake_cased name (e.g., First Name becomes first_name).
Create Contact
Create a new contact. The phone field is required; all non-digit characters except leading + are stripped automatically.
/v1/contactsRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone | string | Required | Phone number in international format (e.g., +1234567890) |
| name | string | Optional | Contact name |
| string | Optional | Email address | |
| [custom_field] | string | Optional | Any custom field name (snake_cased) |
curl -X POST https://api.wacm.in/api/v1/contacts \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"phone": "+1234567890",
"email": "jane@example.com",
"company_name": "Acme Inc"
}'Response
{
"message": "Contact created successfully",
"contact": {
"id": 2,
"name": "Jane Smith",
"phone": "+1234567890",
"email": "jane@example.com",
"enabled_ai_bot": true,
"subscribed": true,
"created_at": "2026-07-14T10:00:00.000000Z"
}
}Get Contact
Retrieve a single contact by ID.
/v1/contacts/{id}curl -H "Authorization: Bearer YOUR_TOKEN" \
https://api.wacm.in/api/v1/contacts/1Response
{
"contact": {
"id": 1,
"name": "John Doe",
"phone": "+1234567890",
"email": "john@example.com",
"avatar": null,
"country_id": 1,
"enabled_ai_bot": true,
"subscribed": true,
"credits": 0,
"catalog_token": "abc123...",
"catalog_link": "https://app.wacm.in/s/abc123...",
"created_at": "2026-07-14T10:00:00.000000Z",
"updated_at": "2026-07-14T10:00:00.000000Z"
}
}Update Contact
Update an existing contact. Supports partial updates.
/v1/contacts/{id}| Parameter | Type | Required | Description |
|---|---|---|---|
| phone | string | Optional | Phone number |
| name | string | Optional | Contact name |
| string | Optional | Email address | |
| enabled_ai_bot | boolean | Optional | Enable/disable AI bot for this contact |
| subscribed | boolean | Optional | Subscribe/unsubscribe from campaigns |
| [custom_field] | string | Optional | Any custom field name (snake_cased) |
curl -X PUT https://api.wacm.in/api/v1/contacts/1 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "John Updated",
"enabled_ai_bot": false
}'Response
{
"message": "Contact updated successfully",
"contact": {
"id": 1,
"name": "John Updated",
"phone": "+1234567890",
"enabled_ai_bot": false,
"updated_at": "2026-07-14T12:00:00.000000Z"
}
}Delete Contact
Soft-delete a contact. The contact is marked as deleted but can be restored within 30 days.
/v1/contacts/{id}curl -X DELETE https://api.wacm.in/api/v1/contacts/1 \
-H "Authorization: Bearer YOUR_TOKEN"Response
{
"message": "Contact deleted successfully"
}Error Responses
{
"error": "No active company"
}Custom Fields
Custom fields are dynamically synced from your company's field definitions. When creating or updating a contact, include any custom field name (snake_cased) in the request body. The field must exist in the custom_contacts_fields table.
Custom field values are flattened into the contact response object. For example, a custom field named Company Nameappears as "company_name": "Acme Inc" in the JSON response.
Related Endpoints
- WhatsApp Business API — Wpbox contacts with WhatsApp-specific features
- Verification API — OTP and magic link verification
- AI Flow API — AI-powered flow generation