Contacts
Contacts endpoints of the ZigCRM Public API.
Every request needs an API key. If something goes wrong, see Errors.
| Endpoint | Description |
|---|---|
GET /api/v1/contacts | List and search contacts |
POST /api/v1/contacts | Create a contact |
GET /api/v1/contacts/{id} | Get a contact |
PATCH /api/v1/contacts/{id} | Update a contact |
DELETE /api/v1/contacts/{id} | Delete a contact |
List and search contacts
/api/v1/contactsRequires scope contacts:read.
Newest first by default. Use updated_after with sort=updated_at&order=asc to sync changes incrementally.
Query parameters
| Parameter | Type | Description |
|---|---|---|
q | string | Search first/last name, email, phone and company. |
page | integer | Default 1. Minimum 1. |
per_page | integer | Values above 100 are capped at 100. Default 25. 1–100. |
status | string | |
source | string | |
assigned_to | string | User id, or "unassigned". |
category_id | string (uuid) | |
created_after | string (date-time) | |
created_before | string (date-time) | |
updated_after | string (date-time) | |
sort | string | One of: created_at, updated_at, first_name, last_activity_at. Default created_at. |
order | string | One of: asc, desc. Default desc. |
Example request
curl "https://api.zigcrm.com/api/v1/contacts?q=asha&per_page=25" \
-H "Authorization: Bearer $ZIGCRM_API_KEY"const res = await fetch('https://api.zigcrm.com/api/v1/contacts?q=asha&per_page=25', {
headers: {
Authorization: `Bearer ${process.env.ZIGCRM_API_KEY}`,
},
});
const json = await res.json();import os, requests
res = requests.get(
"https://api.zigcrm.com/api/v1/contacts?q=asha&per_page=25",
headers={"Authorization": f"Bearer {os.environ['ZIGCRM_API_KEY']}"},
)
print(res.json())Responses
| Status | Description |
|---|---|
| 200 | A page of contacts |
| 401 | unauthorized, invalid_api_key |
| 403 | insufficient_scope, quota_exceeded |
| 422 | validation_failed |
| 429 | rate_limited |
Example 200 response:
{
"data": [
{
"id": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
"first_name": "Asha",
"last_name": "Nair",
"email": "asha@example.com",
"phone": "+919876543210",
"company_name": "string",
"job_title": "string",
"profession": "string",
"address": "string",
"gst_no": "string",
"gender": "male",
"status": "string",
"source": "api",
"tags": [
"vip",
"expo-2026"
],
"assigned_to": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
"category_ids": [
"3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b"
],
"custom_fields": {
"budget": 50000
},
"lead_score": 42,
"lead_priority": "Warm",
"created_at": "2026-10-06T09:15:22.481Z",
"updated_at": "2026-10-06T09:15:22.481Z",
"last_activity_at": "2026-10-06T09:15:22.481Z"
}
],
"pagination": {
"page": 1,
"per_page": 25,
"total": 132,
"total_pages": 6
}
}Create a contact
/api/v1/contactsRequires scope contacts:write.
Requires first_name and an email or phone. Fires the contact.created (and contact.assigned) webhooks.
Request body
Only these fields are accepted; any other field is rejected with 422. Strings are trimmed, and "" clears a field.
| Field | Type | Description |
|---|---|---|
first_name | string | Required on create Max 100 characters. |
last_name | string | null | Max 100 characters. |
email | string | null | Email or phone is required Max 254 characters. |
phone | string | null | International format, e.g. +919876543210 Max 32 characters. |
company_name | string | null | Max 200 characters. |
job_title | string | null | Max 120 characters. |
profession | string | null | Max 120 characters. |
address | string | null | Max 1000 characters. |
gst_no | string | null | Max 15 characters. |
gender | string | null | One of: male, female, other. |
status | string | null | Status key or name; your account's default when omitted on create |
source | string | null | Defaults to "api" on create Max 100 characters. |
tags | string[] | string | Array or comma-separated string |
assigned_to | string | null (uuid) | Must be a user of your account |
category_ids | string (uuid)[] | Replaces the whole list; unknown ids are dropped |
custom_fields | object | { field_key: value } — merged into existing values; send "" to clear one |
Example payload
{
"first_name": "Asha",
"last_name": "Nair",
"email": "asha@example.com",
"phone": "+919876543210",
"company_name": "Nair Textiles",
"job_title": "Purchase Manager",
"address": "12 MG Road, Kochi",
"gender": "female",
"source": "website",
"tags": [
"vip",
"expo-2026"
],
"custom_fields": {
"budget": 50000
}
}Example request
curl -X POST "https://api.zigcrm.com/api/v1/contacts" \
-H "Authorization: Bearer $ZIGCRM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Asha",
"last_name": "Nair",
"email": "asha@example.com",
"phone": "+919876543210",
"company_name": "Nair Textiles",
"job_title": "Purchase Manager",
"address": "12 MG Road, Kochi",
"gender": "female",
"source": "website",
"tags": [
"vip",
"expo-2026"
],
"custom_fields": {
"budget": 50000
}
}'const res = await fetch('https://api.zigcrm.com/api/v1/contacts', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.ZIGCRM_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"first_name": "Asha",
"last_name": "Nair",
"email": "asha@example.com",
"phone": "+919876543210",
"company_name": "Nair Textiles",
"job_title": "Purchase Manager",
"address": "12 MG Road, Kochi",
"gender": "female",
"source": "website",
"tags": [
"vip",
"expo-2026"
],
"custom_fields": {
"budget": 50000
}
}),
});
const json = await res.json();import os, requests
res = requests.post(
"https://api.zigcrm.com/api/v1/contacts",
headers={"Authorization": f"Bearer {os.environ['ZIGCRM_API_KEY']}"},
json={
"first_name": "Asha",
"last_name": "Nair",
"email": "asha@example.com",
"phone": "+919876543210",
"company_name": "Nair Textiles",
"job_title": "Purchase Manager",
"address": "12 MG Road, Kochi",
"gender": "female",
"source": "website",
"tags": [
"vip",
"expo-2026"
],
"custom_fields": {
"budget": 50000
}
},
)
print(res.json())Responses
| Status | Description |
|---|---|
| 201 | Created. The Location header points to the new contact. |
| 400 | bad_request |
| 401 | unauthorized, invalid_api_key |
| 403 | insufficient_scope, quota_exceeded |
| 409 | duplicate, conflict |
| 422 | validation_failed |
| 429 | rate_limited |
Example 201 response:
{
"data": {
"id": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
"first_name": "Asha",
"last_name": "Nair",
"email": "asha@example.com",
"phone": "+919876543210",
"company_name": "string",
"job_title": "string",
"profession": "string",
"address": "string",
"gst_no": "string",
"gender": "male",
"status": "string",
"source": "api",
"tags": [
"vip",
"expo-2026"
],
"assigned_to": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
"category_ids": [
"3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b"
],
"custom_fields": {
"budget": 50000
},
"lead_score": 42,
"lead_priority": "Warm",
"created_at": "2026-10-06T09:15:22.481Z",
"updated_at": "2026-10-06T09:15:22.481Z",
"last_activity_at": "2026-10-06T09:15:22.481Z"
}
}Get a contact
/api/v1/contacts/{id}Requires scope contacts:read.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id required | string (uuid) |
Example request
curl "https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b" \
-H "Authorization: Bearer $ZIGCRM_API_KEY"const res = await fetch('https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b', {
headers: {
Authorization: `Bearer ${process.env.ZIGCRM_API_KEY}`,
},
});
const json = await res.json();import os, requests
res = requests.get(
"https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
headers={"Authorization": f"Bearer {os.environ['ZIGCRM_API_KEY']}"},
)
print(res.json())Responses
| Status | Description |
|---|---|
| 200 | The contact |
| 400 | bad_request |
| 401 | unauthorized, invalid_api_key |
| 403 | insufficient_scope, quota_exceeded |
| 404 | not_found |
Example 200 response:
{
"data": {
"id": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
"first_name": "Asha",
"last_name": "Nair",
"email": "asha@example.com",
"phone": "+919876543210",
"company_name": "string",
"job_title": "string",
"profession": "string",
"address": "string",
"gst_no": "string",
"gender": "male",
"status": "string",
"source": "api",
"tags": [
"vip",
"expo-2026"
],
"assigned_to": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
"category_ids": [
"3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b"
],
"custom_fields": {
"budget": 50000
},
"lead_score": 42,
"lead_priority": "Warm",
"created_at": "2026-10-06T09:15:22.481Z",
"updated_at": "2026-10-06T09:15:22.481Z",
"last_activity_at": "2026-10-06T09:15:22.481Z"
}
}Update a contact
/api/v1/contacts/{id}Requires scope contacts:write.
Partial update — only the fields sent change. Fires contact.updated (and contact.assigned when the owner changes). Status-change auto-messages are not sent for API updates.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id required | string (uuid) |
Request body
Only these fields are accepted; any other field is rejected with 422. Strings are trimmed, and "" clears a field.
| Field | Type | Description |
|---|---|---|
first_name | string | Required on create Max 100 characters. |
last_name | string | null | Max 100 characters. |
email | string | null | Email or phone is required Max 254 characters. |
phone | string | null | International format, e.g. +919876543210 Max 32 characters. |
company_name | string | null | Max 200 characters. |
job_title | string | null | Max 120 characters. |
profession | string | null | Max 120 characters. |
address | string | null | Max 1000 characters. |
gst_no | string | null | Max 15 characters. |
gender | string | null | One of: male, female, other. |
status | string | null | Status key or name; your account's default when omitted on create |
source | string | null | Defaults to "api" on create Max 100 characters. |
tags | string[] | string | Array or comma-separated string |
assigned_to | string | null (uuid) | Must be a user of your account |
category_ids | string (uuid)[] | Replaces the whole list; unknown ids are dropped |
custom_fields | object | { field_key: value } — merged into existing values; send "" to clear one |
Example payload
Send only the fields you want to change — everything else stays as it is.
{
"phone": "+919812345678",
"company_name": "Nair Textiles Pvt Ltd",
"status": "qualified",
"tags": [
"vip",
"repeat-customer"
],
"custom_fields": {
"budget": 75000
}
}Example request
curl -X PATCH "https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b" \
-H "Authorization: Bearer $ZIGCRM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+919812345678",
"company_name": "Nair Textiles Pvt Ltd",
"status": "qualified",
"tags": [
"vip",
"repeat-customer"
],
"custom_fields": {
"budget": 75000
}
}'const res = await fetch('https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.ZIGCRM_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"phone": "+919812345678",
"company_name": "Nair Textiles Pvt Ltd",
"status": "qualified",
"tags": [
"vip",
"repeat-customer"
],
"custom_fields": {
"budget": 75000
}
}),
});
const json = await res.json();import os, requests
res = requests.patch(
"https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
headers={"Authorization": f"Bearer {os.environ['ZIGCRM_API_KEY']}"},
json={
"phone": "+919812345678",
"company_name": "Nair Textiles Pvt Ltd",
"status": "qualified",
"tags": [
"vip",
"repeat-customer"
],
"custom_fields": {
"budget": 75000
}
},
)
print(res.json())Responses
| Status | Description |
|---|---|
| 200 | The updated contact |
| 400 | bad_request |
| 401 | unauthorized, invalid_api_key |
| 403 | insufficient_scope, quota_exceeded |
| 404 | not_found |
| 409 | duplicate, conflict |
| 422 | validation_failed |
Example 200 response:
{
"data": {
"id": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
"first_name": "Asha",
"last_name": "Nair",
"email": "asha@example.com",
"phone": "+919876543210",
"company_name": "string",
"job_title": "string",
"profession": "string",
"address": "string",
"gst_no": "string",
"gender": "male",
"status": "string",
"source": "api",
"tags": [
"vip",
"expo-2026"
],
"assigned_to": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
"category_ids": [
"3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b"
],
"custom_fields": {
"budget": 50000
},
"lead_score": 42,
"lead_priority": "Warm",
"created_at": "2026-10-06T09:15:22.481Z",
"updated_at": "2026-10-06T09:15:22.481Z",
"last_activity_at": "2026-10-06T09:15:22.481Z"
}
}Delete a contact
/api/v1/contacts/{id}Requires scope contacts:delete.
Refused with 409 while deals, tasks or notes are linked to the contact. Fires contact.deleted.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id required | string (uuid) |
Example request
curl -X DELETE "https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b" \
-H "Authorization: Bearer $ZIGCRM_API_KEY"const res = await fetch('https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.ZIGCRM_API_KEY}`,
},
});
console.log(res.status); // 204 on successimport os, requests
res = requests.delete(
"https://api.zigcrm.com/api/v1/contacts/3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
headers={"Authorization": f"Bearer {os.environ['ZIGCRM_API_KEY']}"},
)
print(res.status_code) # 204 on successResponses
| Status | Description |
|---|---|
| 204 | Deleted |
| 400 | bad_request |
| 401 | unauthorized, invalid_api_key |
| 403 | insufficient_scope, quota_exceeded |
| 404 | not_found |
| 409 | duplicate, conflict |