A webhook is one of the notification channels. When what a rule watches for happens, Lunaboard sends a POST request with a JSON body to your address. It is suitable for your own processing: creating a task, a message to a team chat or a record in your system.
Setup
- In the application, in Notifications, add a channel of the Webhook type and enter the address that will receive the requests.
- The channel has a signing secret. Store it on your server.
- Create a rule: what you want to be told about (event, feedback, error, alert), for which site and to which channels.
Shape of the request
POST /vas-endpoint HTTP/1.1
Content-Type: application/json
User-Agent: Lunaboard-Webhook/1.0
X-Luna-Delivery: 5521
X-Luna-Signature: 9f2c…e41a
{
"id": 5521,
"title": "Nefunguje: Po kliknutí na Odeslat objednávku se nic nestane.",
"body": "/kosik",
"url": "https://www.lunaboard.com/app/s/ID_WEBU/feedback?feedback=77",
"created_at": "2026-12-02T08:15:00+00:00",
"feedback": {
"id": 77,
"kind": "broken",
"text": "Po kliknutí na Odeslat objednávku se nic nestane.",
"page": "/kosik",
"email": null,
"user": null
},
"site": {"id": "ID_WEBU", "domain": "vas-web.cz"},
"subject": "feedback"
}
| Field | Description |
|---|---|
id | Delivery number. It stays the same on retries, so you can recognize a duplicate by it. |
title, body | Heading and additional text of the notification. |
url | Link to the detail in Lunaboard. |
created_at | Time of creation in ISO 8601 format. |
subject | event, feedback, error or alert. |
site | Public ID and domain of the site. |
event / feedback / error | Details according to the subject. For an event: type, title, detail, link, flow_id and time. For feedback: kind, text, page, email and verified user. For an error: message, code, source, page and status. |
Signature verification
The X-Luna-Signature header contains the HMAC-SHA256 of the raw request body with the webhook secret, written in hexadecimal. Calculate the signature from the body exactly as it arrived and compare it with a function that is resistant to timing attacks.
<?php
// Podpis se počítá ze surového těla požadavku, ne z dekódovaného JSONu.
$body = file_get_contents('php://input');
$expected = hash_hmac('sha256', $body, getenv('LUNA_WEBHOOK_SECRET'));
if (! hash_equals($expected, $_SERVER['HTTP_X_LUNA_SIGNATURE'] ?? '')) {
http_response_code(401);
exit;
}
$payload = json_decode($body, true);
// … zpracování; stejné doručení poznáte podle $payload['id']
http_response_code(200); // jiný kód než 200 znamená další pokus
Success and retries
- Only a response with code 200 counts as success. Any other code, including 201 and 204, means failure.
- Lunaboard waits 8 seconds for the response.
- Delivery is attempted at most 5 times. The interval between attempts increases: 1 min, 5 min, 15 min, 60 min.
- After the last failed attempt, the delivery is marked as failed in the application, together with the last error.
Because a delivery can be repeated, the processing on your side should be resistant to duplicates. Respond with code 200 immediately after verifying the signature and do longer work in the background.