Contact Events
Webhook
Online sends a contact event to your webhook when a contact is created, changed or deleted.
| Subscription | Sent when |
|---|---|
contact_created | A contact was created. |
contact_updated | A contact changed. Includes changed_attributes. |
contact_deleted | A contact was deleted. |
The payload is the contact. Contact events are account-wide: they are sent
for every inbox, whatever the webhook's inbox_ids.
Settings:
| Setting | Value |
|---|---|
| URL | Your webhook URL — create the webhook with Add Webhook and choose its events in subscriptions |
| Method | JSON via POST |
Example — contact_updated:
{
"event": "contact_updated",
"type": "contact",
"id": 801,
"name": "Dana Cohen",
"email": "dana.cohen@example.com",
"phone_number": "+972501234567",
"identifier": "crm-801",
"additional_attributes": {
"company_name": "Example Ltd",
"city": "Tel Aviv"
},
"custom_attributes": {
"customer_tier": "gold"
},
"avatar": "",
"thumbnail": "",
"account": {
"id": 12,
"name": "Example Account"
},
"changed_attributes": [
{
"name": {
"previous_value": "Dana",
"current_value": "Dana Cohen"
}
}
],
"allow_unverified_ssl": false
}
Payload explained
| Parameter | Description / Example |
|---|---|
event | What happened. See the values below. |
type | Always contact. |
id | The contact ID. |
name | The name. |
email | The email. |
phone_number | The phone number in E.164 format. |
identifier | Your own external ID for the contact. |
additional_attributes | Standard extra fields, such as company_name and city. |
custom_attributes | The contact's custom attributes. |
avatar | The avatar URL, or an empty string. |
thumbnail | The avatar thumbnail URL, or an empty string. |
account | The account. |
changed_attributes | contact_updated only. What changed: one object per attribute, keyed by its name, with its previous_value and current_value. |
allow_unverified_ssl | Added by Online to every payload. |
event
| Value | Explanation |
|---|---|
| contact_created | A contact was created. |
| contact_updated | A contact changed. |
| contact_deleted | A contact was deleted. |
Webhook payload
Your response
- 200
Answer with any 2xx status within 5 seconds. Online ignores the body of your answer, and does not send the event again.