openapi: 3.1.0 info: title: Toornament Disciplines Webhooks API description: The Toornament API v2 provides comprehensive esports tournament management capabilities. It includes the Organizer API for full tournament CRUD operations, the Viewer API for public read-only tournament data access, and the Participant API for registration and check-in management. Authentication uses API key plus OAuth2 access tokens with scoped permissions. version: '2.0' contact: name: Toornament Developer url: https://developer.toornament.com termsOfService: https://www.toornament.com/en_US/legal servers: - url: https://api.toornament.com/organizer/v2 description: Organizer API — full tournament management (authenticated) - url: https://api.toornament.com/viewer/v2 description: Viewer API — public read-only tournament access security: - apiKey: [] - oauth2: [] tags: - name: Webhooks description: Manage webhook subscriptions for tournament events. paths: /webhooks: get: operationId: listWebhooks summary: List Webhooks description: Retrieve all webhook subscriptions configured for the authenticated application. tags: - Webhooks parameters: - name: X-Api-Key in: header required: true schema: type: string - name: Authorization in: header required: true schema: type: string responses: '200': description: List of webhook subscriptions. content: application/json: schema: type: array items: $ref: '#/components/schemas/Webhook' '401': $ref: '#/components/responses/Unauthorized' post: operationId: createWebhook summary: Create Webhook description: Register a new webhook endpoint to receive tournament event notifications. tags: - Webhooks parameters: - name: X-Api-Key in: header required: true schema: type: string - name: Authorization in: header required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebhookCreate' responses: '201': description: Webhook created. content: application/json: schema: $ref: '#/components/schemas/Webhook' '401': $ref: '#/components/responses/Unauthorized' components: schemas: WebhookCreate: type: object required: - url - events properties: url: type: string format: uri events: type: array items: type: string Error: type: object properties: message: type: string description: Error message. code: type: string description: Error code. Webhook: type: object properties: id: type: string description: Unique webhook identifier. url: type: string format: uri description: Endpoint URL to deliver webhook payloads. events: type: array items: type: string description: List of subscribed event types. is_active: type: boolean description: Whether the webhook is active. created_at: type: string format: date-time responses: Unauthorized: description: Authentication failed — missing or invalid API key/token. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: apiKey: type: apiKey in: header name: X-Api-Key description: API key obtained from the Toornament developer dashboard. oauth2: type: oauth2 description: OAuth2 access token with scoped permissions (organizer:view, organizer:admin). flows: authorizationCode: authorizationUrl: https://app.toornament.com/oauth/authorize tokenUrl: https://api.toornament.com/oauth/v2/token scopes: organizer:view: Read access to organizer tournament data. organizer:admin: Full administrative access to tournament management. participant:manage: Manage participant registrations.