Skip to main content

Edit an automation

Request

Update the saved definition in place. Existing run prompts are unchanged.

Security
ApiKey(Required scopes: automations.update)
Path
automationIdstring, non-emptyrequired

Automation ID

Bodyapplication/jsonrequired
non-empty
namestring, [ 1 .. 100 ] characters\S
actionPromptstring, non-empty\S
modelSelectionstring or null

Model family for the automation's runs. Omit to leave the saved choice unchanged. Send null to clear it, so runs use the organization's default AI model.

Enum:"auto""sonnet""opus"
Payload
{ "name": "string", "actionPrompt": "string", "modelSelection": "auto" }

Responses

The updated automation

Bodyapplication/json
idstringrequired
projectIdstringrequired
namestringrequired
actionPromptstringrequired
modelSelectionAutomationModelSelection (string) or nullrequired
One of:

Model family an automation's runs use. auto picks the recommended model. sonnet and opus pick the current version of that family.

string(AutomationModelSelection)
Enum:"auto""sonnet""opus"
isOwnerbooleanrequired

True when the caller's member owns the automation. Always false for an organization API key, which acts as no member. Use permissions to decide which actions to offer.

permissionsobjectrequired

What the caller can do to the automation, as decided by the server's access policy. For an organization API key, canEdit, canSetEnabled, and canDelete are false, and canRun is true when the owner is an active member.

createdAtstring, (date-time)required
updatedAtstring, (date-time)required

When the automation was created or its name, prompt, or trigger last changed.

Response
{ "id": "string", "projectId": "string", "name": "string", "actionPrompt": "string", "modelSelection": "auto", "isOwner": true, "permissions": { "canEdit": true, "canSetEnabled": true, "canDelete": true, "canRun": true }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }