Skip to main content
Share this document with backend and integration developers. It describes how outgoing webhooks work, the HTTP contract, the default JSON payload, and per-event data fields as implemented in the API. For example JSON bodies per event, see Events and payloads. For HMAC verification steps and API paths, see Signature verification.

1. What are webhooks?

When certain actions happen in 16Arena (for example a match is updated or a player joins a tournament), the system can POST an HTTP request to URLs you configure. Your server receives a JSON body and can react without polling the REST API.
  • Delivery is asynchronous (queued; retries on failure).
  • You choose which event types each webhook subscribes to.
  • Payload can use the default format or a custom JSON template (see §7).

2. Subscribing to events

Webhook configurations are stored per tenant. Each configuration includes:
  • Webhook URL (HTTPS recommended for production)
  • Events — array of event type strings (must be from the supported list in §10)
  • Optional: secret key (HMAC signature), custom headers, retry/timeouts, custom payload template
Only configurations where events contains the dispatched event type will receive that event.

3. HTTP request your endpoint receives

Your endpoint should return HTTP 2xx quickly (process heavy work after responding).

4. Default payload envelope (JSON)

With default payload format, the body is a single object:

5. How data is built (default format)

The API maps an internal Data dictionary into data using known keys. Only mapped keys become properties on data. Common mappings: Note: Keys that are not in this mapping (for example some internal-only strings) may not appear in the default data object. If you need arbitrary fields in the outgoing JSON, use a custom payload template (§7).

6. Per-event: trigger summary and typical data fields

Below: typical data content for the default format. Empty or omitted keys are not sent.

Team

Root tournamentId is usually not set for team events.

Tournament

Round and group (structure)

Match

Participant assignment (context-specific)

Announcements (tournament chat)


7. Custom payload format

If the webhook configuration uses payloadFormat: "custom" and a customPayloadTemplate (JSON string), placeholders like {{eventType}}, {{tournamentId}}, {{matchId}}, and so on are replaced from the event and Data dictionary. The result is sent as the body (must be valid JSON if your consumer expects JSON). Use this when you need field names or nesting that differ from the default data layout.

8. Verifying authenticity (secret key)

When a secret key is configured:
  1. Read the raw request body bytes (UTF-8).
  2. Compute HMAC-SHA256(body, secret_key).
  3. Encode as: sha256= + lowercase hex digest.
  4. Compare to header X-Webhook-Signature (constant-time compare).

9. Retries and monitoring

  • Failed deliveries (non-2xx or timeout) are retried according to the webhook’s retry settings.
  • Inspect webhook delivery logs via the API (filters: webhook id, event type, status, date range) to debug failures.

10. Full event list (for DB / allow-lists)


11. Integration checklist

  1. Expose HTTPS POST endpoint; return 2xx quickly.
  2. Create webhook in 16Arena; select event types from §10.
  3. Optional: set secret key and verify X-Webhook-Signature.
  4. Use event (or event + data) to route in your code.
  5. Use eventId / X-Webhook-Id for idempotency.
  6. Test with a real action (for example update match) and confirm delivery logs.

12. Document version

  • Aligned with context-specific participant events (participant.assigned.* / participant.removed.*).
  • Default payload mapping reflects WebhookDispatcherService + WebhookPayloadDataDto in the codebase.
For API paths to create webhooks and fetch delivery logs, refer to your OpenAPI / internal API docs or any separate WEBHOOK_CLIENT_GUIDE if maintained.