Endpoints
For full request, response, and error details, see the generated reference pages:- List Automations – every automation in the project with its trigger, action, enabled state, last fire time, and next scheduled run
- Create Automation – create an automation from a trigger and an action
- Update Automation – change the name, description, enabled state, trigger, or action. Only the fields you pass change, but
triggerandactioneach replace the stored value as a whole - Delete Automation – delete an automation and its automation history. Chat conversations and runs it started stay in the project. To pause an automation instead, update it with
isEnabled: false - Trigger Automation – fire a
scheduleorapi_webhookautomation now
write scope. See the API Introduction for authentication, including how organization-scoped keys pass projectShortId.
Triggers
With
once: true, the automation fires a single time and then disables itself. Pin the minute, hour, day, and month in cron so it fires at the time you intend.
GitHub pull request events
Agithub_event trigger needs at least one event:
The optional filters narrow which pull requests fire it. An empty or omitted filter matches everything.
labels: only pull requests with one of these labels (case-insensitive). Forpull_request.labeled, the label that was just added must be one of them.baseBranches: only pull requests into these base branches.*matches any characters, for examplerelease/*.repositories: only these repositories, asowner/name. Defaults to every repository connected to the project.includeDrafts: also fire for draft pull requests. Defaults tofalse.
github_event trigger fails when none is connected.
Actions
The
chat prompt runs unattended, so describe the whole task and the outcome you expect. When a GitHub event fires a chat automation, the conversation receives the pull request details.
review_pull_request needs a github_event trigger whose events are all open pull request events. It cannot use pull_request.merged or pull_request.closed.
If you delete the test plan that a run_test_plan automation uses, the automation fails until you point it at another plan.
Examples
Review every pull request intomain that gets the qa label:
Trigger an automation from CI
Create an automation with anapi_webhook trigger, then call Trigger Automation from a deploy hook, CI job, or monitoring alert. The optional context object is passed to the agent as-is, so include details such as the deployed version or environment name:
202 right away and the automation runs in the background. It returns 409 when the automation is disabled or has a github_event trigger, which fires only from its own events. A schedule automation can also be fired this way, outside its schedule.
Related documentation
- Test Plans – Group test cases to run together
- GitHub App – Connect the repositories that GitHub triggers listen to
- MCP Server – Manage automations from an AI assistant with the automation tools
- API Introduction – Authentication and ID reference