MemorySync
API Reference · Control-plane API

Test Webhook

Create a real test delivery for an enabled webhook endpoint subscribed to the selected event type.

Endpoint contract

POST/org/webhooks/{endpoint_id}/test
200 OK

Use the exact method and path shown above. Paths are relative to the API base URL.

Authentication, permission, and scope

ControlRequired contract
AuthenticationBearer access token.
Permission or scopewebhooks.manage capability and webhooks:write scope.
Resource scopeThe endpoint must belong to the caller’s organization and active project context.

Request fields

FieldTypeContract
endpoint_idinteger path parameterEnabled endpoint ID.
event_typestringOptional; defaults to memory.created and must be in the endpoint subscription.

Code examples

import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
result = client.test_webhook(
51,
event_type="memory.created",
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)

Response shape

response.json
{"delivery_id":8801,"event_id":"evt_test_abc123","event_type":"memory.created","endpoint_id":51,"status":"pending","payload":{"test":true},"message":"Test event queued for delivery"}
  • The request creates a real delivery record.
  • The returned status confirms queuing, not successful receipt by the destination.

Status outcomes

HTTP outcomes
2xx
Request completed

Read the operation-specific response and persist only fields needed by the task.

400 / 422
Correct the request

Fix invalid path, query, or body fields before trying again.

401 / 403
Access denied

Refresh authentication or verify the required organization permission and scope.

404
Unavailable in scope

Treat the resource as unavailable without revealing whether it exists elsewhere.

429 / 5xx
Keep the action recoverable

Use returned retry metadata when present and reconcile uncertain mutations before repeating them.

Production handling

Production request path
  1. 01

    Authorize

    APP

    Confirm the signed-in principal may perform this product action.

  2. 02

    Validate

    INPUT

    Validate identifiers and body fields before sending the request.

  3. 03

    Call

    SDK

    Use the named ControlPlaneClient method or equivalent HTTPS request from a trusted application context.

  4. 04

    Inspect

    RESULT

    Store the delivery ID and inspect delivery history for the final result.

  5. 05

    Reconcile

    SAFE

    Correct paused endpoints, invalid event types, or missing subscriptions before trying again.

Security notes

Control-plane safety

Required

Keep organization controls inside trusted boundaries.

  • Use test payloads only in approved non-sensitive flows.
  • Do not interpret a queued test as endpoint verification.
  • Keep destination response data restricted to webhook operators.

Avoid

Do not weaken the route contract in client code.

  • Do not expose bearer or refresh tokens in URLs, logs, or public clients.
  • Do not accept organization, member, project, or resource IDs without application authorization.
  • Do not treat returned data as trusted HTML, prompt instructions, or proof of application authorization.
Was this page helpful?