> ## Documentation Index
> Fetch the complete documentation index at: https://padelapi.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Webhook

> Register a new webhook subscription. The response includes a `secret` used to verify HMAC-signed payloads — store it securely, it will not be returned again.

> 🔒 This endpoint [requires a **Business** subscription](https://padelapi.org/billing).



## OpenAPI

````yaml https://padelapi.org/docs/api.json post /webhooks
openapi: 3.1.0
info:
  title: Padel API – API Reference
  version: '1.0'
  description: padelapi.org
servers:
  - url: https://padelapi.org/api
security:
  - http: []
paths:
  /webhooks:
    post:
      tags:
        - Webhook
      summary: Create Webhook
      description: >-
        Register a new webhook subscription. The response includes a `secret`
        used to verify HMAC-signed payloads — store it securely, it will not be
        returned again.


        > 🔒 This endpoint [requires a **Business**
        subscription](https://padelapi.org/billing).
      operationId: createWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  description: Public HTTPS URL where webhook events will be delivered.
                events:
                  type: array
                  description: List of events the consumer wants to subscribe to.
                  items:
                    type: string
                    enum:
                      - tournament.created
                      - tournament.updated
                      - tournament.deleted
                      - match.created
                      - match.updated
                      - match.deleted
                      - player.created
                      - player.updated
                      - player.deleted
                  minItems: 1
              required:
                - url
                - events
      responses:
        '200':
          description: '`WebhookResource`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResource'
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    WebhookResource:
      type: object
      properties:
        id:
          type: integer
        self:
          type: string
        url:
          type: string
        events:
          type: array
          items: {}
        secret:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - self
        - url
        - events
        - secret
        - created_at
        - updated_at
      title: WebhookResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````