MemorySync
API Reference · Control-plane API

Manage Webhooks

Inspect one endpoint, discover event types, monitor health, pause or resume delivery, and rotate signing credentials.

Shared access contract

ControlRequired contract
AuthenticationBearer access token for an active organization member.
Permissionwebhooks.manage capability; reads require webhooks:read and mutations require webhooks:write.
Project selectionWhere supported, pass project_id in Python, { projectId } options in Node.js, or X-Project-ID over HTTPS.

Get Webhook

GET/org/webhooks/{endpoint_id}
200 OK
FieldTypeContract
endpoint_idinteger pathRequired positive endpoint ID.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
webhook = client.get_webhook(
51,
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"id":51,"name":"Production events","url":"https://hooks.example.com/memorysync","events":["memory.created"],"enabled":true,"project_id":"project_abc123"}
  • The raw signing secret is never returned by this read.
ConcernContract
ScopeEndpoint must match the organization and selected project.
Errors401/403 access failure; 404 unavailable endpoint.

Get Webhook Event Types

GET/org/webhooks/event-types
200 OK
FieldTypeContract
Request bodynoneNo path, query, or body fields.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
event_types = client.get_webhook_event_types(
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"event_types":["memory.created","memory.updated","memory.deleted"],"categories":{"memory":["memory.created","memory.updated","memory.deleted"]}}
  • Use this response as the canonical subscription choices.
ConcernContract
ScopeEvent catalog is returned in the caller’s authorized project context.
Errors401/403 access failure; 5xx catalog unavailable.

Get Webhook Health

GET/org/webhooks/health
200 OK
FieldTypeContract
Request bodynoneNo path, query, or body fields.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
health = client.get_webhook_health(
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"active_webhooks":1,"total_webhooks":1,"total_deliveries_24h":240,"success_rate_7d":99.5,"failing_endpoints":0,"pending_retries":0,"dead_letter_count":0}
  • Health values are operational summaries, not delivery guarantees.
ConcernContract
ScopeAggregates only endpoints and deliveries in the selected project context.
Errors401/403 access failure; 5xx health aggregation unavailable.

Pause Webhook

POST/org/webhooks/{endpoint_id}/pause
200 OK
FieldTypeContract
endpoint_idinteger pathRequired active endpoint ID.
Request bodynoneNo JSON body.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
webhook = client.pause_webhook(
51,
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"id":51,"name":"Production events","enabled":false,"project_id":"project_abc123"}
  • Use the returned endpoint state to confirm delivery is paused.
ConcernContract
ScopeEndpoint must match the organization and selected project.
Errors400 endpoint cannot transition; 401/403 access failure; 404 unavailable endpoint.

Resume Webhook

POST/org/webhooks/{endpoint_id}/resume
200 OK
FieldTypeContract
endpoint_idinteger pathRequired paused endpoint ID.
Request bodynoneNo JSON body.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
webhook = client.resume_webhook(
51,
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"id":51,"name":"Production events","enabled":true,"project_id":"project_abc123"}
  • Resuming allows new deliveries; it does not replay old failures.
ConcernContract
ScopeEndpoint must match the organization and selected project.
Errors400 endpoint cannot transition; 401/403 access failure; 404 unavailable endpoint.

Rotate Webhook Secret

POST/org/webhooks/{endpoint_id}/rotate-secret
200 OK
FieldTypeContract
endpoint_idinteger pathRequired endpoint ID.
Request bodynoneNo JSON body.
import os
from memorysync import ControlPlaneClient
client = ControlPlaneClient(
base_url="https://api.memorysync.io",
access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],
)
webhook = client.rotate_webhook_secret(
51,
project_id=os.environ["MEMORYSYNC_PROJECT_ID"],
)
response.json
{"id":51,"name":"Production events","secret_prefix":"whsec_efgh","secret":"<shown-once>","project_id":"project_abc123"}
  • Store the new secret immediately; the raw value is shown only in this response.
ConcernContract
ScopeEndpoint must match the organization and selected project.
Errors401/403 access failure; 404 unavailable endpoint; 409 rotation conflict; 429 rate limited.

Shared handling