Documentation Index
Fetch the complete documentation index at: https://teambattles.gg/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Webhooks allow your application to receive real-time HTTP POST notifications when events occur on TeamBattles. Instead of polling the API, you register an endpoint URL and select which events to receive.Setup
Register an Endpoint
Go to Settings > Developer and click “Add Endpoint” in the Webhooks section, or use the API:Webhook Secret
When you create an endpoint, a signing secret is generated. This secret is used to verify that webhook deliveries are from TeamBattles.Events
Match Events
| Event | Description |
|---|---|
match.created | A new match was created |
match.published | Match was published and visible to opponents |
match.accepted | An opponent accepted the match |
match.ready | Match is ready to begin (all check-ins complete) |
match.started | Match began |
match.completed | Match finished with a result |
match.cancelled | Match was cancelled |
match.forfeited | A team forfeited the match |
Score Events
| Event | Description |
|---|---|
score.submitted | A score was submitted |
score.confirmed | A score was confirmed by the opponent |
score.disputed | A submitted score was disputed |
Team & Player Events
| Event | Description |
|---|---|
roster.updated | Match roster was changed |
player.checked_in | A player checked in for the match |
team.joined | A team joined the match |
team.left | A team left the match |
Payload Format
All webhook deliveries use the following format:Signature Verification
Every webhook delivery includes anX-TeamBattles-Signature header containing an HMAC-SHA256 signature of the request body. The header value is prefixed with sha256= followed by the hex digest (for example, sha256=abc123...). Strip the prefix before comparing against your computed digest.
Verifying in Node.js
Verifying in Python
Delivery
Each event is delivered exactly once. Requests use a 10-second timeout and do not follow redirects - a3xx response is treated as a failure. There are no automatic retries: if your endpoint times out or returns a non-2xx response, the delivery is recorded as failed.
- Webhooks are delivered within seconds of the event
- Your endpoint must respond with a
2xxstatus within 10 seconds - Requests are sent with
redirect: 'manual'; any3xxresponse counts as a failed delivery - After 50 consecutive failed deliveries, the endpoint is automatically disabled and you will receive an in-app notification
Successful deliveries reset the consecutive-failure counter. Re-enable a disabled endpoint from
Settings > Developer once your server is healthy again.
Testing
Use the “Test” button next to any webhook endpoint in the dashboard to send a test event. This sends atest.ping event to verify your endpoint is working.