Many of the underlying providers notify the Work-API if there are any changes to the contents of an account, for example if a new email arrives.
We in turn provide a webhook system to inform subscribed applications of those changes. When receiving those updates, the application can then take appropriate actions, such as updating the display or informing the user of the update.
In the developer accound on the Dashboard, navigate to the Webhooks page.
Clicking Add Webhook Subscription will display the creation form.
Enter the destination URL and click Save, then the list of saved webhook subscriptions will be displayed.
NOTE:
All webhooks are equal and so receive all notifications. We plan to add scoped webhooks, allowing a webhook subscription to process only a subset of integrations (e.g. only notifications for emails), in the near future.
POST https://your.app/webhook
Content-Type: application/json; charset=utf-8
{
"data": {
"id": "<notification guid>",
"type": "notification",
"attributes": {
"channel_id": "<user arbitrary_id>",
"provider": "<e.g. 'gmail'>",
"provider_id": "<e.g. 'larry@gmail.com'>"
},
"relationships": {
"changes": [
{ "id": "<change guid>", "type": "change" },
...
]
}
},
"included": [
{
"id": "<change guid>",
"type": "change",
"attributes": {
"change_type": "<e.g. creation>",
"detail": "<if available>",
"resource_id": "<if available>",
}
},
...
]
}