Update automation
Partially update an automation. Only provided fields are changed.
Partially update an automation. Only provided fields are changed.
bearerAuthAuthorizationBearer <token>API key authentication. Use your API key as the bearer token.
automation_id*stringapplication/json- body
Updates an automation. Only provided fields are changed. The triggers field replaces the ordered list; preserve ids for retained triggers.
name?string1 <= length <= 100description?|length <= 500prompt?string1 <= length <= 100000repositories?array<>1 <= itemstriggers?array<|||||||>Replacement trigger definitions. Pass an empty array for manual-only. Preserve ids for retained triggers; any trigger type may appear multiple times.
slack_channel_id?string|nullslack_fanout_destinations?array<>Replacement purpose-routed destination list. Use this when an automation description/update says things like "#C03KH3AGN2G - mobile app related issues or minor improvements". Each entry means results matching that purpose may post to that channel.
items <= 50post_to_slack_on_start?booleanWhether automation sessions post to Slack when they start.
slack_mention_users?array<|>Replacement list of Slack users and user groups to mention in automation posts.
notify_collaborators_on_merge?booleanWhen true, automation-created PR merges ping the automation owner and collaborators in the Slack thread, or a group DM when no thread is available.
run_as?Automations.AutomationRunAsIdentity automation sessions run as: owner (the automation owner) or inspect (the Inspect system user). Only the owner can change this.
"owner""inspect"collaborator_user_ids?array<>Replacement collaborator list. Collaborators can view and edit this automation from Automations. The owner is always included and ignored if passed here.
model_id?|Must be one of the model ids from GET /api/public/v1/models.
custom_agent_id?string|nullautofix_ci_failures?|Null resolves to the owner user setting and is stored explicitly.
auto_review_enabled?|Null resolves to false and is stored explicitly.
auto_address_pr_reviews_policy?|Policy applied to sessions. Null restores fallback to the owner user setting.
enabled?booleanWhether automatic triggers are active. Ignored when the automation is manual-only.
template_variables?Template variable definitions keyed by variable name. Each value must be an object; label, valueType (text, integer, number or boolean), defaultValue and options are read from it and any other or invalid fields are ignored.
Automation updated
application/json- response
data*curl -X PATCH 'https://your-org.inspect.com/api/public/v1/automations/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "data": { "id": "string", "name": "string", "description": "string", "prompt": "string", "repositories": [ "string" ], "triggers": [ { "id": "string", "type": "cron", "schedule_expression": "string", "cron_expression": "string", "timezone": "string", "enabled": true } ], "slack_channel_id": "string", "slack_fanout_destinations": [ { "channel_id": "string", "context": "string" } ], "post_to_slack_on_start": true, "slack_mention_users": [ { "type": "user", "id": "string", "name": "string", "image": "string" } ], "notify_collaborators_on_merge": true, "run_as": "owner", "owner": { "id": "string", "name": "string", "email": "string", "image": "string" }, "collaborators": [ { "id": "string", "name": "string", "email": "string", "image": "string" } ], "model_id": "string", "custom_agent_id": "string", "autofix_ci_failures": true, "auto_review_enabled": true, "auto_address_pr_reviews_policy": { "enabled": true, "reviewerCategories": { "human": true, "bot": true }, "identityRules": [ { "selector": "string", "ruleType": "allow" } ], "reviewBuddy": { "enabled": true, "enabledFindingTypes": [ "critical" ] } }, "template_variables": {}, "enabled": true, "last_run_at": "2019-08-24T14:15:22Z", "next_run_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "viewer_can_edit": true }}