Developers
Webhooks · 3 min read

Webhooks

Let ZigCRM tell your system the moment a contact changes — no polling needed.

When something happens in ZigCRM — a contact is added, changed, deleted, assigned or imported — we send an HTTPS POST to your URL. Your server replies with any 2xx status to say "got it".

Set up a webhook

  1. Go to Settings → Webhooks and click Add webhook.
  2. Enter your URL. It must be a public https:// address.
  3. Pick a format: JSON (most systems) or XML (ERP and SOAP-style systems).
  4. Tick the events you want.
  5. Save, and copy the signing secret (shown once). You'll use it to check requests are really from ZigCRM.
  6. Click Send test — your endpoint should reply 2xx.

You can have up to 10 webhooks. On the same screen you can pause or enable a webhook, rotate its secret, and see its last 50 deliveries.

Events

Event Sent when
contact.created A new contact was added.
contact.updated A contact's details changed.
contact.deleted A single contact was deleted.
contact.assigned A contact got a new owner.
contacts.bulk_imported Contacts were imported in bulk. Batched, up to 100 contacts per request.
contacts.bulk_deleted Several contacts were deleted at once. Batched, up to 100 contacts per request.

See the full payload of each one in the Event catalog.

What you receive

Every event has the same outer shape. Only data changes from event to event:

{
  "event": "contact.created",
  "event_id": "evt_2c1f9b3e-7a4d-4f8e-b6c5-0d9e8f7a6b5c",
  "occurred_at": "2026-10-06T09:15:23.102Z",
  "tenant_id": "5eb926c1-ffa8-4179-b262-e6bed554326d",
  "contact_id": "3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b",
  "actor": { "user_id": "e5b46ecb-b7d6-484f-a903-809fe34b9548" },
  "data": { "contact": { "first_name": "Asha", "…": "…" } }
}

Bulk imports and deletes arrive in batches of up to 100 contacts (in data.contacts), not one request per contact. Big jobs are split into chunks that share a batch_id and are numbered chunk of chunk_count. Chunks can arrive in any order.

All body fields
Field Type Description
event string Event name, e.g. contact.created. Also sent as the X-ZigCRM-Event header.
event_id string Unique id of this event (evt_…). Identical on a retry — use it to ignore duplicates. Also sent as X-ZigCRM-Event-Id and Idempotency-Key.
occurred_at string (date-time) When the event happened, ISO 8601 UTC.
tenant_id string (uuid) Your ZigCRM account id.
contact_id string (uuid) null
actor.user_id string (uuid) null
data object Event-specific content — see each event.
All headers
Header What it is
X-ZigCRM-Event The event name.
X-ZigCRM-Event-Id The event id — same as event_id in the body.
Idempotency-Key Same as X-ZigCRM-Event-Id, for systems that look for this standard header.
X-ZigCRM-Delivery-Attempt 1 for the first try, 2 for the retry.
X-ZigCRM-Timestamp Unix time (seconds) the request was signed.
X-ZigCRM-Signature sha256= + the signature — see Verifying signatures.
X-ZigCRM-Payload-Format json or xml.
Content-Type application/json, or application/xml; charset=utf-8.
User-Agent ZigCRM-Webhooks/1.0.
XML format

The same content, as XML. The root element is <webhook>, nested objects become nested elements, list entries become <item> elements, and empty values become empty elements. In field names (such as custom field keys), characters that aren't allowed in XML are replaced with _, and a name that can't start an element (e.g. one starting with a digit) gets a leading _.

<?xml version="1.0" encoding="UTF-8"?>
<webhook>
  <event>contact.created</event>
  <event_id>evt_2c1f9b3e-7a4d-4f8e-b6c5-0d9e8f7a6b5c</event_id>
  <occurred_at>2026-10-06T09:15:23.102Z</occurred_at>
  <tenant_id>5eb926c1-ffa8-4179-b262-e6bed554326d</tenant_id>
  <contact_id>3f6b2a4e-9c1d-4e8a-a7b2-5d0c9e1f2a3b</contact_id>
  <actor>
    <user_id>e5b46ecb-b7d6-484f-a903-809fe34b9548</user_id>
  </actor>
  <data>
    <contact>
      <first_name>Asha</first_name>
      …
    </contact>
  </data>
</webhook>

Reply quickly

  • Reply 2xx within 8 seconds. We ignore what you send back (the first 1,000 characters are kept in the delivery log to help you debug).
  • Do slow work after replying — for example, put the event on a queue.
  • Redirects (3xx) count as failures.

Retries

If a delivery fails — a timeout, a network error or a non-2xx reply — we wait 2 seconds and try once more, with the same body and X-ZigCRM-Delivery-Attempt: 2. If that fails too, the delivery is marked failed and not sent again.

Note

Missed events while your server was down? Catch up with the API: GET /api/v1/contacts?updated_after=… — see Fetch only what changed.

Duplicates and order

  • Duplicates: you may get the same event twice — for example, when you processed it but replied too slowly. Save each event_id; if you've seen it before, reply 200 and skip it.
  • Order: events can arrive out of order. Use occurred_at, or fetch the latest contact with GET /api/v1/contacts/{id}, when order matters.

Auto-pause

After 10 failed deliveries in a row, the webhook pauses itself and shows Auto-paused in Settings → Webhooks. Events that happen while it's paused are not sent later.

To resume: fix your endpoint → click Send test → click Enable. Failed tests never count towards pausing.

URL rules

Your URL must use https://, can't contain a username or password, and must be on the public internet — localhost and private addresses (such as 10.x, 192.168.x, 172.16–31.x) are rejected. It's checked when you save and again before every delivery.

Testing on your own machine? Use an HTTPS tunnel such as ngrok or Cloudflare Tunnel.