Skip to main content

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.
Important: Do not use your API Key as the webhook secret. Use a separate, unique secret for webhooks.

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-Signature in 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 with X-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}/test
POST /api/v1/external/webhooks/{id}/test
Request body:
Response:

Using webhook.site

  1. Go to webhook.site and copy your unique URL
  2. Create or update a webhook with that URL
  3. Call the test endpoint above
  4. On webhook.site, check the request:
    • Body: JSON payload
    • Headers: X-Webhook-Signature should 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.