Contacts
Create, read, update, delete, and search contacts.
List Contacts
Retrieve a paginated list of contacts.
GET /api/v1/contactsRequired scope: contacts:read
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 25 | Results per page (1–100) |
cursor | string | — | Pagination cursor from a previous response |
search | string | — | Filter by name or phone number |
groupId | string | — | Filter by contact group ID |
tags | string | — | Filter by tag (comma-separated for multiple) |
Example Request
curl -X GET "https://app.erzycall.com/api/v1/contacts?limit=20&tags=vip" \
-H "X-API-Key: ek_live_abc123"Example Response
{
"data": [
{
"id": "contact_456",
"title": "John Doe",
"phone": "+14155551234",
"email": "john@example.com",
"tags": ["vip", "enterprise"],
"createdAt": "2025-01-10T08:00:00Z"
}
],
"pagination": {
"cursor": "eyJwb3...",
"hasMore": false,
"pageSize": 20
}
}Search Contacts
Full-text search across contact names and phone numbers.
GET /api/v1/contacts/searchRequired scope: contacts:read
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
q | string | — | Search query (min 2 characters) |
limit | integer | 10 | Max results (1–50) |
Example Request
curl -X GET "https://app.erzycall.com/api/v1/contacts/search?q=john&limit=5" \
-H "X-API-Key: ek_live_abc123"Example Response
{
"data": [
{
"id": "contact_456",
"title": "John Doe",
"phone": "+14155551234",
"email": "john@example.com"
}
]
}Create Contact
Create a new contact.
POST /api/v1/contactsRequired scope: contacts:write
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Contact name (1–200 chars) |
phone | string | Yes | Phone in E.164 format (e.g., +14155551234) |
email | string | No | Email address |
notes | string | No | Notes (max 5,000 chars) |
tags | string[] | No | Tags (max 20 tags, each max 50 chars) |
groupIds | string[] | No | Contact group IDs to add this contact to (max 20) |
customFields | object | No | Arbitrary key-value custom fields |
Example Request
curl -X POST "https://app.erzycall.com/api/v1/contacts" \
-H "X-API-Key: ek_live_abc123" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: create-contact-john" \
-d '{
"title": "John Doe",
"phone": "+14155551234",
"email": "john@example.com",
"tags": ["vip"],
"customFields": {"company": "Acme Inc"}
}'Example Response (201 Created)
{
"data": {
"id": "contact_456",
"title": "John Doe",
"phone": "+14155551234",
"email": "john@example.com",
"tags": ["vip"],
"customFields": {"company": "Acme Inc"},
"createdAt": "2025-01-15T10:30:00Z"
}
}Errors
| Status | Code | Description |
|---|---|---|
| 409 | CONFLICT | A contact with this phone number already exists |
Get Contact
Retrieve details for a single contact.
GET /api/v1/contacts/{id}Required scope: contacts:read
Example Request
curl -X GET "https://app.erzycall.com/api/v1/contacts/contact_456" \
-H "X-API-Key: ek_live_abc123"Example Response
{
"data": {
"id": "contact_456",
"title": "John Doe",
"phone": "+14155551234",
"email": "john@example.com",
"tags": ["vip", "enterprise"],
"createdAt": "2025-01-10T08:00:00Z"
}
}Update Contact
Update fields on an existing contact. Only include the fields you want to change.
PATCH /api/v1/contacts/{id}Required scope: contacts:write
Request Body
All fields are optional. Only provided fields are updated.
| Field | Type | Description |
|---|---|---|
title | string | Contact name (1–200 chars) |
phone | string | Phone in E.164 format |
email | string | Email address |
notes | string | Notes (max 5,000 chars) |
tags | string[] | Replace all tags |
groupIds | string[] | Replace all group memberships |
customFields | object | Replace all custom fields |
Example Request
curl -X PATCH "https://app.erzycall.com/api/v1/contacts/contact_456" \
-H "X-API-Key: ek_live_abc123" \
-H "Content-Type: application/json" \
-d '{"tags": ["vip", "enterprise"], "notes": "Updated notes"}'Example Response
{
"data": {
"id": "contact_456",
"title": "John Doe",
"phone": "+14155551234",
"email": "john@example.com",
"tags": ["vip", "enterprise"],
"notes": "Updated notes",
"createdAt": "2025-01-10T08:00:00Z"
}
}Delete Contact
Permanently delete a contact.
DELETE /api/v1/contacts/{id}Required scope: contacts:write
Example Request
curl -X DELETE "https://app.erzycall.com/api/v1/contacts/contact_456" \
-H "X-API-Key: ek_live_abc123"Response
Returns 204 No Content on success.