Webhook events

As an API user, you can always fetch the latest notifications for a user by calling the notifications endpoint, but you can also get real time updates by adding a webhook URL.

Adding a webhook

We are working on API access to webhooks, but in the meantime, as a customer you can add your webhook through our Admin interface.

  1. Add a URL that will receive webhook calls from us
  2. Choose an authentication method:
    1. API key - Your API key will be sent in a X-Webhook-keyheader with the request.
    2. Customer header - You can specify the name and value of the headers that should be sent with the request.
    3. OAuth - We will use a token retrieved from the token URL and client credentials you specify.

Receiving the request

All webhook events are send as an application/json POST request to the specified URL, and the body contains the following envelope:

{"kind": $PAYLOAD_KIND, "data": $PAYLOAD, "meta": $WEBHOOK_METADATA }

Currently the only supported kind is NOTIFICATIONand its payload is the same notification object delivered by the API from the notifications endpoint. The intended recipient of the notification can be found in the profile_idfield in the metadata:

Example notification webhook body

Full notification payload schema can be found in the API documentation

{
  "kind": "NOTIFICATION", 
  "data": {
  	"id": "96146a3a-be9d-4929-9330-41c95c6ca2da",
    "kind": "OWN_PROFILE_POST",
    "sender": "5a19f948-4222-4aaf-9c36-a35d4fb2b66a",
    "title": "Bob wrote a post",
    "body": "...",
    ...
  },
  "meta": { 
    "profile_id": "9b1d4264-7031-4bbf-a929-5008826085e2"
}