Debitura Webhooks API

Manage webhook subscriptions and inspect the delivery event log. Create subscriptions to receive real-time notifications for case lifecycle events, payments, and chats. Use GET /webhooks/events to verify deliveries and POST /webhooks/events/{id}/replay to re-deliver a specific event.

Operations 16

GET /webhooks List all webhook subscriptions for the authenticated collection partner.
POST /webhooks Create a new webhook subscription.
GET /webhooks/{id} Get a specific webhook subscription by ID.
PUT /webhooks/{id} Update an existing webhook subscription.
DELETE /webhooks/{id} Delete a webhook subscription.
PATCH /webhooks/{id} Update an existing webhook subscription.
POST /webhooks/{id}/test Send a test event to the webhook endpoint.
POST /webhooks/{id}:test Send a test event to the webhook endpoint.
POST /webhooks/{id}/replay [Deprecated] This endpoint is misnamed and does not actually replay events. Use `GET /webhooks/events?caseId={id}` to inspect delivery history, then `POST /webhooks/events/{eventId
POST /webhooks/{id}:replay [Deprecated] This endpoint is misnamed and does not actually replay events. Use `GET /webhooks/events?caseId={id}` to inspect delivery history, then `POST /webhooks/events/{eventId
GET /v1/Webhooks Get all webhooks for the authenticated referral partner
POST /v1/Webhooks Create a new webhook subscription
GET /v1/Webhooks/{id} Get a specific webhook by ID
PUT /v1/Webhooks/{id} Update an existing webhook subscription
DELETE /v1/Webhooks/{id} Delete a webhook subscription
POST /v1/Webhooks/test Trigger a test webhook event (test environment only)

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/debitura-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

debitura-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Debitura Webhooks API
  version: v1
  description: 'Operations tagged Webhooks across 3 of this provider''s published API definitions: debitura-collection-partner-api.json, debitura-customer-api.json, debitura-referral-partner-api.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://collectionpartner-api.debitura.com
  description: Production
- url: https://customer-api.debitura.com
  description: Production
- url: https://referral-api.debitura.com
  description: Production
tags:
- name: Webhooks
  description: Manage webhook subscriptions and inspect the delivery event log. Create subscriptions to receive real-time notifications for case lifecycle events, payments, and chats. Use GET /webhooks/events to verify deliveries and POST /webhooks/events/{id}/replay to re-deliver a specific event.
paths:
  /webhooks:
    get:
      tags:
      - Webhooks
      summary: List all webhook subscriptions for the authenticated collection partner.
      description: Returns all webhook subscriptions for the authenticated collection partner. Secrets are never returned in list operations.
      responses:
        '200':
          description: List of webhook subscriptions
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
        '401':
          description: API key is missing or invalid
      security:
      - ApiKey: []
    post:
      tags:
      - Webhooks
      summary: Create a new webhook subscription.
      description: "Creates a new webhook subscription for receiving real-time event notifications.\n\n**Available Events (assigned/working-partner role):**\n- `case.assigned` - Case validated by Debitura and assigned to your agency\n- `case.updated` - Case lifecycle changed (e.g., Active → Paused). Does not cover engagement phase\n  changes (Pre-legal/Legal/Enforcement) — poll `GET /cases/{id}` or `GET /cases/{id}/timeline` for\n  the current phase; there is no phase-change event today.\n- `case.closed` - Case closed\n- `payment.created` - Payment registered on case\n- `payment.deleted` - Payment reversed (deleted) on case\n- `chat.created` - Chat message created on case\n\n**Security:** Response includes Base64-encoded signing secret (shown only once). Store it to verify HMAC-SHA256 signatures on deliveries.\n\n**Requirements:** HTTPS URL required. Deliveries retry with exponential backoff (8 attempts). Webhook auto-disables after max failures."
      requestBody:
        description: The webhook creation request, including the target URL and event types to subscribe to.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.CreateWebhookRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.CreateWebhookRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.CreateWebhookRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.CreateWebhookRequest'
      responses:
        '201':
          description: Webhook created successfully
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
        '400':
          description: Invalid request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '401':
          description: API key is missing or invalid
        '422':
          description: Business rule violation
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /webhooks/{id}:
    get:
      tags:
      - Webhooks
      summary: Get a specific webhook subscription by ID.
      description: Returns details of a specific webhook subscription. Secret is never returned in this operation.
      parameters:
      - name: id
        in: path
        description: The unique identifier of the webhook subscription.
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Webhook subscription found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
        '401':
          description: API key is missing or invalid
        '404':
          description: Webhook not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    put:
      tags:
      - Webhooks
      summary: Update an existing webhook subscription.
      description: Updates webhook URL, events, or active status. Set RegenerateSecret=true to rotate signing secret (returned in response). Use IsActive=true to re-enable auto-disabled webhooks after fixing delivery issues. Secret only included if RegenerateSecret=true.
      parameters:
      - name: id
        in: path
        description: The unique identifier of the webhook subscription to update.
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: The update request. All fields are optional — only provided fields are changed.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest'
      responses:
        '200':
          description: Webhook updated successfully
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
        '400':
          description: Invalid request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '401':
          description: API key is missing or invalid
        '404':
          description: Webhook not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    delete:
      tags:
      - Webhooks
      summary: Delete a webhook subscription.
      description: Permanently deletes webhook subscription. Cannot be undone. Consider setting IsActive=false to temporarily disable instead.
      parameters:
      - name: id
        in: path
        description: The unique identifier of the webhook subscription to delete.
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Webhook deleted successfully
        '401':
          description: API key is missing or invalid
        '404':
          description: Webhook not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    patch:
      tags:
      - Webhooks
      summary: Update an existing webhook subscription.
      description: 'Partially updates an existing webhook subscription using HTTP PATCH.


        Supported Updates:

        - Change the webhook URL

        - Enable or disable the subscription

        - Regenerate the secret key


        Note: Event types cannot be changed after creation. To update event types, delete and recreate the subscription.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest'
      responses:
        '200':
          description: Webhook updated successfully
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto'
        '400':
          description: Invalid request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: Webhook not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    servers:
    - url: https://collectionpartner-api.debitura.com
      description: Production
  /webhooks/{id}/test:
    post:
      tags:
      - Webhooks
      summary: Send a test event to the webhook endpoint.
      description: 'Sends a synthetic case.created test event to the webhook endpoint.


        This is useful for:

        - Verifying the webhook URL is reachable

        - Testing your webhook endpoint implementation

        - Validating signature verification


        The test payload will be a realistic case.created event with synthetic data.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Test completed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.TestResultDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.TestResultDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.TestResultDto'
        '404':
          description: Webhook not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
      - Bearer: []
    servers:
    - url: https://customer-api.debitura.com
      description: Production
  /webhooks/{id}:test:
    post:
      tags:
      - Webhooks
      summary: Send a test event to the webhook endpoint.
      description: 'Sends a synthetic case.created test event to the webhook endpoint.


        This is useful for:

        - Verifying the webhook URL is reachable

        - Testing your webhook endpoint implementation

        - Validating signature verification


        The test payload will be a realistic case.created event with synthetic data.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Test completed
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.TestResultDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.TestResultDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.TestResultDto'
        '404':
          description: Webhook not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
      - Bearer: []
    servers:
    - url: https://customer-api.debitura.com
      description: Production
  /webhooks/{id}/replay:
    post:
      tags:
      - Webhooks
      summary: '[Deprecated] This endpoint is misnamed and does not actually replay events.

        Use `GET /webhooks/events?caseId={id}` to inspect delivery history,

        then `POST /webhooks/events/{eventId}/replay` to re-deliver a specific event.'
      description: "This endpoint was never fully implemented — it counts cases created\nsince `sinceUtc` and returns the count as `eventsReplayed`, but does not\nre-enqueue or redeliver any events. The name \"replay\" collides with the real\n`POST /webhooks/events/{eventId}/replay` endpoint which actually re-delivers.\n            \nThis endpoint is kept for backward compatibility (additive-only rule) but is deprecated.\nIntegrators should migrate to the event-log + replay-by-id pattern described above."
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Requests.ReplayRequestDto'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Requests.ReplayRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Requests.ReplayRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Requests.ReplayRequestDto'
      responses:
        '200':
          description: Count of cases since sinceUtc (not events replayed)
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.ReplayResultDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.ReplayResultDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.ReplayResultDto'
        '400':
          description: Invalid request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: Webhook not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      deprecated: true
      security:
      - ApiKey: []
      - Bearer: []
    servers:
    - url: https://customer-api.debitura.com
      description: Production
  /webhooks/{id}:replay:
    post:
      tags:
      - Webhooks
      summary: '[Deprecated] This endpoint is misnamed and does not actually replay events.

        Use `GET /webhooks/events?caseId={id}` to inspect delivery history,

        then `POST /webhooks/events/{eventId}/replay` to re-deliver a specific event.'
      description: "This endpoint was never fully implemented — it counts cases created\nsince `sinceUtc` and returns the count as `eventsReplayed`, but does not\nre-enqueue or redeliver any events. The name \"replay\" collides with the real\n`POST /webhooks/events/{eventId}/replay` endpoint which actually re-delivers.\n            \nThis endpoint is kept for backward compatibility (additive-only rule) but is deprecated.\nIntegrators should migrate to the event-log + replay-by-id pattern described above."
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Requests.ReplayRequestDto'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Requests.ReplayRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Requests.ReplayRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Requests.ReplayRequestDto'
      responses:
        '200':
          description: Count of cases since sinceUtc (not events replayed)
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.ReplayResultDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.ReplayResultDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalCustomerAPI.Models.Webhooks.Dtos.ReplayResultDto'
        '400':
          description: Invalid request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '404':
          description: Webhook not found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      deprecated: true
      security:
      - ApiKey: []
      - Bearer: []
    servers:
    - url: https://customer-api.debitura.com
      description: Production
  /v1/Webhooks:
    get:
      tags:
      - Webhooks
      summary: Get all webhooks for the authenticated referral partner
      description: 'Returns all webhook subscriptions with their configuration (URL, events, status). Note: Secrets are never included in GET responses.'
      responses:
        '200':
          description: List of webhook subscriptions
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
        '401':
          description: API key is missing or invalid
      security:
      - ApiKey: []
    post:
      tags:
      - Webhooks
      summary: Create a new webhook subscription
      description: 'Creates webhook subscription for real-time event notifications.


        **Available Events:**

        - `client.onboarding.poa_signed` - Client signed Power of Attorney

        - `client.onboarding.contract_signed` - Client signed Service Delivery Agreement

        - `client.linked` - Client successfully linked to your account

        - `client.link_declined` - Client declined to link

        - `client.link_requested` - 409 link request created (awaiting end-user approval)

        - `client.link_expired` - 409 link request reached its TTL without approval/decline

        - `case.created` - Collection case created for linked client

        - `case.updated` - Collection case lifecycle changed (e.g., Active → Closed)

        - `case.closed` - Collection case closed (terminal state)

        - `cases.replay_failed` - A stored case payload failed to create during 409 carry-through (retry via the Customer API)


        **Security:** Response includes Base64-encoded signing secret (shown only once). Store it to verify HMAC-SHA256 signatures on deliveries.


        **Requirements:** HTTPS URL required (HTTP, localhost, and private IPs rejected). Deliveries retry with exponential backoff (8 attempts). Webhook auto-disables after max failures.'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.CreateWebhookRequest_2'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.CreateWebhookRequest_2'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.CreateWebhookRequest_2'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.CreateWebhookRequest_2'
      responses:
        '200':
          description: Webhook created successfully
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
        '400':
          description: Invalid request (validation errors)
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
        '401':
          description: API key is missing or invalid
      security:
      - ApiKey: []
    servers:
    - url: https://referral-api.debitura.com
      description: Production
  /v1/Webhooks/{id}:
    get:
      tags:
      - Webhooks
      summary: Get a specific webhook by ID
      description: Returns webhook configuration including URL, events, active status, and DisabledReason if auto-disabled. Secret is never included (only shown during creation/regeneration).
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Webhook details
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
        '401':
          description: API key is missing or invalid
        '404':
          description: Webhook not found or does not belong to this partner
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
            text/json:
              schema:
                $ref: '#/components/schemas/Debitura.Web.ExternalApi.Contracts.V1.Errors.ApiErrorResponseDto'
      security:
      - ApiKey: []
    put:
      tags:
      - Webhooks
      summary: Update an existing webhook subscription
      description: Updates webhook URL, events, or active status. Set RegenerateSecret=true to rotate signing secret (returned in response). Use IsActive=true to re-enable auto-disabled webhooks after fixing delivery issues. Secret only included if RegenerateSecret=true.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest_2'
          application/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest_2'
          text/json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest_2'
          application/*+json:
            schema:
              $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.UpdateWebhookRequest_2'
      responses:
        '200':
          description: Webhook updated successfully
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'
            application/json:
              schema:
                $ref: '#/components/schemas/Debitura.Domain.Model.Webhooks.Dtos.WebhookDto_2'

# --- truncated at 32 KB (51 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/debitura/refs/heads/main/openapi/debitura-webhooks-api-openapi.yml