Contacts API
The Contacts API allows you to manage your customer database programmatically. You can search, list, create, update, and delete contacts using your workspace API Keys.
Authentication
All requests to the Contacts API must include your API key in the Authorization header:
Authorization: Bearer sydx_your_api_key_here
List Contacts
Retrieve a paginated list of all contacts in your workspace.
Endpoint
GET /api/v1/contacts
Query Parameters
| Parameter | Type | Description |
|---|---|---|
search | string | Search by name or phone number |
status | string | Filter by status: cold, warm, hot, customer |
page | number | Page number for pagination |
limit | number | Number of results per page (default: 20) |
CURL Example
curl -X GET https://sydxai.com/api/v1/contacts?search=John \
-H "Authorization: Bearer YOUR_API_KEY"
Create Contact
Add a new contact to your CRM manually.
Endpoint
POST /api/v1/contacts
Payload
{
"name": "Customer Name",
"phone": "919876543210",
"email": "customer@example.com",
"tags": ["new-lead"]
}
CURL Example
curl -X POST https://sydxai.com/api/v1/contacts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Doe",
"phone": "9193901XXXXX",
"email": "jane@example.com"
}'
Update Contact
Modify an existing contact's details.
Endpoint
PATCH /api/v1/contacts/:id
Payload
{
"status": "hot",
"name": "Updated Name",
"tags": ["vip", "interested"]
}
CURL Example
curl -X PATCH https://sydxai.com/api/v1/contacts/CONTACT_ID \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "hot"}'
Delete Contact
Permanently remove a contact from your workspace.
Endpoint
DELETE /api/v1/contacts/:id
CURL Example
curl -X DELETE https://sydxai.com/api/v1/contacts/CONTACT_ID \
-H "Authorization: Bearer YOUR_API_KEY"
Error Handling
| Status Code | Meaning |
|---|---|
200 | Success |
201 | Created |
401 | Unauthorized (Invalid API Key) |
403 | Forbidden (Insufficient permissions) |
404 | Contact not found |
429 | Rate limit exceeded |