Repository navigation
feat: add webhook delivery retry - #42
Merged
Merged
Conversation
- New team operation POST /webhooks/{webhookId}/deliveries/{deliveryId}/retry
returning RetryWebhookDeliveryResponse (202).
- WebhookDeliveryData and WebhookDeliveryListData gain optional, nullable
next_retry_at.
- WebhookDeliveryData content fields note that they are always included with
a team API token.
- Webhook delivery endpoints and regenerate-secret list 401/403/429 bodies as
either ErrorMessage or ApiError.
Co-Authored-By: Claude <noreply@anthropic.com>
Add webhooks.deliveries.retry(webhookId, deliveryId, options?), which sends a delivery's original payload to the webhook again. Team token. Co-Authored-By: Claude <noreply@anthropic.com>
bjornftw
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds
webhooks.deliveries.retry(webhookId, deliveryId, options?), which sends a webhook delivery's original payload to the webhook again now. The retry counts as a delivery attempt; if it fails with a retryable error, automatic retries continue. Team token.webhooks.deliveries.retrieve(webhookId, deliveryId), following the SDK's existingwebhooks.deliveries.*grouping.Idempotency-Key(the operation takes none). Takes the usualRequestOptions.RetryWebhookDeliveryResponse({ message, delivery_id }, HTTP 202).WEBHOOK_DISABLED,WEBHOOK_DELIVERY_NOT_RETRYABLE,WEBHOOK_DELIVERY_RETRY_IN_PROGRESS) throws the existingConflictError(anApiError) with the code inerror.code. No new error class..and..path parameters are rejected before any request, as for the other methods.Non-breaking. Suggested bump: minor.
API changes in the regenerated types
POST /webhooks/{webhookId}/deliveries/{deliveryId}/retry(team token, no body, 202)operations.ts, newRetryWebhookDeliveryResponsetypewebhooks.deliveries.retrynext_retry_at?: string | null: when the next automatic retry is due,nullwhen none is scheduledWebhookDeliveryData,WebhookDeliveryListDatapayload,response_body,response_headers,error_messagenow document that they are always included with a team API tokenWebhookDeliveryDataErrorMessage({ message }) orApiError({ error: { code, message } }); 429 is inline instead of the sharedTooManyRequestsresponseregenerate-secrettypes.ts,operations.tsUsage
Checks
Run locally on Node v26.5.0:
npm cinpm run generatetypes.tsandoperations.tsonlynpm run generate:checknpm run lintnpm run type-checknpm run test:coveragenpm run buildnpm run test:smokenpx jeston Node v23.2.0New tests in
test/team-api.test.ts: operation coverage (now 60 operations), path, method, team auth header, no body and noIdempotency-Key; 202 parsed intoRetryWebhookDeliveryResponse; 409WEBHOOK_DELIVERY_NOT_RETRYABLEasConflictErrorwith its code; path-parameter validation for both IDs;next_retry_atread as a value and asnullon a delivery and on a delivery list.Not run locally
Suggested release tag
v3.2.0, together with the unreleasedmessages.resendand per-email batch idempotency keys already onmainsincev3.1.0.🤖 Generated with Claude Code