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 returns422 if any of these checks fail:
Example
422 response:
Verify a webhook before enabling it
UsePOST /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.
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 anX-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.