GET/contacts
List all contacts with optional pagination and filters.
GET /api/contacts?page=1&limit=50&tag=vip
// Response
{
"success": true,
"data": {
"contacts": [
{
"id": "contact_abc123",
"name": "John Doe",
"phone": "+919876543210",
"email": "[email protected]",
"tags": ["vip", "newsletter"],
"customFields": { "company": "Acme Inc" },
"createdAt": "2025-01-15T10:30:00Z"
}
],
"total": 1250,
"page": 1,
"limit": 50
}
}POST/contacts
Create a new contact.
POST /api/contacts
Content-Type: application/json
{
"name": "Jane Smith",
"phone": "+14155551234",
"email": "[email protected]",
"tags": ["lead", "webinar"],
"customFields": {
"company": "TechCorp",
"plan": "Enterprise"
}
}
// Response
{
"success": true,
"data": {
"id": "contact_def456",
"name": "Jane Smith",
...
}
}GET/contacts/:id
Get a single contact by ID.
PATCH/contacts/:id
Update a contact's details, tags, or custom fields.
PATCH /api/contacts/contact_abc123
Content-Type: application/json
{
"name": "John D.",
"tags": ["vip", "newsletter", "premium"]
}DELETE/contacts/:id
Permanently delete a contact and all associated data.
Tag Management
POST
/contacts/:id/tags — Add tags to a contactDELETE
/contacts/:id/tags/:tag — Remove a tag