Contact Events
Contact events provide details on the changes made to your contacts including contact creation, update and deletion. These events can be subscribed to the shared contacts of a company.
Events are sent to a webhook that you (as a company admin or developer) provide. To get started, create a webhook subscription using our API.
Payload
Payloads sent to your webhook will be JWT encoded and will contain the following fields:
Field | Description | Notes |
---|---|---|
event | The type of the event. | Enum: Created, Updated, Deleted. |
contact | The object that represents the created contact, updated contact, or deleted contact. | See below table for the fields of the contact object. |
The contact object:
Field | Description | Notes |
---|---|---|
id | A unique number ID automatically assigned to each contact. | |
type | The type of the contact. | |
first_name | The contact's first name. | |
last_name | The contact's last name. | |
display_name | The contact's display name. | |
phones | The contact's phone numbers. The phone number is in e164 format. | Array of strings. |
primary_phone | The contact's primary phone number in e164 format. | |
emails | The contact's emails. | Array of strings. |
primary_email | The contact's primary email. | |
company_name | The contact's company name. | |
job_title | The contact's job title. | |
urls | The contact's website urls. | |
trunk_group | The contact's trunk group. | |
extension | The contact's extension number. |
Sample payloads
{
"event": "Created",
"contact": {
"id": "5908860123456789",
"type": "shared",
"first_name": "sample",
"last_name": "test",
"display_name": "sample test",
"phones": [
"+16043111111",
"+16043111112"
],
"primary_phone": "+16043111111",
"emails": [
"[email protected]"
],
"primary_email": "[email protected]",
"company_name": "Awesome company",
"job_title": "Awesome job",
"urls": [
"https://foobar.com",
"https://foobar2.com"
],
"trunk_group": "TEST",
"extension": "12345"
}
}
{
"event": "Updated",
"contact": {
"id": "5908860123456789",
"type": "shared",
"first_name": "sample",
"last_name": "test",
"display_name": "sample test",
"phones": [
"+16043111111",
"+16043111112"
],
"primary_phone": "+16043111111",
"emails": [
"[email protected]"
],
"primary_email": "[email protected]",
"company_name": "Awesome company 2",
"job_title": "Awesome job 2",
"urls": [
"https://foobar.com",
"https://foobar2.com"
],
"trunk_group": "TEST",
"extension": "12345"
}
}
{
"event": "Deleted",
"contact": {
"id": "5908860123456789",
"type": "shared",
"first_name": "sample",
"last_name": "test",
"display_name": "sample test",
"phones": [
"+16043111111",
"+16043111112"
],
"primary_phone": "+16043111111",
"emails": [
"[email protected]"
],
"primary_email": "[email protected]",
"company_name": "Awesome company 2",
"job_title": "Awesome job 2",
"urls": [
"https://foobar.com",
"https://foobar2.com"
],
"trunk_group": "TEST",
"extension": "12345"
}
}
Updated about 3 years ago