API Reference
Replay Webhook Deliveries
Re-dispatch failed (or dead-letter) deliveries within a recent window. Designed for the "we just fixed our consumer, please resend the last hour" workflow. Deliveries that have already exhausted
max_attempts are skipped; the rest are re-queued with their attempt counter incremented.POST/org/webhooks/{endpoint_id}/replay
Authentication
Accepts a JWT bearer token (Authorization: Bearer eyJ…) or an API key (X-API-Key: ms_live_…). API-key callers should send X-Project-ID unless the key is project-locked. Cross-tenant operators must send X-Tenant-ID.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
endpoint_id | integer | required | Webhook endpoint id. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
since_minutes | integer | optional | Lookback window in minutes. Range 1..10080 (7 days). Default 60. |
statuses | string[] | optional | Delivery statuses eligible for replay. Default ["failed", "dead_letter"]. |
limit | integer | optional | Max deliveries replayed per call. Range 1..1000. Default 100. |
request.json
{"since_minutes": 240,"statuses": ["failed"],"limit": 200}
Response
Returns 200 OK with the following body.
| Field | Type | Required | Description |
|---|---|---|---|
endpoint_id | integer | optional | Echoed endpoint id. |
eligible | integer | optional | Deliveries matched by the window + status filter. |
replayed | integer | optional | Deliveries actually re-queued. |
skipped | integer | optional | Deliveries skipped because attempt_number >= max_attempts. |
delivery_ids | integer[] | optional | Ids of the deliveries that were re-queued. |
200.json
{"endpoint_id": 42,"eligible": 7,"replayed": 6,"skipped": 1,"delivery_ids": [9001,9002,9003,9004,9005,9006]}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Body or query failed schema validation. The error includes the offending field name. |
| 401 | unauthenticated | Missing or invalid bearer token / API key. |
| 403 | forbidden | Authenticated principal lacks the required scope, role, or project access. |
| 404 | not_found | Target resource does not exist or is not visible to the calling tenant. |
| 429 | rate_limited | Per-IP or per-route limit exceeded. Respect the Retry-After header. |
| 500 | internal_error | Unhandled server error. Quote the request_id when contacting support. |
Examples
cURL
curl -X POST https://api.memorysync.io/org/webhooks/EXAMPLE_ID/replay \-H "Authorization: Bearer $MEMORYSYNC_KEY" \-H "Content-Type: application/json" \-d '{"since_minutes": 240,"statuses": ["failed"],"limit": 200}'
javascript
import { MemorySync } from 'memorysync'const client = new MemorySync({ apiKey: process.env.MEMORYSYNC_KEY })const result = await client.request({method: 'POST',path: '/org/webhooks/EXAMPLE_ID/replay',body: {"since_minutes": 240,"statuses": ["failed"],"limit": 200},})console.log(result)
python
from memorysync import Clientclient = Client(api_key=os.environ["MEMORYSYNC_KEY"])result = client.request(method="POST",path="/org/webhooks/EXAMPLE_ID/replay",json={"since_minutes": 240,"statuses": ["failed"],"limit": 200},)print(result)
Behavior & notes
Requires owner or admin role and webhooks:write scope. Each replay writes an audit row (webhook.delivery_retried) with the actor and request context. Replayed deliveries flow through the same dispatch + retry logic as fresh ones.