Skip to main content

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

ParameterTypeDescription
searchstringSearch by name or phone number
statusstringFilter by status: cold, warm, hot, customer
pagenumberPage number for pagination
limitnumberNumber 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 CodeMeaning
200Success
201Created
401Unauthorized (Invalid API Key)
403Forbidden (Insufficient permissions)
404Contact not found
429Rate limit exceeded