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

# Register a webhook endpoint

> Registers a single webhook endpoint on which you'll receive [all supported events](/api-reference/onboarding-api/webhooks#supported-events) (you cannot choose the events you are subscribing to).



## OpenAPI

````yaml post /register/webhooks
openapi: 3.0.3
info:
  title: Onboarding API
  version: '1.0'
  license:
    name: Proprietary
    url: https://qonto.com/terms
servers:
  - url: https://thirdparty-sandbox.staging.qonto.co
    description: Sandbox
  - url: https://onboarding-partners.qonto.com
    description: Production
security:
  - apiKey: []
    qontoPartnerId: []
tags:
  - name: Registrations
    description: Endpoints for Registration resource
  - name: Files
    description: Endpoints for file management throughout the company creation process.
  - name: Webhooks
    description: Endpoints to configure webhook to be notified about registration progress.
paths:
  /register/webhooks:
    post:
      tags:
        - Webhooks
      summary: Register a webhook endpoint
      description: >-
        Registers a single webhook endpoint on which you'll receive [all
        supported
        events](/api-reference/onboarding-api/webhooks#supported-events) (you
        cannot choose the events you are subscribing to).
      operationId: webhooks/create
      parameters:
        - $ref: '#/components/parameters/X-Qonto-Staging-Token'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhook'
      responses:
        '201':
          description: Returns the webhook endpoint registered.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook'
        '400':
          $ref: '#/components/responses/400-bad-request'
        '401':
          $ref: '#/components/responses/401-unauthorized'
        '422':
          $ref: '#/components/responses/422-unprocessable-entity'
        '500':
          $ref: '#/components/responses/500-internal-servor-error'
      security:
        - apiKey: []
          qontoPartnerId: []
components:
  parameters:
    X-Qonto-Staging-Token:
      name: X-Qonto-Staging-Token
      in: header
      description: >-
        Required only for Sandbox API requests; to get one, please sign up to
        the [Developer Portal](https://developers.qonto.com/).
      schema:
        type: string
  schemas:
    webhook:
      title: Webhook
      type: object
      required:
        - callback_url
        - enabled
        - secret
      properties:
        id:
          type: string
          format: uuid
          example: 37824615-afec-4340-b700-0981b5f0c319
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          example: '2021-08-17T12:31:32.689Z'
        updated_at:
          type: string
          format: date-time
          readOnly: true
          example: '2021-08-17T12:31:32.689Z'
        callback_url:
          type: string
          description: Your webhook endpoint
          example: https://example.com/myCallbackUrl
        enabled:
          type: boolean
          description: Whether the webhook should be used or not
          default: true
          example: true
        secret:
          type: string
          description: Secret used for applying HMAC-SHA256 to the webhook event payload
          example: 1qA+9OSwfnm0NuhF+b8CJA==
    errors:
      title: Errors
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                readOnly: true
              detail:
                type: string
                readOnly: true
              source:
                type: object
                properties:
                  pointer:
                    type: string
                readOnly: true
            required:
              - code
              - detail
  responses:
    400-bad-request:
      description: Returns a bad request error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors'
    401-unauthorized:
      description: Returns an unauthorized error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors'
          examples:
            Example:
              $ref: '#/components/examples/unauthorized'
    422-unprocessable-entity:
      description: >-
        Returns an unprocessable entity error if any required parameters are
        missing, or if validation rules are not respected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errors'
          examples:
            Example:
              $ref: '#/components/examples/unprocessable-entity'
    500-internal-servor-error:
      description: Returns an internal server error.
  examples:
    unauthorized:
      value:
        errors:
          - code: unauthorized
            detail: You must authenticate to perform API requests
    unprocessable-entity:
      value:
        errors:
          - code: <error-code>
            detail: <relevant-detail>
            source:
              pointer: <ie /data/attributes/attr_name>
  securitySchemes:
    apiKey:
      type: http
      description: >
        Bearer authorization header: `Bearer <token>`.

        To get your `<token>`, please sign up to the [Developer
        Portal](https://developers.qonto.com/).
      scheme: bearer
      bearerFormat: JWT
    qontoPartnerId:
      type: apiKey
      description: >
        API Key authorization header: `Qonto-Partner-Id: <partner_id>`.

        To get your `<partner_id>` please, sign up to the [Developer
        Portal](https://developers.qonto.com/).
      name: Qonto-Partner-Id
      in: header

````