Update Webhook
Replace supported webhook endpoint fields while preserving organization and project isolation.
Endpoint contract
Use the exact method and path shown above. Paths are relative to the API base URL.
Authentication, permission, and scope
| Control | Required contract |
|---|---|
| Authentication | Bearer access token. |
| Permission or scope | webhooks.manage capability and webhooks:write scope. |
| Resource scope | The endpoint must belong to the caller’s organization and active project context. |
Request fields
| Field | Type | Contract |
|---|---|---|
endpoint_id | integer path parameter | ID returned by create or list. |
name | string | Optional replacement name. |
url | URL | Optional replacement destination; validated again. |
description | string | Optional replacement description. |
events | string[] | Optional non-empty event list. |
retry_config | object | Optional replacement retry settings. |
signature_config | object | Optional replacement signature settings. |
Code examples
import osfrom memorysync import ControlPlaneClientclient = ControlPlaneClient(base_url="https://api.memorysync.io",access_token=os.environ["MEMORYSYNC_ACCESS_TOKEN"],)webhook = client.update_webhook(51,name="Primary production events",events=["memory.created", "memory.updated"],project_id=os.environ["MEMORYSYNC_PROJECT_ID"],)
Response shape
{"id":51,"name":"Primary production events","url":"https://hooks.example.com/memorysync","events":["memory.created","memory.updated"],"enabled":true,"project_id":"project_abc123","updated_at":"2026-08-01T12:00:00Z"}
- The response is the complete public webhook representation.
- Updating the URL reruns destination safety validation.
Status outcomes
Read the operation-specific response and persist only fields needed by the task.
Fix invalid path, query, or body fields before trying again.
Refresh authentication or verify the required organization permission and scope.
Treat the resource as unavailable without revealing whether it exists elsewhere.
Use returned retry metadata when present and reconcile uncertain mutations before repeating them.
Production handling
- 01
Authorize
APPConfirm the signed-in principal may perform this product action.
- 02
Validate
INPUTValidate identifiers and body fields before sending the request.
- 03
Call
SDKUse the named ControlPlaneClient method or equivalent HTTPS request from a trusted application context.
- 04
Inspect
RESULTUse the returned representation as current state.
- 05
Reconcile
SAFEAfter an uncertain mutation, fetch or list the endpoint before repeating the update.
Security notes
Required
Keep organization controls inside trusted boundaries.
- Authorize the endpoint ID before sending changes.
- Review event subscriptions when changing a destination.
- Rotate the secret through its dedicated route, not this update body.
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.