---
title: "Update automation"
method: PATCH
path: "/v1/projects/{projectId}/automations/{automationId}"
tags: ["automations"]
---

# Update automation

`PATCH /v1/projects/{projectId}/automations/{automationId}`

Partially update an automation visible to the effective actor. Creator-private ownership is enforced.

## Path parameters

- `projectId` string, required
- `automationId` string, required

## Query parameters

- `impersonateUserEmail` string, 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

- UpdateAutomationBody
  - `name` string
  - `description` string, nullable
  - `enabled` boolean
  - `triggerType` 'schedule' | 'webhook' | 'incoming_webhook' | 'on_demand'
  - `cron` string, nullable
  - `timezone` string
  - `webhookConfig` object, nullable
    - `source` 'github', required
    - `events` object[], required
      - `event` string, required
      - `actions` string[]
    - `filters` object
      - `branches` string[]
  - `prompt` string
  - `model` string, nullable
  - `buildModel` string, nullable
  - `baseBranch` string, nullable
  - `repoBranches` object, nullable
  - `agentType` 'build' | 'captain'
  - `visibilityScope` 'project' | 'creator'
  - `webhookSecret` string, nullable
  - `triggers` union[]
    - union
      - object
        - `id` string
        - `type` 'schedule', required
        - `config` object, required
          - `version` 2
          - `cron` string, required
          - `timezone` string, required
        - `scheduleId` string, nullable
      - object
        - `id` string
        - `type` 'github', required
        - `config` union, required
          - object
            - `source` 'github', required
            - `events` object[], required
              - …
            - `filters` object
              - …
          - object
            - `version` 2, required
            - `provider` 'github', required
            - `event` 'draft_opened' | 'pull_request_opened' | 'pull_request_pushed' | 'pull_request_merged' | 'comment' | 'branch_push' | 'label_change' | 'checks' | 'issue_comment' | 'pull_request_review_comment' | 'pull_request_review_submitted' | 'pull_request_review_thread' | 'workflow_run', required
            - `conditions` object
              - …
            - `runWhen` string
      - object
        - `id` string
        - `type` 'slack', required
        - `config` object, required
          - `version` 2, required
          - `provider` 'slack', required
          - `event` 'message' | 'reaction' | 'channel_created', required
          - `conditions` object
            - `workspaces` string[] — Slack team IDs (e.g. T0123456789)
            - `channels` string[] — Slack channel IDs (e.g. C0123456789), not #channel-names
            - `users` string[] — Slack user IDs (e.g. U0123456789) of message authors
            - `actors` string[] — Slack user IDs (e.g. U0123456789)
            - `reactions` string[] — Emoji names without colons
            - `messagePlacements` string[]
            - `messageTypes` string[]
            - `includeBots` boolean
            - `groupingWindowSeconds` integer, required
            - `contains` string[]
            - `excludes` string[]
            - `regex` string
          - `runWhen` string
      - object
        - `id` string
        - `type` 'sentry', required
        - `config` union, required
          - object
            - `provider` 'sentry', required
            - `events` union[], required
              - …
            - `filters` object
              - …
          - object
            - `version` 2, required
            - `provider` 'sentry', required
            - `event` 'issue_lifecycle' | 'any_issue' | 'event_alert', required
            - `conditions` object
              - …
            - `runWhen` string
      - object
        - `id` string
        - `type` 'linear', required
        - `config` object, required
          - `version` 2, required
          - `provider` 'linear', required
          - `event` 'issue_created' | 'status_changed' | 'end_cycle', required
          - `conditions` object
            - `workspaces` string[]
            - `teams` string[]
            - `projects` string[]
            - `statuses` string[]
            - `fromStatuses` string[]
            - `statusTransitions` string[]
            - `priorities` string[]
            - `actors` string[]
            - `labels` string[]
            - `assignees` string[]
            - `cycles` string[]
          - `runWhen` string
      - object
        - `id` string
        - `type` 'incoming_webhook', required
        - `config` union
          - object
          - object
            - `version` 2, required
            - `provider` 'incoming_webhook', required
            - `event` 'request', required
            - `conditions` object
              - …
            - `runWhen` string
        - `webhookToken` string, nullable
        - `webhookSecret` string, nullable
      - object
        - `id` string
        - `type` 'on_demand', required
        - `config` object
  - `mcpOverrides` object, nullable
    - `enabledServerKeys` string[]
    - `disabledServerKeys` string[]

## Response `200`

Success

- Automation
  - `id` string, required
  - `projectId` string, required
  - `createdByUserId` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `enabled` boolean, required
  - `triggerType` 'schedule' | 'webhook' | 'incoming_webhook' | 'on_demand' | 'integration', required
  - `webhookConfig` object, nullable, required
    - `source` 'github', required
    - `events` object[], required
      - `event` string, required
      - `actions` string[]
    - `filters` object
      - `branches` string[]
  - `integrationTriggerConfig` unknown, required
  - `cron` string, nullable, required
  - `timezone` string, required
  - `prompt` string, required
  - `model` string, nullable, required
  - `buildModel` string, nullable, required
  - `baseBranch` string, nullable, required
  - `repoBranches` object, nullable, required
  - `agentType` 'build' | 'captain', required
  - `visibilityScope` 'project' | 'creator', required
  - `webhookUrl` string, nullable, required — Relative bearer-capability URL for incoming-webhook automations. Treat this value as sensitive because anyone who possesses it can trigger the automation.
  - `hasWebhookSecret` boolean, required
  - `runCount` integer, required
  - `lastTriggeredAt` string, nullable, required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `mcpOverrides` object, nullable, required
    - `enabledServerKeys` string[]
    - `disabledServerKeys` string[]
  - `triggers` union[], required
    - union
      - object
        - `id` string
        - `type` 'schedule', required
        - `config` object, required
          - `version` 2
          - `cron` string, required
          - `timezone` string, required
        - `scheduleId` string, nullable
      - object
        - `id` string
        - `type` 'github', required
        - `config` union, required
          - object
            - `source` 'github', required
            - `events` object[], required
              - …
            - `filters` object
              - …
          - object
            - `version` 2, required
            - `provider` 'github', required
            - `event` 'draft_opened' | 'pull_request_opened' | 'pull_request_pushed' | 'pull_request_merged' | 'comment' | 'branch_push' | 'label_change' | 'checks' | 'issue_comment' | 'pull_request_review_comment' | 'pull_request_review_submitted' | 'pull_request_review_thread' | 'workflow_run', required
            - `conditions` object
              - …
            - `runWhen` string
      - object
        - `id` string
        - `type` 'slack', required
        - `config` object, required
          - `version` 2, required
          - `provider` 'slack', required
          - `event` 'message' | 'reaction' | 'channel_created', required
          - `conditions` object
            - `workspaces` string[] — Slack team IDs (e.g. T0123456789)
            - `channels` string[] — Slack channel IDs (e.g. C0123456789), not #channel-names
            - `users` string[] — Slack user IDs (e.g. U0123456789) of message authors
            - `actors` string[] — Slack user IDs (e.g. U0123456789)
            - `reactions` string[] — Emoji names without colons
            - `messagePlacements` string[]
            - `messageTypes` string[]
            - `includeBots` boolean
            - `groupingWindowSeconds` integer, required
            - `contains` string[]
            - `excludes` string[]
            - `regex` string
          - `runWhen` string
      - object
        - `id` string
        - `type` 'sentry', required
        - `config` union, required
          - object
            - `provider` 'sentry', required
            - `events` union[], required
              - …
            - `filters` object
              - …
          - object
            - `version` 2, required
            - `provider` 'sentry', required
            - `event` 'issue_lifecycle' | 'any_issue' | 'event_alert', required
            - `conditions` object
              - …
            - `runWhen` string
      - object
        - `id` string
        - `type` 'linear', required
        - `config` object, required
          - `version` 2, required
          - `provider` 'linear', required
          - `event` 'issue_created' | 'status_changed' | 'end_cycle', required
          - `conditions` object
            - `workspaces` string[]
            - `teams` string[]
            - `projects` string[]
            - `statuses` string[]
            - `fromStatuses` string[]
            - `statusTransitions` string[]
            - `priorities` string[]
            - `actors` string[]
            - `labels` string[]
            - `assignees` string[]
            - `cycles` string[]
          - `runWhen` string
      - object
        - `id` string
        - `type` 'incoming_webhook', required
        - `config` union
          - object
          - object
            - `version` 2, required
            - `provider` 'incoming_webhook', required
            - `event` 'request', required
            - `conditions` object
              - …
            - `runWhen` string
        - `webhookToken` string, nullable
        - `webhookSecret` string, nullable
      - object
        - `id` string
        - `type` 'on_demand', required
        - `config` object

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Validation error
- `500` — Internal error

## Changes

- **2026-07-26** `c9ea28cb32b6` — 1 breaking, 1 warning
  - removed the required property `configRevision` from the response with the `200` status
  - removed the request property `expectedConfigRevision`

[Change history](https://skmtc.dev/capy/apis/capy-api/changes/v1/projects/:projectId/automations/:automationId/patch.md)

---

[API](https://skmtc.dev/capy/apis/capy-api.md) · [All operations](https://skmtc.dev/capy/apis/capy-api/llms.txt) · [OpenAPI document](https://skmtc.dev/capy/apis/capy-api/revisions/c9ea28cb32b6?raw)
