API Reference
Update Webhook
Update a webhook endpoint's URL, subscribed events, description, or active state. The signing secret is preserved; rotate it separately if compromised.
PATCH/org/webhooks/{endpoint_id}
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 | string | required | Webhook endpoint id. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | optional | New delivery URL. |
event_types | string[] | optional | Replace the subscribed event list. |
description | string | optional | New description. |
active | boolean | optional | Pause or resume deliveries. |
request.json
{"active": false}
Response
Returns 200 OK with the following body.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | optional | Endpoint id. |
url | string | optional | Delivery URL. |
event_types | string[] | optional | Subscribed events. |
active | boolean | optional | Active state. |
updated_at | string | optional | RFC 3339 UTC. |
200.json
{"id": "whk_01HX...","url": "https://hooks.acme.io/memorysync","event_types": ["memory.created","memory.forgotten"],"active": false,"updated_at": "2026-05-04T12:31:00Z"}
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 PATCH https://api.memorysync.io/org/webhooks/EXAMPLE_ID \-H "Authorization: Bearer $MEMORYSYNC_KEY" \-H "Content-Type: application/json" \-d '{"active": false}'
javascript
import { MemorySync } from 'memorysync'const client = new MemorySync({ apiKey: process.env.MEMORYSYNC_KEY })const result = await client.request({method: 'PATCH',path: '/org/webhooks/EXAMPLE_ID',body: {"active": false},})console.log(result)
python
from memorysync import Clientclient = Client(api_key=os.environ["MEMORYSYNC_KEY"])result = client.request(method="PATCH",path="/org/webhooks/EXAMPLE_ID",json={"active": false},)print(result)
Behavior & notes
Idempotent through Idempotency-Key on writes. Replays within 24h return the original response unchanged.