Skip to main content

Create an automation

Request

Security
ApiKey(Required scopes: automations.create)
Bodyapplication/jsonrequired
projectIdstring, non-emptyrequired
namestring, [ 1 .. 100 ] characters\Srequired
actionPromptstring, non-empty\Srequired
modelSelectionstring(AutomationModelSelection)

Model family for the automation's runs. Omit to use the organization's default model at run time.

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

Responses

The created 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" }