Update automation
Update an automation.
Present groups merge member-wise by default (RFC 7396): omitted members keep their stored value and explicit nulls clear them. List membership replaces wholesale, and each sent element merges onto the stored element of the same type when that type occurs exactly once on both sides.
Permissions
Requires a service user with theManageOrgAutomations permission at the organization level.
Merge semantics
Under the defaultmerge_patch semantics, PATCH fields merge member-wise (RFC 7396 style): omitted members keep their stored value, explicit nulls clear, and empty groups are no-ops. Metadata merges per key, with null values deleting keys. Lists replace wholesale, while each sent element merges onto the stored element of the same type when that type occurs exactly once on both sides.
Under replace_groups semantics, nothing merges: a sent object group replaces the stored group wholesale, and a sent triggers or actions list replaces the stored list wholesale with no element-wise merging. Resend every member you want to keep — omitted members are cleared or reset to their default. metadata is also a full replacement set, so removing a key means resending the set without it; null metadata values are rejected with a 400 rather than deleting keys. Omitted top-level fields still stay unchanged.
Check the update_semantics field of the event schemas endpoint for the semantics active for your organization before relying on either behavior. Treat it as an open enum and tolerate values beyond the two above.
Webhook triggers
Re-adding awebhook:incoming trigger mints a new secret and returns it in the update response. This is the only time the secret is shown, so capture it when you receive it. Replacing or keeping an existing webhook trigger preserves the existing secret.Authorizations
Service User credential (prefix: cog_)
Path Parameters
Organization ID (prefix: org-)
"org-abc123def456"
Body
PATCH fields merge member-wise by default: omitted members are kept,
explicit nulls clear, and empty groups are no-ops. Metadata merges per key,
with null values deleting keys. Lists replace wholesale (deletion = resend
the list without the element), while each sent element merges onto the
stored element of the same type when that type occurs exactly once on both
sides. Element members that are required on create (prompt,
setup_prompt, the monitor/triage slack configs, scan_id) may be
omitted when a counterpart exists — they carry like any other member;
explicit null is rejected.
- AutomationStartSessionActionUpdate
- AutomationMessageSessionActionUpdate
- AutomationMonitorSessionActionUpdate
1 - 500Identity the spawned sessions run under. organization: the org's automation identity (the System User in the app) — sessions use system permissions, so MCP servers installed with a personal (user-scoped) connection cannot be selected, and switching an automation to organization removes them from its selection. creator: personal automation — runs with the creator's own permissions and is visible only to the creator and org admins; rejected for service-user-created automations. Required on create; null on update resets to organization.
- AutomationRunAsOrganization
- AutomationRunAsCreator
The automation's own security-profile binding: a profile_id pins that profile, {"profile_id": null} records an explicit opt-out, and explicit null reverts to inheriting from the org/enterprise. Requires the security-profile management permission.
Applied to every session this automation spawns (including monitor sessions).
Response
Successful Response
- AutomationStartSessionAction
- AutomationMessageSessionAction
- AutomationMonitorSessionAction
A user or service-user principal attributed to an action or resource.
A user or service-user principal attributed to an action or resource.
Identity the spawned sessions run under. organization: the org's automation identity (the System User in the app) — sessions use system permissions, so MCP servers installed with a personal (user-scoped) connection cannot be selected, and switching an automation to organization removes them from its selection. creator: personal automation — runs with the creator's own permissions and is visible only to the creator and org admins; rejected for service-user-created automations. Required on create; null on update resets to organization.
- AutomationRunAsOrganization
- AutomationRunAsCreator
The automation's security-profile binding and the resolved governing profiles. null when security profiles are not enabled for the organization.
Applied to every session this automation spawns (including monitor sessions).

