MemorySync
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

FieldTypeRequiredDescription
endpoint_idintegerrequiredWebhook endpoint id.

Request body

FieldTypeRequiredDescription
since_minutesintegeroptionalLookback window in minutes. Range 1..10080 (7 days). Default 60.
statusesstring[]optionalDelivery statuses eligible for replay. Default ["failed", "dead_letter"].
limitintegeroptionalMax 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.

FieldTypeRequiredDescription
endpoint_idintegeroptionalEchoed endpoint id.
eligibleintegeroptionalDeliveries matched by the window + status filter.
replayedintegeroptionalDeliveries actually re-queued.
skippedintegeroptionalDeliveries skipped because attempt_number >= max_attempts.
delivery_idsinteger[]optionalIds 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

StatusCodeDescription
400validation_errorBody or query failed schema validation. The error includes the offending field name.
401unauthenticatedMissing or invalid bearer token / API key.
403forbiddenAuthenticated principal lacks the required scope, role, or project access.
404not_foundTarget resource does not exist or is not visible to the calling tenant.
429rate_limitedPer-IP or per-route limit exceeded. Respect the Retry-After header.
500internal_errorUnhandled 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 Client
client = 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.