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

# Create Webhook

> Create a new webhook



## OpenAPI

````yaml /openapi.json post /api/webhooks/
openapi: 3.1.0
info:
  title: e-invoice.be Peppol Access Point API
  version: 1.1.0
  x-logo:
    url: https://e-invoice.be/einvoice.svg
servers:
  - url: https://api.e-invoice.be
    description: Production
security: []
paths:
  /api/webhooks/:
    post:
      tags:
        - Webhooks
      summary: Create Webhook
      description: Create a new webhook
      operationId: create_webhook_api_webhooks__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
        '401':
          description: 'Unauthorized: API key is missing, invalid, or inactive'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: 'Unprocessable Entity: Invalid webhook data'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: 'Internal Server Error: Unexpected server error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    WebhookCreate:
      properties:
        events:
          items:
            type: string
          type: array
          title: Events
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
        enabled:
          type: boolean
          title: Enabled
          default: true
      type: object
      required:
        - events
        - url
      title: WebhookCreate
      description: Schema for creating a new webhook.
    WebhookResponse:
      properties:
        events:
          items:
            type: string
          type: array
          title: Events
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
        enabled:
          type: boolean
          title: Enabled
          default: true
        id:
          type: string
          title: Id
        secret:
          type: string
          title: Secret
      type: object
      required:
        - events
        - url
        - id
        - secret
      title: WebhookResponse
      description: Response model for webhook API endpoints.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error response model.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````