Developers
API reference · 4 min read

Contacts

Contacts endpoints of the ZigCRM Public API.

Every request needs an API key. If something goes wrong, see Errors.

EndpointDescription
GET /api/v1/contactsList and search contacts
POST /api/v1/contactsCreate 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

GET/api/v1/contacts

Requires scope contacts:read.

Newest first by default. Use updated_after with sort=updated_at&order=asc to sync changes incrementally.

Query parameters

ParameterTypeDescription
qstringSearch first/last name, email, phone and company.
pageintegerDefault 1. Minimum 1.
per_pageintegerValues above 100 are capped at 100. Default 25. 1–100.
statusstring
sourcestring
assigned_tostringUser id, or "unassigned".
category_idstring (uuid)
created_afterstring (date-time)
created_beforestring (date-time)
updated_afterstring (date-time)
sortstringOne of: created_at, updated_at, first_name, last_activity_at. Default created_at.
orderstringOne 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

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

POST/api/v1/contacts

Requires 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.

FieldTypeDescription
first_namestringRequired on create Max 100 characters.
last_namestring | nullMax 100 characters.
emailstring | nullEmail or phone is required Max 254 characters.
phonestring | nullInternational format, e.g. +919876543210 Max 32 characters.
company_namestring | nullMax 200 characters.
job_titlestring | nullMax 120 characters.
professionstring | nullMax 120 characters.
addressstring | nullMax 1000 characters.
gst_nostring | nullMax 15 characters.
genderstring | nullOne of: male, female, other.
statusstring | nullStatus key or name; your account's default when omitted on create
sourcestring | nullDefaults to "api" on create Max 100 characters.
tagsstring[] | stringArray or comma-separated string
assigned_tostring | null (uuid)Must be a user of your account
category_idsstring (uuid)[]Replaces the whole list; unknown ids are dropped
custom_fieldsobject{ 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

StatusDescription
201Created. The Location header points to the new contact.
400bad_request
401unauthorized, invalid_api_key
403insufficient_scope, quota_exceeded
409duplicate, conflict
422validation_failed
429rate_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

GET/api/v1/contacts/{id}

Requires scope contacts:read.

Path parameters

ParameterTypeDescription
id requiredstring (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

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

PATCH/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

ParameterTypeDescription
id requiredstring (uuid)

Request body

Only these fields are accepted; any other field is rejected with 422. Strings are trimmed, and "" clears a field.

FieldTypeDescription
first_namestringRequired on create Max 100 characters.
last_namestring | nullMax 100 characters.
emailstring | nullEmail or phone is required Max 254 characters.
phonestring | nullInternational format, e.g. +919876543210 Max 32 characters.
company_namestring | nullMax 200 characters.
job_titlestring | nullMax 120 characters.
professionstring | nullMax 120 characters.
addressstring | nullMax 1000 characters.
gst_nostring | nullMax 15 characters.
genderstring | nullOne of: male, female, other.
statusstring | nullStatus key or name; your account's default when omitted on create
sourcestring | nullDefaults to "api" on create Max 100 characters.
tagsstring[] | stringArray or comma-separated string
assigned_tostring | null (uuid)Must be a user of your account
category_idsstring (uuid)[]Replaces the whole list; unknown ids are dropped
custom_fieldsobject{ 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

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

DELETE/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

ParameterTypeDescription
id requiredstring (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 success
import 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 success

Responses