Skip to main content

Webhooks

Receive real-time HTTP notifications when events occur in your Lucitra project. Webhooks eliminate the need to poll for validation status and integrate directly with Slack and Microsoft Teams.

Events

Fired when a validation run begins processing.
Fired when a validation run finishes successfully and a report is available.
Fired when a validation run encounters an error.
Fired when a dataset upload completes and the file is processed.
Fired when a report is generated and ready for download (including PDF export).

Register a Webhook

string
required
The HTTPS endpoint that will receive webhook deliveries.
array
required
List of event types to subscribe to. See the events section above for all options.
string
HMAC signing secret. If omitted, Lucitra auto-generates one prefixed with whsec_. The secret is only returned in the creation response.
string
Message format. Set to "slack" for Slack-compatible payloads, "teams" for Microsoft Teams Adaptive Cards, or null for raw JSON.
string
required
Webhook identifier for management operations.
string
required
HMAC-SHA256 signing secret. Shown only once at creation time. Store it securely.
The secret value is only returned when you create the webhook. Store it immediately in a secure location like a secrets manager. There is no way to retrieve it later.

Format Options

Standard JSON payload sent to your endpoint. Parse and handle it in your application code.

List Webhooks

Delete a Webhook

Delivery History

Inspect past delivery attempts for debugging failed webhooks.
integer
default:"20"
Maximum number of delivery records to return.
integer
default:"0"
Number of records to skip for pagination.

Test a Webhook

Send a test event to verify your endpoint is reachable and responding correctly.
boolean
required
Whether the test delivery received a 2xx response.
integer
required
HTTP status code returned by your endpoint.
integer
required
Round-trip time in milliseconds.
string
Error message if the delivery failed. Null on success.

Signature Verification

Every webhook delivery includes an X-Lucitra-Signature header containing an HMAC-SHA256 signature of the request body. Always verify this signature to ensure the payload was sent by Lucitra and has not been tampered with. The header format is:

Verification Example

Always use hmac.compare_digest (or equivalent constant-time comparison) instead of == to prevent timing attacks against the signature.
If you rotate your webhook secret, create a new webhook with the new secret and delete the old one. There is no update endpoint for secrets because they are only stored as hashed values.