List Contact Lists
Get a list of all contact lists in your account.
GET
/api/v1/contact-listsContact lists contain a schema that defines the fields for your contacts. All contacts imported to the list must conform to this schema.
Authorization
| Parameter | Type | Description |
|---|---|---|
x-api-keyrequired | string | Your API key Example: |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number for pagination Default: |
limit | number | Number of items per page Default: |
Responses
{"data": [{"id": "cl_abc123","name": "Sales Leads Q1","contactCount": 1250,"schema": {"fields": [{"name": "firstName","type": "string","required": true},{"name": "lastName","type": "string","required": true},{"name": "phoneNumber","type": "phone","required": true},{"name": "company","type": "string"}]},"createdAt": "2024-01-15T10:30:00Z","updatedAt": "2024-01-15T12:45:00Z"}],"pagination": {"page": 1,"limit": 20,"total": 5,"totalPages": 1}}
GET /api/v1/contact-lists
curl -X GET "https://voice.evryhealth.com/api/v1/contact-lists" \-H "x-api-key: YOUR_API_KEY"
Response200
{"data": [{"id": "cl_abc123","name": "Sales Leads Q1","contactCount": 1250,"schema": {"fields": [{"name": "firstName","type": "string","required": true},{"name": "lastName","type": "string","required": true},{"name": "phoneNumber","type": "phone","required": true},{"name": "company","type": "string"}]},"createdAt": "2024-01-15T10:30:00Z","updatedAt": "2024-01-15T12:45:00Z"}],"pagination": {"page": 1,"limit": 20,"total": 5,"totalPages": 1}}
Additional Endpoints
Create Contact List
POST
/api/v1/contact-listsCreate a new contact list with a custom schema.
// Request body{"name": "Sales Leads Q1","schema": {"fields": [{ "name": "firstName", "type": "string", "required": true },{ "name": "lastName", "type": "string", "required": true },{ "name": "phoneNumber", "type": "phone", "required": true },{ "name": "company", "type": "string" },{ "name": "leadScore", "type": "number" }]}}
Schema Field Types
| Type | Description |
|---|---|
string | Text value |
number | Numeric value (integer or decimal) |
boolean | True or false |
phone | Phone number (E.164 format validated) |
email | Email address (validated) |
date | ISO 8601 date string |
Get Contact List
GET
/api/v1/contact-lists/{id}Get details of a specific contact list including its schema and contact count.
Update Schema
PATCH
/api/v1/contact-lists/{id}/schemaUpdate the schema of a contact list. You can add new fields or modify existing ones.
Schema changes
Removing required fields or changing field types may cause validation errors for existing contacts.