Skip to main content
TruLayer can POST a signed JSON payload to a URL you own whenever a monitored event fires — for example, when a failure is detected in your traces. This guide covers registration, signature verification, the test-ping endpoint, and URL validation rules. Webhooks are available on Pro plan and above. Creating and deleting webhooks requires the Member or Owner role.

Register a webhook

A successful response is 201 Created with the new Webhook object.

URL requirements

TruLayer validates the URL at creation time. The request returns 422 if any of these checks fail: Example 422 response:

Verify a webhook before enabling it

Use POST /v1/webhooks/:id/test to send a synthetic ping event to your endpoint and inspect the response, without waiting for a real event to fire.
No request body is required. Response 200 OK:
The test delivery is signed with the same HMAC-SHA256 scheme used for live deliveries, so you can fully exercise your signature-verification logic. The delivery is ephemeral — it does not appear in the delivery log.

Auth and plan requirements

POST /v1/webhooks/:id/test requires:
  • Bearer token authentication (same as all other /v1/ endpoints)
  • Pro plan or above — Starter plan tenants receive 403
  • Member or Owner role — Viewer role receives 403

Error responses

Signature verification

Every delivery — live or synthetic — includes an X-TruLayer-Signature header. Verify it before processing the payload. The header value is sha256=<hex>, where the hex string is the HMAC-SHA256 of the raw request body using the secret you provided at registration time.
Always use a timing-safe comparison to prevent timing attacks.

Event types

List and delete webhooks

List all webhooks for your tenant:
Delete a webhook (Owner role required):