v2

latestOpenAPI 3.1.02026-07-263761369.4 KB
automations

Create automation

Create an automation owned by the effective actor. Admin service users may create on behalf of a same-organization project member only with the explicit impersonateUserEmail query parameter.

post/v1/projects/{projectId}/automations

Path parameters

projectIdstring required

Project ID.

Query parameters

impersonateUserEmailstring email

Admin service users may explicitly act as this same-organization project member. Human and non-admin service-user tokens must omit this parameter.

Request body

namestring required
descriptionstring nullable
enabledboolean
triggerType'schedule' | 'webhook' | 'incoming_webhook' | 'on_demand'
cronstring nullable
timezonestring
promptstring required
modelstring nullable
buildModelstring nullable
baseBranchstring nullable
repoBranchesobject nullable
agentType'build' | 'captain'
visibilityScope'project' | 'creator'
webhookSecretstring nullable

Response

Success

idstring required
projectIdstring required
createdByUserIdstring required
namestring required
descriptionstring nullable required
enabledboolean required
triggerType'schedule' | 'webhook' | 'incoming_webhook' | 'on_demand' | 'integration' required
{"stackTrail":"components:schemas:Automation:properties:integrationTriggerConfig:anyOf","oasType":"schema","type":"unknown","nullable":true}
cronstring nullable required
timezonestring required
promptstring required
modelstring nullable required
buildModelstring nullable required
baseBranchstring nullable required
repoBranchesobject nullable required
agentType'build' | 'captain' required
visibilityScope'project' | 'creator' required
webhookUrlstring nullable required

Relative bearer-capability URL for incoming-webhook automations. Treat this value as sensitive because anyone who possesses it can trigger the automation.

hasWebhookSecretboolean required
runCountinteger required
lastTriggeredAtstring nullable required
createdAtstring required
updatedAtstring required