Setup
Webhook subscriptions are configured through the Loyale API. Each subscription connects one topic to one delivery URL and one failure-notification email address.
Required headers
| Header | Value | Notes |
|---|---|---|
Authorization | Bearer <access-token> | Creating and deleting subscriptions requires the SuperAdmin, Owner, or Admin role. |
X-Scheme | Scheme UUID | Identifies the scheme for the request. |
Content-Type | application/json | Required when a request body is sent. |
Subscribe
POST https://api.loyale.io/api/Webhook/Subscribe
curl --request POST 'https://api.loyale.io/api/Webhook/Subscribe' \
--header 'Authorization: Bearer <access-token>' \
--header 'X-Scheme: <scheme-id>' \
--header 'Content-Type: application/json' \
--data '{
"topic": 0,
"url": "https://example.com/webhooks/loyale",
"email": "[email protected]"
}'| Property | Type | Description |
|---|---|---|
topic | integer | A value from the topic list. |
url | string | Public delivery endpoint. Production subscriptions must use HTTPS. |
email | string | Address that receives first-failure and final-failure notices. |
A successful request returns 200 OK. Multiple subscriptions can be registered for the same topic, including duplicate combinations.
Unsubscribe
DELETE https://api.loyale.io/api/Webhook/Unsubscribe
curl --request DELETE 'https://api.loyale.io/api/Webhook/Unsubscribe' \
--header 'Authorization: Bearer <access-token>' \
--header 'X-Scheme: <scheme-id>' \
--header 'Content-Type: application/json' \
--data '{
"topic": 0,
"url": "https://example.com/webhooks/loyale",
"email": "[email protected]"
}'The current request contract requires topic, url, and email. Every subscription matching all three values is removed. A successful request returns 204 No Content.
List subscriptions
GET https://api.loyale.io/api/Webhook
curl 'https://api.loyale.io/api/Webhook' \
--header 'Authorization: Bearer <access-token>' \
--header 'X-Scheme: <scheme-id>' \
--header 'Accept: application/json'The response contains the subscription ID, topic, URL, notification email, audit fields, and timestamps. Query-string filtering, sorting, and pagination follow the API's standard Sieve parameters.
[
{
"id": "ae395976-0a95-4504-b4cf-f1ac6fbccaf3",
"topic": 1,
"url": "https://example.com/webhooks/loyale",
"email": "[email protected]",
"createdDate": "2026-09-11T10:00:00Z",
"updatedDate": "2026-09-11T10:00:00Z",
"createdBy": "[email protected]",
"updatedBy": "[email protected]"
}
]Updated 10 days ago