Webhooks
Notify your applications in real time when an event happens in Dastra: configuring, receiving, securing and managing webhooks with the API.
Concept
A webhook triggers an action in response to an event. Webhooks are used to make systems communicate: they alert you as soon as something happens in Dastra. The aim is to notify third-party applications (APIs, CRM, serverless functions, etc.) in real time.
Configuration
Webhooks are configured at the organization level and are reserved for owners. Click the gear icon in the top bar (Organization settings), then Webhooks in the left menu. The direct address is https://app.dastra.eu/general-settings/webhooks.

Click Create a webhook url.
Enter the Webhook url. To learn what it receives, see How to receive the webhook.
Choose the workspace in Select a specific workspace. If you choose none, the webhook applies to All workspaces.
Optional: enter the Email address used to send notification in the event of repeated failure. Dastra sends an email to this address when the webhook goes into error.
Select the event or events you want to subscribe to in Which events would you like to subscribe? At least one event is required. The type of data returned depends on the event: for example, if you choose the creation of a data subject request, the request body contains a JSON describing that request.
Click Save changes.

The available events are those of the notification center, grouped by object type (processing activities, data subject requests, data breaches, etc.).
This takes you to the webhook details screen. It shows the url, the workspace, the status of the webhook (Enabled or Disabled), the Last error message if any, the subscribed events and the Signature key, which you can copy. The Edit, Send a test webhook and Delete buttons are there too.

How to receive the webhook
To receive webhook requests, you need to create an event capture API endpoint. The request is made as a POST and is always structured in the same way. The request body contains a JSON with the details of the event triggered.
Here is the general structure of the request sent:
A timeout of 10 seconds is applied to the request, after which it is in error. The response must be a success code (2xx), for example 200.
There may be a small delay between the moment the event occurs in the application and the sending of the webhook. This delay is linked to the asynchronous nature of webhook execution in our infrastructure. It depends on the load of the infrastructure and can go up to 60 to 120 seconds.
Test your webhook url
To test your webhook in real-life conditions, open its details screen and click Send a test webhook. In the Webhook test sender window:
Choose the event to test in Choose the event you would like to test. The list shows the events the webhook is subscribed to.
If needed, change the data sent in Customize the default payload (if needed). Dastra fills it with a sample for the chosen event.
Click Send a test webhook.
A confirmation message shows that your url answered with a 200 code. If the webhook had been blocked after errors, a successful test enables it again.

Secure the webhook
Each time an event you subscribed to occurs, Dastra sends a POST request to the webhook url. Each request contains the Dastra-Signature header, which your server can read.
Its value is the HMAC-SHA256 of the exact JSON body of the request, computed with the webhook's signature key and then encoded in Base64.
Dastra-Signature = Base64(HMAC-SHA256(<JSON body of the request>, <webhook signature key>))
Use the signature key exactly as it is displayed on the webhook details screen. Here are examples of signature validation:
Behavior on error
The webhook is considered in error when more than 5 errors have been recorded. Dastra stops sending events to its url as long as the last error is less than 24 hours old. If an email address is set in the configuration, it receives a message. A successful test resets the error counter.
How to set up webhooks with the API
Retrieve the webhooks linked to your account (in all workspaces). The optional workspaceId parameter limits the list to one workspace.
- : Access database operations
Success
GET /v1/WebHookUrls HTTP/1.1
Host: api.dastra.eu
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
Success
[
{
"signatureKey": "123e4567-e89b-12d3-a456-426614174000",
"errorMessage": "text",
"nbErrors": 1,
"dateLastError": "2026-01-01T00:00:00.000Z",
"inError": true,
"workSpace": {
"id": 1,
"tenantId": 1,
"primaryColor": "text",
"secondaryColor": "text",
"label": "text",
"logoUrl": "text",
"state": "Active",
"permissions": [
{
"name": "text",
"tenantId": 1,
"workSpaceId": 1,
"shortName": "text"
}
],
"dataSubjectArchivedRetentionDays": 1,
"nbEntities": 1
},
"id": 1,
"url": "text",
"workSpaceId": 1,
"subscribedEvents": [
"ProcessingCreation"
]
}
]Create a new webhook url using the POST endpoint. Fill in the events to which you want to subscribe your webhook with the subscribedEvents parameter.
- : Access database operations
Success
POST /v1/WebHookUrls HTTP/1.1
Host: api.dastra.eu
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 79
{
"id": 1,
"url": "text",
"workSpaceId": 1,
"subscribedEvents": [
"ProcessingCreation"
]
}Success
{
"signatureKey": "123e4567-e89b-12d3-a456-426614174000",
"errorMessage": "text",
"nbErrors": 1,
"dateLastError": "2026-01-01T00:00:00.000Z",
"inError": true,
"workSpace": {
"id": 1,
"tenantId": 1,
"primaryColor": "text",
"secondaryColor": "text",
"label": "text",
"logoUrl": "text",
"state": "Active",
"permissions": [
{
"name": "text",
"tenantId": 1,
"workSpaceId": 1,
"shortName": "text"
}
],
"dataSubjectArchivedRetentionDays": 1,
"nbEntities": 1
},
"id": 1,
"url": "text",
"workSpaceId": 1,
"subscribedEvents": [
"ProcessingCreation"
]
}A webhook ID is returned to you. It lets you read, update or delete the webhook.
- : Access database operations
Success
GET /v1/WebHookUrls/{id} HTTP/1.1
Host: api.dastra.eu
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
Success
{
"signatureKey": "123e4567-e89b-12d3-a456-426614174000",
"errorMessage": "text",
"nbErrors": 1,
"dateLastError": "2026-01-01T00:00:00.000Z",
"inError": true,
"workSpace": {
"id": 1,
"tenantId": 1,
"primaryColor": "text",
"secondaryColor": "text",
"label": "text",
"logoUrl": "text",
"state": "Active",
"permissions": [
{
"name": "text",
"tenantId": 1,
"workSpaceId": 1,
"shortName": "text"
}
],
"dataSubjectArchivedRetentionDays": 1,
"nbEntities": 1
},
"id": 1,
"url": "text",
"workSpaceId": 1,
"subscribedEvents": [
"ProcessingCreation"
]
}- : Access database operations
Success
No content
PUT /v1/WebHookUrls/{id} HTTP/1.1
Host: api.dastra.eu
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 79
{
"id": 1,
"url": "text",
"workSpaceId": 1,
"subscribedEvents": [
"ProcessingCreation"
]
}Success
No content
- : Access database operations
Success
No content
DELETE /v1/WebHookUrls/{id} HTTP/1.1
Host: api.dastra.eu
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
Success
No content
Last updated
Was this helpful?