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

# Create Webhook record



## OpenAPI

````yaml /openapi.yaml post /webhooks
openapi: 3.1.1
info:
  title: MijnKlantportaal API
  version: v1
servers:
  - url: https://api.mijnklantportaal.nl/v1
security:
  - APIKey: []
tags:
  - name: Agreements API
  - name: Appointments API
  - name: Customers API
  - name: Customer Groups API
  - name: Customer Invoices API
  - name: Customer Offers API
  - name: Customer Subscriptions API
  - name: Customer Subscription Packages API
  - name: Files API
  - name: File Request API
  - name: File Share API
  - name: Invoices API
  - name: Payment Links API
  - name: Punch Cards API
  - name: Tickets API
  - name: Webhooks API
paths:
  /webhooks:
    post:
      tags:
        - Webhooks API
      summary: Create Webhook record
      operationId: create-webhook
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - url
                - type
              properties:
                url:
                  type: string
                  example: https://mijnklantportaal.nl/webhook-incoming
                  description: The URL which needs to be called
                type:
                  type: string
                  example: customer-created
                  description: >-
                    Type of event what will trigger this webhook. Can be
                    `appointment-created`, `appointment-canceled`,
                    `customer-created`, `customer-deleted`, `offer-created`,
                    `offer-deleted`, `offer-accepted`, `offer-rejected`,
                    `invoice-created`, `invoice-chargeback`, `invoice-paid`,
                    `invoice-deleted`, `payment-link-created`,
                    `payment-link-expired`, `payment-link-paid`,
                    `ticket-created`, `ticket-reply-customer`,
                    `ticket-reply-employee`, `subscription-created`,
                    `subscription-updated`, `subscription-deleted`,
                    `subscription-payment-created` or
                    `subscription-payment-updated`.
      responses:
        '201':
          description: The created Webhook record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '422':
          description: Something is wrong with the posted data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_ApiError'
components:
  schemas:
    Webhook:
      type: object
      description: Webhook record
      properties:
        id:
          type: string
          example: wbh_abc12345def678
          description: ID of the Webhook record, always starting with `wbh_`.
        type:
          type: string
          example: customer-created
          description: Type of event what will trigger this webhook.
        url:
          type: string
          example: https://mijnklantportaal.nl/webhook-incoming
          description: The URL which gets triggered
        secret:
          type: string
          example: OUJX2prdBbJxR77BZlGz
          description: >-
            A random string which will be added to the `X-Webhook-Signature`
            header of the webhook call. With this secret, you can validate if
            the request is coming from MijnKlantportaal.
        createdAt:
          type: string
          example: '2024-04-29T21:00:00+02:00'
          description: Date and time when the payment was started. Written in ATOM format.
    Error_ApiError:
      type: object
      properties:
        message:
          type: string
          description: Explanation what went wrong
  securitySchemes:
    APIKey:
      type: http
      scheme: bearer

````