Webhooks
Webhooks are HTTP notifications which notify third-party web based applications whenever a specific event occurs. For example, sending a Webhook to another system whenever someone interacts with one of your thyngs.
Sending a Webhook will not make anything happen in another system, you need to write code to listen for, and react to the Webhook. For testing purposes, a site like http://requestb.in may be useful to forward your Webhooks to, this will allow you to view the data which is sent by our Webhooks without the need for you to implement a full listener service.
Get Started
The first step is to configure a new Integration.
Go to MyThyngs > Developer > Integrations
Each integration allows you to setup authorisation and a base URL to send Webhooks to. If you wish to send your Webhooks to multiple domains, you will need to create multiple integrations.
Webhooks use basic tokenised authorisation. The application that receives the Webhook will need to check the Authorisation header to ensure it contains the correct authentication token. You can reset your authentication token at any time at MyThyngs > Developer > Integrations
Next, create your first Webhook Trigger.
Go to MyThyngs > Developer > Webhooks
Webhooks can be sent when different events occur on Thyngs platform. You can also define the URL where the Webhook should be sent to.
Sent Webhooks
You can view a list of sent Webhooks at MyThyngs > Developer > Queue. In some cases, Webhooks will fail to send. This could be because of invalid authentication or an incorrect URL being configured. If this happens you can resend a failed Webhook on the Queue page.
Receiving Webhooks
Webhooks are sent as HTTP POST requests. The URL which the Webhook is sent to will need to handle the HTTP headers in the request.
- Content-Type & Content-Length: Standard Headers, which you may need to parse to determine the format and length of the data.
- Item-Name: The name of the Item in MyThyngs E.g. “Interaction”, “Project”.
- Event-Name: The name of the action that triggered the webhook to be sent. E.g. “Update” or “Create”.
Events
The following are avaliable events that we support.
Event Name | Description | |
---|---|---|
COMPANY INFO UPDATED | A platform event that triggers when a user has updated some information on their account | Model Information |
CONVERSION OCCURED | Event fires when user has interacted with a thyng and done an event within the experience i.e Donation | Model Information |
FORM RESPONSE COLLECTED | Triggers when a user has completed a form and the response has been saved to the database | Model Information |
GIFTAID COLLECTED | Event fires when user has completed a donation and then completed the giftaid form | Model Information |
INTERACTION OCCURED | Event fires when user has interacted with one of your things | Model Information |
NEW USER COMPANY ADDED | Triggers when a new user is added | Model Information |
OBJECT ADDED | A platform event that triggers when a user has created a new object | Model Information |
OBJECT DELETED | A platform event that trigger when a user has deleted a object | Model Information |
OBJECT UPDATED | A platform event that trigger when a user has updated the settings of one of their objects | Model Information |
PAGE ADDED | A platform event that triggers when a user has added a page | Model Information |
PAGE DELETED | A platform event that triggers when a user has deleted a page | Model Information |
PAGE UPDATED | A platform event that trigger when a user has updated a page | Model Information |
PROJECT ADDED | A platform event that triggers when a user has created a new project | Model Information |
PROJECT DELETED | A platform event that trigger when a user has deleted a project | Model Information |
PROJECT UPDATED | A platform event that trigger when a user has updated the settings of one of their projects | Model Information |
REDEMPTION CODE GIVEN | Triggers when all stamp are collected and user is given a redemption code | Model Information |
STAMP COLLECTED | Triggers when a stamp is collected | Model Information |
SUBSCRIPTION CREATED | Triggers when a user has signed up to a subscription | Model Information |
SUBSCRIPTION UPDATED | Triggers when a subscription details has updated, i.e when a new billing period has started or when an invoice has been paid | Model Information |
THYNG ADDED | A platform event that triggers when a user has assigned a new thyng | Model Information |
THYNG DELETED | A platform event that trigger when a user has unassigned a thyng | Model Information |
THYNG UPDATED | A platform event that trigger when a user has updated the settings of one of their thyngs | Model Information |