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

# Create webhook

> Creates a webhook that POSTs the events it is subscribed to. The response carries the verification token sent with every delivery — store it, it is not shown again.

**Required scope:** `write:webhooks`



## OpenAPI

````yaml POST /v1/{tenantId}/webhooks
openapi: 3.1.0
info:
  title: Debbie Creditor API Docs
  description: >-
    The Debbie Creditor API is a RESTful interface allowing you, as a creditor,
    to programmatically send data to your debt collection partner and access
    your data in the platform. It provides predictable URLs for accessing
    resources, and uses built-in HTTP features to receive commands and return
    responses. This makes it easy to integrate with your own systems, for
    example your ERP or invoicing system.
  version: v1.0.0
  x-logo:
    url: https://debbie-platform.github.io/creditor-api-docs/deb-logo.svg
servers:
  - url: https://api.debbiecollect.com
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: Endpoints for interacting with customers
  - name: Files
    description: Endpoints for interacting with files
  - name: Documents
    description: Endpoints for attaching documentation to a case or to your creditor
  - name: Direct payments
    description: Endpoints for registering payments made directly to you
  - name: Voucher types
    description: >-
      Endpoints for reading the voucher types available on your debt collection
      partner
  - name: Billings
    description: Endpoints for reading how a settlement is made up
externalDocs:
  description: Find out more about Debbie here
  url: https://debbiecollect.com
paths:
  /v1/{tenantId}/webhooks:
    post:
      tags:
        - Webhooks
      summary: Create webhook
      description: >-
        Creates a webhook that POSTs the events it is subscribed to. The
        response carries the verification token sent with every delivery — store
        it, it is not shown again.


        **Required scope:** `write:webhooks`
      operationId: create-webhook
      parameters:
        - in: path
          name: tenantId
          schema:
            type: string
            format: uuid
          required: true
          description: Id of the tenant
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: >-
                    Name of the webhook. Shown in the portal and on every
                    delivery.
                url:
                  type: string
                  format: uri
                  description: >-
                    Public HTTP(S) address every delivery is POSTed to.
                    Addresses on a private network are rejected.
                events:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    Events to subscribe to. A creditor webhook can subscribe to
                    cases.create, cases.update, cases.delete and
                    billings.create.
                email:
                  type:
                    - string
                    - 'null'
                  format: email
                  description: Address notified when deliveries keep failing.
                headers:
                  type:
                    - object
                    - 'null'
                  additionalProperties:
                    type: string
                  description: >-
                    Extra headers sent with every delivery, for example an
                    authorization header the receiver expects.
                deepFlattenBody:
                  type: boolean
                  description: >-
                    Flatten nested objects in the body into single level keys
                    joined by "_", for receivers that cannot read nested JSON.
                    Defaults to false.
                creditorId:
                  type: string
                  format: uuid
                  description: >-
                    Id of the creditor the webhook is scoped to. Must be the
                    creditor the key is issued for.
              required:
                - name
                - url
                - events
                - creditorId
            example:
              name: ERP sync
              url: https://example.com/debbie/webhooks
              events:
                - cases.create
                - cases.update
              email: integrations@example.com
              creditorId: 0f6c7a3e-6e4e-4f0c-9a2a-2f6cba3f9a11
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '422':
          $ref: '#/components/responses/UnprocessableContent'
components:
  schemas:
    Webhook:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Id of the webhook
        name:
          type: string
          description: Name of the webhook
        url:
          type: string
          format: uri
          description: Address every delivery is POSTed to
        events:
          type: array
          items:
            type: string
          description: Events the webhook is subscribed to
        creditorId:
          type: string
          format: uuid
          description: >-
            Id of the creditor the webhook is scoped to. A creditor webhook only
            receives events for this creditor.
        verificationToken:
          type: string
          format: uuid
          description: >-
            Sent as the X-Verification-Token header on every delivery. Compare
            it with this value and reject requests that do not match.
        email:
          type:
            - string
            - 'null'
          format: email
          description: >-
            Address notified when deliveries keep failing. null when no address
            was given.
        headers:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          description: Extra headers sent with every delivery
        bodyMappers:
          type:
            - object
            - 'null'
          description: >-
            Per event field maps that reshape the body before it is sent. null
            when the body is sent as it is.
        deepFlattenBody:
          type: boolean
          description: >-
            Whether nested objects in the body are flattened into single level
            keys joined by "_"
        pull:
          type: boolean
          description: >-
            Whether deliveries wait to be pulled through the webhook items
            endpoints instead of being POSTed
        enabled:
          type: boolean
          description: Whether the webhook is receiving events
        createdAt:
          type: string
          format: date-time
          description: When the webhook was created
        createdBy:
          type:
            - object
            - 'null'
          description: Who created the webhook
          properties:
            id:
              type: string
              description: Id of the actor
            type:
              type: string
              description: Type of the actor
      example:
        id: b963f219-255e-47b7-a3f2-0fe6180514a1
        name: ERP sync
        url: https://example.com/debbie/webhooks
        events:
          - cases.create
          - cases.update
        creditorId: 0f6c7a3e-6e4e-4f0c-9a2a-2f6cba3f9a11
        verificationToken: 5f2e6a55-6f7d-4d0e-8f1c-2f5a2f8d7c11
        email: integrations@example.com
        headers:
          X-Custom: value
        deepFlattenBody: false
        pull: false
        enabled: true
        createdAt: '2026-08-29T11:21:10.100Z'
        createdBy:
          id: b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d
          type: KEY
        bodyMappers: null
  responses:
    UnauthorizedError:
      description: Access token missing or invalid
    UnprocessableContent:
      description: Unable to process the contained instructions.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication with an API key can be done by using a bearer token in
        the Authorization header. This is done using the following format
        `Authorization: Bearer {token}`. API keys are issued and revoked
        directly from the creditor portal under Developers > API.

````