Overview
When 16Arena sends an event to your webhook URL, you can optionally use a Secret Key to verify that the request is authentic and has not been tampered with. The system signs each payload with HMAC-SHA256 and sends it in a header you can verify.1. Setting the Secret Key
The secret key is optional. Set it when updating a webhook configuration: PUT/api/v1/webhooks/{id}PUT
/api/v1/external/webhooks/{id} (with API Key)
Request body:
- Use a strong, random string (e.g. 32+ characters)
- Store it securely in your environment/config
- Once set, 16Arena includes
X-Webhook-Signaturein every webhook POST
2. What You Receive
Each webhook request includes:
Payload (body): JSON with
event, eventId, timestamp, tenantId, data.
3. Verifying the Signature
Use the raw request body (before JSON parsing) and your secret to compute the expected signature. Compare withX-Webhook-Signature.
Algorithm
Note: Read the body once. If you parse JSON first, the stream may be consumed. Configure middleware to allow re-reading the raw body if needed.
4. Testing
Built-in test endpoint
Send a test webhook from 16Arena to your URL: POST/api/v1/webhooks/{id}/testPOST
/api/v1/external/webhooks/{id}/test
Request body:
Using webhook.site
- Go to webhook.site and copy your unique URL
- Create or update a webhook with that URL
- Call the test endpoint above
- On webhook.site, check the request:
- Body: JSON payload
- Headers:
X-Webhook-Signatureshould be present when secret key is set
5. Summary
If you omit the secret key, no signature is sent. Your endpoint will still receive webhooks, but you won’t be able to cryptographically verify their origin.