Chatilo
USDPrices shown in US dollars Sign in Start free trial
Guide

Sync contacts from your CRM

Keep the people in your CRM and the contacts in Chatilo in step: push yours in, send changes as they happen, and bring opt-outs and new contacts back.

How contacts are matched #

A contact is identified by its phone number. When you send a contact whose number is already there, that contact is updated; otherwise a new one is added. You never have to ask “does this person exist?” first, and sending the same contact twice does no harm.

Store the id you get back next to the record in your CRM if you can. It lets you update a contact even after their phone number changes.

Step 1: the first load #

Send contacts in batches of up to 100. Each can carry a name, an email, tags, and attributes: your own fields, which can later be used in messages as {{city}} or {{plan}}.

Add or update up to 100 contacts
curl -X POST "https://chatilo.me/api/v1/contacts/bulk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contacts": [
        {
            "phone": "+919876543210",
            "name": "Grace Miller",
            "email": "[email protected]",
            "tags": [
                "Customer"
            ],
            "attributes": {
                "city": "Denver",
                "crm_id": "C-1042"
            }
        },
        {
            "phone": "+919812345678",
            "name": "Ravi Menon",
            "tags": [
                "Lead"
            ],
            "attributes": {
                "city": "Boulder",
                "crm_id": "C-1043"
            }
        }
    ]
}'
Response
{
    "ok": true,
    "created": 1,
    "updated": 1,
    "failed": 0,
    "results": [
        {
            "index": 0,
            "status": "updated",
            "id": 1001,
            "phone": "919876543210",
            "error": null
        },
        {
            "index": 1,
            "status": "created",
            "id": 1002,
            "phone": "919812345678",
            "error": null
        }
    ]
}

Read results: one row per contact, in the order you sent them. A bad row (say, a number without a country code) is reported there with its own error and doesn’t stop the rest.

A key may make 120 requests a minute, so a first load can move up to 12,000 contacts a minute. Watch the X-RateLimit-Remaining header and pause when it nears zero. If the plan’s contact limit is reached, the remaining new contacts are refused with contact_limit; existing ones are still updated.

Only add people who agreed to hear from you on WhatsApp. WhatsApp requires an opt-in, and numbers that report your messages lower your number’s quality rating. If someone has opted out in your CRM, send "opted_in": false with them so they are never messaged.

Step 2: send changes as they happen #

When a record changes in your CRM, send just that contact. Use POST /contacts when you know the phone number:

Add or update one contact
curl -X POST "https://chatilo.me/api/v1/contacts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+919876543210",
    "name": "Grace Miller",
    "attributes": {
        "plan": "Gold"
    }
}'

With this request, name and email are only changed when you send a value, and tags are only added, so a blank field in your CRM never wipes what the team typed in. Attributes are merged: the ones you send are set, the rest stay.

To clear a field, change a phone number or record an opt-out, use PUT with the contact’s id. It changes exactly the fields you send:

Change a number, clear the email, remove an attribute
curl -X PUT "https://chatilo.me/api/v1/contacts/1001" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+919800011122",
    "email": "",
    "attributes": {
        "plan": null
    }
}'

Tags have their own requests, so adding one never disturbs the others: add tags and remove tags. Adding a tag can start a drip sequence set to begin on it, just as it does in the app.

Step 3: bring changes back #

Things change on this side too: new people write in, customers reply STOP, the team corrects a name. There are two ways to hear about it.

As it happens, with webhooks #

Subscribe to contact.created and contact.updated. Each delivery carries the whole contact, and contact.updated lists what changed. This is the better way: nothing to schedule, and no wasted requests. See webhooks.

Hear about new contacts
curl -X POST "https://chatilo.me/api/v1/hooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "contact.created",
    "target_url": "https://example.com/hooks/contacts"
}'

On a schedule, with updated_since #

Or ask every few minutes for contacts that changed since you last asked. Remember the time you started the previous run and send it as updated_since:

Contacts changed since a time
curl "https://chatilo.me/api/v1/contacts?updated_since=2026-01-31T09:00:00Z&limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"

Read every page while has_more is true. Use the time your run started for the next one, so nothing that changed while you were reading is missed; seeing a contact twice is harmless.

updated_since counts changes made through the API, edits on the contact page, new contacts from any channel, and opt-outs. It does not yet count tags changed inside the app, a rename made from the inbox, or a CSV import that updates existing contacts. If you depend on those, run a full comparison now and then, for example nightly.

Opt-outs matter most #

When a customer replies STOP, their contact gets "opted_in": false and an opted_out_at time. Broadcasts skip them and the send endpoints refuse them with opted_out. Copy that back to your CRM so no other system messages them either:

Recent opt-outs
curl "https://chatilo.me/api/v1/contacts?opted_in=false&updated_since=2026-01-31T09:00:00Z" \
  -H "Authorization: Bearer YOUR_API_KEY"

Deleting #

Deleting a contact also deletes its conversations and messages, for good. If someone has simply left your CRM, it is usually better to opt them out or tag them than to delete the history. Delete when you must, for example for a data-erasure request.

Chatilo also has built-in connections to HubSpot and Zoho under Integrations; if you use one of those, you may not need to write this sync at all.

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy