Inspect

Update automation

Partially update an automation. Only provided fields are changed.

Base URL
PATCH
/api/v2/automations/{automation_id}

Partially update an automation. Only provided fields are changed.

Authorization

bearerAuth automations:write
headerAuthorizationBearer <token>

API key authentication. Use your API key as the bearer token.

Scope: automations:write

Path Parameters

automation_id*string

Request Body

application/json
  1. body

Updates an automation. Only provided fields are changed. The triggers field replaces the ordered list; preserve ids for retained triggers.

name?string
Length1 <= length <= 100
description?|
Lengthlength <= 500
prompt?string
Length1 <= length <= 100000
repositories?array<>
Items1 <= items
triggers?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|null
post_to_slack_on_start?boolean

Whether 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?boolean

When 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.AutomationRunAs

Identity automation sessions run as: owner (the automation owner) or inspect (the Inspect system user). Only the owner can change this.

Value in"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/v2/models.

agent_id?string|null
autofix_ci_failures?|

Null resolves to the owner user setting and is stored explicitly.

auto_address_pull_request_reviews_policy?|

Policy applied to sessions. Null restores fallback to the owner user setting.

enabled?boolean

Whether automatic triggers are active. Ignored when the automation is manual-only.

template_variables?

Template variable definitions keyed by variable name.

Response Body

Automation updated

application/json
  1. response
data*
Example Request
curl -X PATCH 'https://app.inspect.com/api/v2/automations/k3v8n2w6q9ts' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "id": "k3v8n2w6q9ts",    "name": "Triage failing CI on main",    "description": "Investigates failing checks on main and opens a pull request with a fix.",    "prompt": "Investigate the failing {{check_name}} check on main for the {{service}} service and open a pull request with a fix.",    "repositories": [      "web"    ],    "triggers": [      {        "id": "m4p7x2c9d5hf",        "type": "cron",        "schedule_expression": "Every weekday at 9am",        "cron_expression": "0 9 * * 1-5",        "timezone": "America/New_York",        "enabled": true      }    ],    "slack_channel_id": "C03KH3AGN2G",    "post_to_slack_on_start": true,    "slack_mention_users": [      {        "type": "user",        "id": "U04QZ8K2M7N",        "name": "Jane Doe",        "avatar_url": "https://avatars.slack-edge.com/2024-03-12/6801234567890_3f9a1b2c4d5e6f708192_192.jpg"      }    ],    "notify_collaborators_on_merge": false,    "run_as": "owner",    "owner": {      "id": "Vq3kZ8xN2pLm7RtY4wHc9JbF6sDg1aEu",      "name": "Jane Doe",      "email": "jane@acme.com",      "avatar_url": "https://avatars.githubusercontent.com/u/5831047?v=4"    },    "collaborators": [      {        "id": "Vq3kZ8xN2pLm7RtY4wHc9JbF6sDg1aEu",        "name": "Jane Doe",        "email": "jane@acme.com",        "avatar_url": "https://avatars.githubusercontent.com/u/5831047?v=4"      }    ],    "model_id": "claude-opus-5-5",    "agent_id": "h2w9c4m7k1xz",    "autofix_ci_failures": true,    "auto_address_pull_request_reviews_policy": {      "enabled": true,      "reviewer_categories": {        "human": true,        "bot": false      },      "identity_rules": [        {          "selector": "bot:49699333",          "rule_type": "block"        }      ],      "review_buddy": {        "enabled": true,        "enabled_finding_types": [          "critical",          "warning"        ]      }    },    "template_variables": {      "service": {        "label": "Service",        "value_type": "text",        "default_value": "web",        "options": [          "web",          "api",          "worker"        ]      }    },    "enabled": true,    "last_run_at": "2026-10-29T13:00:04.512Z",    "next_run_at": "2026-10-30T13:00:00.000Z",    "archived_at": null,    "created_at": "2026-10-28T15:42:11.204Z",    "updated_at": "2026-10-28T16:05:37.918Z",    "viewer_can_edit": true  }}