Using webhooks
Our API supports webhooks which allow you to get real-time web notifications about events that happen within our system. This article explains how to work with webhooks.
What is a webhook?
A webhook is a way for an app to provide other applications with real-time information. When a specific event occurs in our system, we'll send a POST request to the URL configured for the webhook.
Setting up webhooks
To create a new webhook, follow these steps:
- Go to your account settings.
- Select API settings.
- Click on "Webhooks".
- Enter the URL for your webhook endpoint and select the events you want to trigger a webhook.
- Hit "Save".
Webhook events
Our platform supports several webhook events, including:
- User created
- User updated
- Project created
- Project updated
- Project deleted
Webhook payload
When an event occurs in our system, we will send a POST request to your webhook URL with a payload. The payload will come in JSON format and contains information about the event.
{
"id": "event_1337",
"type": "user.created",
"object": "event",
"data": {
"object": {
"type": "user",
"attributes": {
"name": "Richard Hendricks",
"email": "richard@piedpiper.com"
}
}
}
}
Verifying webhooks
To ensure the webhook requests originate from us, we include a signature in the request header with the key X-Our-App-Signature. The signature is a HMAC SHA256 hash of the payload, using your webhook's secret as the key.
Always verify the webhook signature to ensure it's not a malicious request.
If you experience any issues or have any questions about using webhooks, do not hesitate to contact our support team.