Create Webhooks
Also known as: callback, notifications
A webhook receives events for tournaments. Which tournaments depends on who owns the webhook:
- API token (account): the webhook fires for every tournament of your account, public or not. It cannot subscribe to other organizers’ tournaments.
- Public API key: the webhook fires only for the public tournaments you subscribe it to.
With an API token, in the Kickertool App
Section titled “With an API token, in the Kickertool App”- Log in to your Tournament.app account
- Click on your profile picture in the bottom left corner
- Navigate to “Settings”
- Select the “API” section
- Click on “Create Webhook”
Via API (API token or public API key)
Section titled “Via API (API token or public API key)”POST /webhookswith a name, your endpoint URL and an optionalauthTokenthat we send back as bearer token.
With an API token you are done: the webhook receives every tournament of your account. With a public API key, subscribe it to the tournaments you care about:
- Find the tournament:
GET /organizers?search=kixx, thenGET /organizers/:organizerId/tournaments?state=running. PUT /webhooks/:webhookId/tournaments/:tournamentIdto subscribe. Repeat for further tournaments.DELETE /webhooks/:webhookId/tournaments/:tournamentIdwhen you are done.
Subscription rules (public API keys)
Section titled “Subscription rules (public API keys)”- Only tournaments of the key’s sport that are shared on a result page can be subscribed (
403 TOURNAMENT_NOT_PUBLIC). - An API token cannot subscribe: its own tournaments fire anyway (
400 SUBSCRIPTION_NOT_NEEDED), other organizers’ tournaments are off limits (403 FORBIDDEN). - Finished or cancelled tournaments cannot be subscribed (
403 TOURNAMENT_FINISHED); read their final data viaGET. - At most 25 subscriptions per webhook (
400 TOO_MANY_SUBSCRIPTIONS). - Events stop as soon as the organizer stops sharing the tournament on their result page.
- Subscriptions are removed automatically about a week after the tournament has finished, or when the tournament is deleted. The webhook itself stays.
- After 5 failed deliveries a webhook is disabled; re-enable it with
POST /webhooks/:webhookId/enable.
