Headers
Notification headers contain the following informations:
Header name | Example value | Description |
---|---|---|
Content-Type | application/json | Specify the JSON content of the request. |
Content-Length | 770 | The length of the Notification payload in bytes. |
X-Hub-Signature | f47ff6fe9d524f5...d195fa9e6672e | The signature of the request. See the section about this signature for more informations. |
Payloads
Every notification payloads contain common fields:
Field | Type | Description |
---|---|---|
version | number | The current version of Bodyguard's Webhooks. |
challenge | String | See Challenge section. |
time | number (timestamp) | The time at which the event was triggered. |
organization | Object | Details about your Organization (name and ID). |
eventType | String | The event that triggered the Webhook. |
Each eventType has its own dedicated field:
Example:
{
"version": 1,
"challenge": "b4835ef24b353a16760262ad55fe8b2e574ad2fefaafd5870632fc7437309e01",
"time": 1623764480,
"organization": {
"name": "Your organization name",
"id": "The identifier of your organization"
},
"eventType": "MESSAGE_UPDATED | AUTHOR_UPDATED | CONTENT_UPDATED",
"messageUpdatedData | authorUpdatedData | contentUpdatedData": {
// ... Depending on the eventType
}
}
MessageUpdatedData
The messageUpdatedData object contains the following fields:
Example:
{
// ... Common fields
"messageUpdatedData": {
"previousMessage": {
// ... Previous Message payload
},
"newMessage": {
// ... New Message payload
},
"channelId": "cbc601f1-dec6-4594-9476-51628a17499a",
"sourceId": "81310ae5-228e-438e-9720-35f737b9ca9f"
}
}
See the full example of Message payload here
PostUpdatedData
The postUpdatedData object contains the following fields:
Example:
{
// ... Common fields
"contentUpdatedData": {
"previousContent": {
// ... Previous Post payload
},
"newContent": {
// ... New Post payload
},
"sourceId": "81310ae5-228e-438e-9720-35f737b9ca9f"
}
}
See the full example of Post payload here
AuthorUpdatedData
The authorUpdatedData object contains the following fields:
Example:
{
// ... Common fields
"authorUpdatedData": {
"previousAuthor": {
// ... Previous Author payload
},
"newAuthor": {
// ... New Author payload
}
},
"sourceId": "81310ae5-228e-438e-9720-35f737b9ca9f"
}
See the full example of Author payload here