Recover a delivery
When an automatic webhook delivery cycle exhausts all 10 attempts without a
successful 2xx acknowledgement, an authorized human can manually retry it.
Manual retry is a delivery operation only — it never resubmits or
re-evaluates the underlying job.
Checking delivery status
Before retrying, check whether the delivery is actually exhausted —
canRetry tells you directly:
import { client, getRunDelivery } from '@one-unity/rule-line-sdk';
client.setConfig({
baseUrl: 'https://api.rule-line.example.com',
auth: 'rl_key_your_api_key',
});
const detail = await getRunDelivery({ path: { runId: '22222222-2222-4222-8222-222222222222' } });
if (detail.error) {
throw new Error(`delivery lookup failed: ${detail.error.code}`);
}
console.log(`canRetry: ${detail.data.canRetry}`);
GET /runs/22222222-2222-4222-8222-222222222222/delivery HTTP/1.1
Host: api.rule-line.example.com
Authorization: Bearer rl_key_your_api_key
{
"runId": "22222222-2222-4222-8222-222222222222",
"eventId": "018f2c1a-9e3b-7c9a-8b0e-4f2a6d1c5e7b",
"eventType": "run.failed",
"test": false,
"eventCreatedAt": "2026-09-11T09:00:00.000Z",
"runCompletedAt": "2026-09-11T09:00:00.000Z",
"hasDestination": true,
"canRetry": true,
"attempts": [
{
"cycleNumber": 1,
"attemptNumber": 10,
"attemptLabel": "10 of 10",
"status": "exhausted",
"sentAt": "2026-09-14T09:00:00.000Z",
"destinationUrlUsed": "https://integrations.example-customer-tenant.example.com/webhooks/rule-line/incoming-terminal-events",
"secretVersionUsed": "55555555-5555-4555-8555-555555555555",
"httpStatus": 503,
"latencyMs": 5012,
"transportError": null,
"nextAttemptAt": null,
"requestPreview": null,
"responsePreview": null
}
]
}
Retrying an exhausted delivery
Manual retry requires a signed-in tenant session with the editor or approver delivery role — not an API key. This is deliberate: retry is a human-authorized action, distinct from the machine-to-machine API-key credentials every other call in this guide series uses. An API key, even one carrying every scope, is refused here; a viewer-role session is refused too — only editor and approver sessions may retry (a viewer may still read delivery history via the call above).
There is no generated SDK function for this call.
@one-unity/rule-line-sdkis generated from the API-key surface of the published contract, and manual retry is session-authenticated — so a typed client function for it could never work with the credential the SDK is built around. Issue the request directly, as shown below, with a tenant session access token read from wherever your application keeps the current session (for examplesupabase.auth.getSession()) — never anrl_key_...API key.
POST /runs/22222222-2222-4222-8222-222222222222/delivery/retry HTTP/1.1
Host: api.rule-line.example.com
Authorization: Bearer <tenant-session-access-token>
{
"runId": "22222222-2222-4222-8222-222222222222",
"eventId": "018f2c1a-9e3b-7c9a-8b0e-4f2a6d1c5e7b",
"cycleNumber": 2,
"attemptNumber": 1,
"status": "due",
"nextAttemptAt": "2026-09-14T09:00:01.000Z"
}
What retry does and does not do
A manual retry starts a fresh 10-attempt cycle for the exact same
immutable event — the same eventId as every prior attempt, delivered to
the destination's current URL using its current active signing
secret. It redelivers exactly the same event body; nothing about the
underlying run is touched:
- The job is never resubmitted or re-evaluated.
- No new run is created, and the retry incurs no additional run charge — contrast this with submitting an identical new job via Submit a job, which always creates and meters a second, independent run.
eventIdnever changes, so your own deduplication logic (see Verify a webhook) still applies — a retried delivery of an event you already recorded should be a no-op on your side beyond acknowledging it.- The acting user is recorded against the retry.
Errors
| Code | When |
|---|---|
VALIDATION_FAILED | The runId path parameter isn't a valid identifier. |
AUTHENTICATION_REQUIRED | No valid session or API key was presented. |
FORBIDDEN | An API key, or a session with no verified tenant delivery role, tried to retry. |
DELIVERY_RETRY_FORBIDDEN | A verified viewer-role session tried to retry (read is allowed; retry is not). |
DELIVERY_NOT_EXHAUSTED | The delivery hasn't finished its automatic attempts yet — check canRetry first. |
NOT_FOUND | No run/delivery with this id is visible to this tenant. |
The response schema above is the complete shape. This operation is not in the endpoint reference, which documents the API-key surface only.