Notification Object
Example Notification Object
{
"type": "notification_event",
"topic": "company.created",
"id": "notif_ccd8a4d0-f965-11e3-a367-c779cae3e1b3",
"created_at": 1392731331,
"delivery_attempts": 1,
"first_sent_at": 1392731392,
"data": {
"item": {
"type": "company",
"id": "531ee472cce572a6ec000006",
"name": "Blue Sun",
"company_id": "6",
"remote_created_at": 1394531169,
"created_at": 1394533506,
"updated_at": 1396874658,
"custom_attributes": {
}
}
}
}
A notification object contains the following fields -
Attribute | Type | Description |
---|---|---|
type | string | value is 'notification_event' |
id | string | The Intercom defined id representing the notification. |
self | string | The Intercom defined URL for the subscription. Optional |
created_at | timestamp | The timestamp the notification was created. |
topic | string | Corresponds to a topic, eg 'company.created', 'conversation.assigned' |
delivery_attempts | number | The number of times this notification has been attempted. |
first_sent_at | timestamp | The first time the delivery was attempted. |
data | object | A container for the data associated with the notification. |
data.item | object | The data associated with the notification, which will have a 'type' field. |
The contents of data.item
object will be defined according to its type
field. In the example to the right, the type value of company
indicates a company object.