Webhooks
- Base URL
https://referral-api.debitura.com- Authentication
- API key in the
XApiKeyheader
Get all webhooks for the authenticated referral partner
/v1/WebhooksReturns all webhook subscriptions with their configuration (URL, events, status). Note: Secrets are never included in GET responses.
Returns
200 List of webhook subscriptions — a list of the objects below.
iduuidUnique identifier for the webhook subscription.
urlstringnullableThe HTTPS URL where webhook events will be delivered.
eventsarray of stringsnullableArray of event types this subscription is interested in.
isActivebooleanWhether this webhook subscription is active.
createdUtcdatetimeTimestamp when the webhook subscription was created (UTC).
updatedUtcdatetimeTimestamp when the webhook subscription was last updated (UTC).
disabledReasonstringnullableReason why the webhook was automatically disabled (if IsActive is false).
secretstringnullableSecret key for HMAC-SHA256 signature verification. Only returned on creation or secret regeneration — never exposed again for security.
isTestModebooleanTrue when the subscription has
DataClassification.Testclassification; false for all other classifications (Production, Demo). Computed asClassification != DataClassification.Production.
curl https://referral-api.debitura.com/v1/Webhooks \-H "XApiKey: $DEBITURA_API_KEY"
[{"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31","url": "https://app.debitura.com/…","events": ["string"],"isActive": true,"createdUtc": "2026-10-01T14:05:00Z","updatedUtc": "2026-10-01T14:05:00Z","disabledReason": null,"secret": "string","isTestMode": true}]
Create a new webhook subscription
/v1/WebhooksCreates webhook subscription for real-time event notifications.
Available Events:
client.onboarding.poa_signed- Client signed Power of Attorneyclient.onboarding.contract_signed- Client signed Service Delivery Agreementclient.linked- Client successfully linked to your accountclient.link_declined- Client declined to linkclient.link_requested- 409 link request created (awaiting end-user approval)client.link_expired- 409 link request reached its TTL without approval/declinecase.created- Collection case created for linked clientcase.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.
Request body
urlstringRequiredThe HTTPS URL where webhook events will be delivered. Must be a valid HTTPS URL.
Max 800 characters · URLeventsarray of stringsRequiredArray of event types to subscribe to.
isTestModebooleanWhen true, the subscription is created with
DataClassification.Test, meaning it will only receive events for test-classified data. Defaults to false (Production classification).
Returns
200 Webhook created successfully
iduuidUnique identifier for the webhook subscription.
urlstringnullableThe HTTPS URL where webhook events will be delivered.
eventsarray of stringsnullableArray of event types this subscription is interested in.
isActivebooleanWhether this webhook subscription is active.
createdUtcdatetimeTimestamp when the webhook subscription was created (UTC).
updatedUtcdatetimeTimestamp when the webhook subscription was last updated (UTC).
disabledReasonstringnullableReason why the webhook was automatically disabled (if IsActive is false).
secretstringnullableSecret key for HMAC-SHA256 signature verification. Only returned on creation or secret regeneration — never exposed again for security.
isTestModebooleanTrue when the subscription has
DataClassification.Testclassification; false for all other classifications (Production, Demo). Computed asClassification != DataClassification.Production.
curl -X POST https://referral-api.debitura.com/v1/Webhooks \-H "XApiKey: $DEBITURA_API_KEY" \-H "Content-Type: application/json" \-d '{"url": "https://example.com/webhooks/debitura","events": ["string"]}'
{"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31","url": "https://app.debitura.com/…","events": ["string"],"isActive": true,"createdUtc": "2026-10-01T14:05:00Z","updatedUtc": "2026-10-01T14:05:00Z","disabledReason": null,"secret": "string","isTestMode": true}
Get a specific webhook by ID
/v1/Webhooks/{id}Returns webhook configuration including URL, events, active status, and DisabledReason if auto-disabled. Secret is never included (only shown during creation/regeneration).
Path parameters
iduuidRequired
Returns
200 Webhook details
iduuidUnique identifier for the webhook subscription.
urlstringnullableThe HTTPS URL where webhook events will be delivered.
eventsarray of stringsnullableArray of event types this subscription is interested in.
isActivebooleanWhether this webhook subscription is active.
createdUtcdatetimeTimestamp when the webhook subscription was created (UTC).
updatedUtcdatetimeTimestamp when the webhook subscription was last updated (UTC).
disabledReasonstringnullableReason why the webhook was automatically disabled (if IsActive is false).
secretstringnullableSecret key for HMAC-SHA256 signature verification. Only returned on creation or secret regeneration — never exposed again for security.
isTestModebooleanTrue when the subscription has
DataClassification.Testclassification; false for all other classifications (Production, Demo). Computed asClassification != DataClassification.Production.
Errors
401 | API key is missing or invalid |
404 | Webhook not found or does not belong to this partner |
See Error handling.
curl https://referral-api.debitura.com/v1/Webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31 \-H "XApiKey: $DEBITURA_API_KEY"
{"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31","url": "https://app.debitura.com/…","events": ["string"],"isActive": true,"createdUtc": "2026-10-01T14:05:00Z","updatedUtc": "2026-10-01T14:05:00Z","disabledReason": null,"secret": "string","isTestMode": true}
Update an existing webhook subscription
/v1/Webhooks/{id}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.
Path parameters
iduuidRequired
Request body
urlstringnullableThe new HTTPS URL where webhook events will be delivered. Optional — only provide if changing the URL.
Max 800 characters · URLeventsarray of stringsnullableUpdated list of event types to subscribe to. Optional — only provide if changing the events. Note: Not supported by the ExternalCustomerAPI — that endpoint returns 400 if this field is set.
isActivebooleannullableSet to true to enable the webhook, false to disable it. Optional — only provide if changing the active status.
regenerateSecretbooleanSet to true to regenerate the webhook secret. A new secret will be returned in the response.
isTestModebooleannullableWhen set, updates the classification of the subscription. True maps to
DataClassification.Test; false maps toDataClassification.Production. Omit to leave the current classification unchanged.
Returns
200 Webhook updated successfully
iduuidUnique identifier for the webhook subscription.
urlstringnullableThe HTTPS URL where webhook events will be delivered.
eventsarray of stringsnullableArray of event types this subscription is interested in.
isActivebooleanWhether this webhook subscription is active.
createdUtcdatetimeTimestamp when the webhook subscription was created (UTC).
updatedUtcdatetimeTimestamp when the webhook subscription was last updated (UTC).
disabledReasonstringnullableReason why the webhook was automatically disabled (if IsActive is false).
secretstringnullableSecret key for HMAC-SHA256 signature verification. Only returned on creation or secret regeneration — never exposed again for security.
isTestModebooleanTrue when the subscription has
DataClassification.Testclassification; false for all other classifications (Production, Demo). Computed asClassification != DataClassification.Production.
Errors
400 | Invalid request (validation errors) |
401 | API key is missing or invalid |
404 | Webhook not found or does not belong to this partner |
See Error handling.
curl -X PUT https://referral-api.debitura.com/v1/Webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31 \-H "XApiKey: $DEBITURA_API_KEY" \-H "Content-Type: application/json" \-d '{}'
{"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31","url": "https://app.debitura.com/…","events": ["string"],"isActive": true,"createdUtc": "2026-10-01T14:05:00Z","updatedUtc": "2026-10-01T14:05:00Z","disabledReason": null,"secret": "string","isTestMode": true}
Delete a webhook subscription
/v1/Webhooks/{id}Permanently deletes webhook subscription. Cannot be undone. Consider setting IsActive=false to temporarily disable instead. Delivery history is lost after deletion.
Path parameters
iduuidRequired
Returns
204 Webhook deleted successfully — no response body.
Errors
401 | API key is missing or invalid |
404 | Webhook not found or does not belong to this partner |
See Error handling.
curl -X DELETE https://referral-api.debitura.com/v1/Webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31 \-H "XApiKey: $DEBITURA_API_KEY"
204 Webhook deleted successfully. No response body.
Trigger a test webhook event (test environment only)
/v1/Webhooks/testTriggers a realistic webhook delivery through the real pipeline (queue → dispatcher → HMAC-signed HTTP delivery).
⚠️ TEST ENVIRONMENT ONLY - Returns 403 in production. Use testreferral-api.debitura.com for testing.
How it works:
- Looks up real entity data (case or client link) to construct a realistic payload
- Publishes through the same pipeline as production events (signature verification, retries, etc.)
- Returns immediately after enqueueing — delivery is async via Azure Queue
Case events (case.created, case.updated, case.closed):
- Requires
caseId— must be a real case belonging to a linked client - For
case.updated: optionally provideoldLifecycleandnewLifecycle(defaults to current → Closed) - For
case.closed: optionally providecloseCodeandcloseComment(defaults to Paid)
Client events (client.linked, client.link_declined, client.link_requested, client.link_expired, client.onboarding.poa_signed, client.onboarding.contract_signed):
- Requires
externalTenantId— must be an active client link belonging to your account
Request body
eventTypestringRequiredThe webhook event type to trigger (e.g. "case.updated", "client.linked")
caseIduuidnullableRequired for case.created, case.updated, and case.closed events
collectionRequestIduuidnullableRequired for collection_request.updated.
externalTenantIdstringnullableRequired for client.* events (client.linked, client.link_declined, client.onboarding.*)
oldLifecyclestringnullableOptional override for case.updated: the "from" lifecycle (defaults to current case lifecycle)
newLifecyclestringnullableOptional override for case.updated: the "to" lifecycle (defaults to "Closed")
closeCodestringnullableOptional override for case.closed: the close code (defaults to "Paid")
closeCommentstringnullableOptional override for case.closed: a close comment
Returns
200 Test event enqueued successfully
eventTypestringnullableenqueuedCountintegermessagestringnullable
Errors
400 | Invalid request (missing required fields or invalid event type) |
401 | API key is missing or invalid |
403 | Endpoint not available in production environment |
404 | Case or client link not found |
See Error handling.
curl -X POST https://referral-api.debitura.com/v1/Webhooks/test \-H "XApiKey: $DEBITURA_API_KEY" \-H "Content-Type: application/json" \-d '{"eventType": "string"}'
{"eventType": "string","enqueuedCount": 42,"message": "Payment plan agreed with the debtor."}