update_endpoint
Update an endpoint immediately or by staging the change in its line draft with commitMode "draft" and draftRevision; the patch is merged field-by-field onto the endpoint's current values, so omitted keys keep their values. Targets are matched by the id get_endpoint returned; without one, by the same name and targetUrl (when only one stored target has that pair); without either, a patch to the target in the same position matches it, as long as the list keeps its length, the patch doesn't change both its name and targetUrl, and a changed targetUrl stays on the same host. A matched target keeps its stored secrets (auth and signingSecret) when they are omitted or redacted; an unmatched target is new, must carry its secrets, and a redacted *** on it is rejected. An immediate update treats a target that exists only in the line draft as unmatched. Draft mode returns {draft}; an immediate update returns {endpoint, scheduledAt} with the endpoint's full updated document. Errors on a missing lineKey/endpointId, an unknown line or endpoint, a patch that fails validation (including a rejected target mapping or an outbound-allowlist violation), or a stale draftRevision. Requires edit access.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | Partial endpoint document — same shape as create_endpoint, every field optional. | |
| lineKey | Yes | The line key. | |
| commitMode | No | Defaults to publish. Draft writes require draftRevision. | |
| endpointId | Yes | The endpoint UUID. | |
| scheduledAt | No | Compatibility alias: stage this update then schedule its line. | |
| draftRevision | No | Current line draft revision, required for draft writes. |