MemorySync
API Reference

Test Webhook Endpoint

Send a synthetic event to a webhook endpoint to verify wiring. The handler creates a real delivery record (with a realistic payload for the chosen event type) and hands it off to the dispatch worker. The endpoint URL receives a normal signed delivery — there is no special test header.
POST/org/webhooks/{endpoint_id}/test

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
event_typestringoptionalOne of the event types the endpoint is subscribed to. Defaults to memory.created. Must be valid AND in the endpoint subscription list.
request.json
{
"event_type": "memory.created"
}

Response

Returns 200 OK with the following body.

FieldTypeRequiredDescription
delivery_idintegeroptionalNewly created delivery row.
event_idstringoptionalGenerated test event id (suffixed with _{endpoint_id}).
event_typestringoptionalEchoed event type.
endpoint_idintegeroptionalEchoed endpoint id.
statusstringoptionalAlways pending at creation; the worker advances it.
payloadobjectoptionalFull event envelope including the synthesised data body.
messagestringoptionalHuman-readable summary.
200.json
{
"delivery_id": 9012,
"event_id": "evt_test_a1b2c3d4e5f6_42",
"event_type": "memory.created",
"endpoint_id": 42,
"status": "pending",
"payload": {
"id": "evt_test_a1b2c3d4e5f6",
"type": "memory.created",
"created": "2026-05-04T12:31:00Z",
"data": {
"memory_id": "mem_test_abc123",
"content": "This is a test memory created via the dashboard."
}
},
"message": "Test event 'memory.created' dispatched. Delivery ID: 9012."
}

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/test \
-H "Authorization: Bearer $MEMORYSYNC_KEY" \
-H "Content-Type: application/json" \
-d '{
"event_type": "memory.created"
}'
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/test',
body: {
"event_type": "memory.created"
},
})
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/test",
json={
"event_type": "memory.created"
},
)
print(result)

Behavior & notes

Requires owner or admin role and webhooks:write scope. Returns 400 when the endpoint is paused, 400 when event_type is unknown or not in the subscription list, and 404 when the endpoint id is not visible to the caller's organisation. Track the delivery via GET /org/webhooks/{endpoint_id}/deliveries.