Contacts represent the people in your CRM — leads, customers, prospects, and anyone else captured by your agents or imported from another system. Every contact belongs to a specific agent (Documentation Index
Fetch the complete documentation index at: https://docs.clarky.ai/llms.txt
Use this file to discover all available pages before exploring further.
bot_id) and inherits the workspace from your API key.
The Contact object
Unique contact identifier.
The workspace this contact belongs to.
The agent that owns this contact.
Array of
{ email, is_primary } objects. The first item is treated as primary if no is_primary flag is set.Array of
{ phone_number, is_primary } objects.Free-text company name. Use
company_id to link to a structured Company record.Estimated deal value as a number (currency assumed to match workspace settings).
Current stage in a sales pipeline.
Free-form classification (e.g.
"lead", "customer").Workspace-defined custom fields, stored as a free-form JSON object.
ISO 8601 timestamp of the most recent activity.
ISO 8601 timestamp.
ISO 8601 timestamp.
List contacts
GET /api/v1/contactsQuery parameters
| Param | Type | Description |
|---|---|---|
search | string | Match against name, email, phone, or company |
tags | string | Comma-separated list of tags to filter by |
lead_source | string | Filter by lead source |
pipeline_stage_id | string | Filter to contacts in a specific pipeline stage |
bot_id | string | Filter to contacts owned by a specific agent |
created_after | string (ISO 8601) | Created at or after this timestamp |
created_before | string (ISO 8601) | Created at or before this timestamp |
updated_after | string (ISO 8601) | Updated at or after this timestamp |
page | integer | See Pagination |
page_size | integer | See Pagination |
Example
Get contact by email
GET /api/v1/contacts/by-email404 not_found if no contact matches.
Query parameters
| Param | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email to match (case-insensitive) |
Example
Get a contact
GET /api/v1/contacts/{id}Example
Create a contact
POST /api/v1/contactswrite scope.
Body fields
| Field | Type | Required | Description |
|---|---|---|---|
bot_id | string | Yes | Agent that should own this contact |
first_name | string | No | |
last_name | string | No | |
emails | array | No | Array of { email, is_primary } |
phone_numbers | array | No | Array of { phone_number, is_primary } |
company | string | No | Free-text company name |
company_id | string | No | Link to an existing Company |
job_title | string | No | |
lead_source | string | No | |
tags | string[] | No | |
deal_value | number | No | |
pipeline_stage_id | string | No | |
contact_type | string | No | |
address_line1 | string | No | |
address_line2 | string | No | |
city | string | No | |
state | string | No | |
postal_code | string | No | |
country | string | No | |
linkedin_url | string | No | |
notes | string | No | |
custom_fields | object | No |
Example
Update a contact
PATCH /api/v1/contacts/{id}bot_id cannot be changed.
Example
Delete a contact
DELETE /api/v1/contacts/{id}204 No Content with an empty body on success.
Example
Bulk upsert contacts
POST /api/v1/contacts/upsert- Primary email (if provided)
- Primary phone number (if no email match)
Body fields
| Field | Type | Required | Description |
|---|---|---|---|
bot_id | string | Yes | Agent to own newly created contacts |
contacts | array | Yes | Array of contact objects (same fields as Create). Max 200. |
Example
Response
Contacts that were newly inserted.
Contacts that matched an existing record and were updated.
Per-row failures as
{ index, message }. The numeric index is the position of the failing item in the input contacts array. The rest of the batch still succeeds.
