Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(webhook): clarify direct redrive responses

Yudhi Armyndharisc2ea661ae7cb
diff --git a/openapi.json b/openapi.json
index 493c1d0cf..63e1f59a7 100644
--- a/openapi.json
+++ b/openapi.json
@@ -3725,7 +3725,7 @@
},
"responses": {
"200": {
- "description": "One bounded batch of replayable failure rows (terminal rows recorded while WEBHOOK_FAILURE_PAYLOAD_RETENTION_HOURS > 0), oldest first. Each replay reuses the stored idempotency key, so a receiver that already handled the event can dedup it, and runs the webhook:before hooks again. With the queue disabled each row gets one attempt; with it enabled the row is enqueued with the webhook retry policy. Rows outside the key allowedSessions are never touched.",
+ "description": "One bounded batch of replayable failure rows (terminal rows recorded while WEBHOOK_FAILURE_PAYLOAD_RETENTION_HOURS > 0), least-retried first, then oldest. Each replay reuses the stored idempotency key, so a receiver that already handled the event can dedup it, and runs the webhook:before hooks again. Each row gets one direct POST attempt even when ordinary delivery uses the queue; enqueued stays zero. Rows outside the key allowedSessions are never touched.",
"content": {
"application/json": {
"schema": {
@@ -19465,8 +19465,8 @@
"properties": {
"redriven": {
"type": "number",
- "description": "Rows replayed by this call: delivered plus enqueued.",
- "example": 3
+ "description": "Rows replayed by this call; equals delivered.",
+ "example": 2
},
"delivered": {
"type": "number",
@@ -19476,7 +19476,7 @@
"enqueued": {
"type": "number",
"description": "Reserved for response compatibility; operator redrive uses direct POST and returns zero.",
- "example": 1
+ "example": 0
},
"failed": {
"type": "number",
diff --git a/src/modules/webhook/dto/webhook.dto.ts b/src/modules/webhook/dto/webhook.dto.ts
index 2b159ea29..bb717c92b 100644
--- a/src/modules/webhook/dto/webhook.dto.ts
+++ b/src/modules/webhook/dto/webhook.dto.ts
@@ -467,7 +467,7 @@ export class RedriveWebhookDeliveriesDto {
/** Outcome of `POST /webhooks/delivery-failures/redrive`. */
export class WebhookRedriveResultDto {
- @ApiProperty({ description: 'Rows replayed by this call: delivered plus enqueued.', example: 3 })
+ @ApiProperty({ description: 'Rows replayed by this call; equals delivered.', example: 2 })
redriven!: number;
@ApiProperty({ description: 'Delivered by a direct POST; their failure rows were removed.', example: 2 })
@@ -475,7 +475,7 @@ export class WebhookRedriveResultDto {
@ApiProperty({
description: 'Reserved for response compatibility; operator redrive uses direct POST and returns zero.',
- example: 1,
+ example: 0,
})
enqueued!: number;
diff --git a/src/modules/webhook/webhooks-list.controller.ts b/src/modules/webhook/webhooks-list.controller.ts
index 999726474..4dab43393 100644
--- a/src/modules/webhook/webhooks-list.controller.ts
+++ b/src/modules/webhook/webhooks-list.controller.ts
@@ -68,10 +68,10 @@ export class WebhooksListController {
status: 200,
description:
'One bounded batch of replayable failure rows (terminal rows recorded while ' +
- 'WEBHOOK_FAILURE_PAYLOAD_RETENTION_HOURS > 0), oldest first. Each replay reuses the stored ' +
+ 'WEBHOOK_FAILURE_PAYLOAD_RETENTION_HOURS > 0), least-retried first, then oldest. Each replay reuses the stored ' +
'idempotency key, so a receiver that already handled the event can dedup it, and runs the ' +
- 'webhook:before hooks again. With the queue disabled each row gets one attempt; with it enabled ' +
- 'the row is enqueued with the webhook retry policy. Rows outside the key allowedSessions are ' +
+ 'webhook:before hooks again. Each row gets one direct POST attempt even when ordinary delivery ' +
+ 'uses the queue; enqueued stays zero. Rows outside the key allowedSessions are ' +
'never touched.',
type: WebhookRedriveResultDto,
})