---
title: "Disable automation"
method: POST
path: "/api/v1/automations/{automationId}/disable"
tags: ["automations"]
---

# Disable automation

`POST /api/v1/automations/{automationId}/disable`

## Path parameters

- `automationId` string, required

## Response `200`

Automation

- AutomationEncoded
  - `id` string, required
  - `projectId` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `prompt` string, required
  - `triggers` union[], required
    - union
      - object
        - `type` 'schedule', required
        - `cron` string, required — Five-field cron expression, e.g. `0 9 * * *` for daily at 09:00.
        - `timezone` string, required — IANA timezone for the schedule, e.g. `America/New_York`.
      - object
        - `type` '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 — The GitHub event that starts a run.
        - `conditions` object — Filters that narrow which GitHub events start a run. A condition matches when the event matches any of its listed values.
          - `repositories` string[] — Full repository names to match, e.g. owner/repo.
          - `branches` string[] — Base branch names to match.
          - `head_branches` string[] — Head branch names to match.
          - `authors` string[] — GitHub login names of the author to match.
          - `labels` string[] — Match when any of these labels is present.
          - `states` string[] — Pull request states to match.
          - `actions` string[] — Raw event action names to match, e.g. opened, closed.
          - `conclusions` string[] — Check or workflow conclusions to match, e.g. success, failure.
          - `workflows` string[] — Workflow names to match.
          - `check_names` string[] — Check run names to match.
          - `review_states` string[] — Review states to match, e.g. approved, changes_requested.
          - `actors` string[] — GitHub login names of the actor that fired the event.
        - `run_when` string — Natural-language gate checked against each event before a run starts; non-matching events are skipped, so keep it to one sentence. To remove the gate, omit this field from the trigger; null is rejected.
      - object
        - `type` 'slack', required
        - `event` 'message' | 'reaction' | 'channel_created', required — The Slack event that starts a run.
        - `conditions` object — Filters that narrow which Slack events start a run. A condition matches when the event matches any of its listed values.
          - `workspaces` string[] — Slack team ids (T...) to match. Not workspace names.
          - `channels` string[] — Slack channel ids (C...) to match. Not #channel-names.
          - `users` string[] — Slack user ids (U...) of the message author to match.
          - `actors` string[] — Slack user ids (U...) of the actor that fired the event.
          - `reactions` string[] — Emoji names without colons, e.g. eyes.
          - `message_placements` string[] — Match top-level messages, replies, or both.
          - `message_types` string[] — Match human messages, bot messages, or both.
          - `include_bots` boolean — Include messages from bots. Defaults to false.
          - `grouping_window_seconds` integer — Seconds to group a burst of messages into one run. Defaults to 0 - no grouping, one run per matched message immediately.
          - `contains` string[] — Run only when the message text contains one of these substrings.
          - `excludes` string[] — Skip when the message text contains one of these substrings.
          - `regex` string — Run only when the message text matches this regular expression.
        - `run_when` string — Natural-language gate checked against each event before a run starts; non-matching events are skipped, so keep it to one sentence. To remove the gate, omit this field from the trigger; null is rejected.
        - `ack_reaction` string — Emoji name to react with on a top-level triggering message when this trigger matches, e.g. `eyes`. Replies and an absent value post no reaction.
      - object
        - `type` 'sentry', required
        - `event` 'issue_lifecycle' | 'any_issue' | 'event_alert', required — The Sentry event that starts a run.
        - `conditions` object — Filters that narrow which Sentry events start a run. A condition matches when the event matches any of its listed values.
          - `projects` string[] — Sentry project slugs or ids to match.
          - `levels` string[] — Issue levels to match, e.g. error, warning.
          - `actions` string[] — Raw event action names to match.
        - `run_when` string — Natural-language gate checked against each event before a run starts; non-matching events are skipped, so keep it to one sentence. To remove the gate, omit this field from the trigger; null is rejected.
      - object
        - `type` 'linear', required
        - `event` 'issue_created' | 'status_changed' | 'end_cycle', required — The Linear event that starts a run.
        - `conditions` object — Filters that narrow which Linear events start a run. A condition matches when the event matches any of its listed values.
          - `workspaces` string[] — Linear workspace ids to match.
          - `teams` string[] — Linear team ids or keys to match.
          - `projects` string[] — Linear project ids to match.
          - `statuses` string[] — Issue statuses to match after the change.
          - `from_statuses` string[] — Issue statuses to match before the change.
          - `status_transitions` string[] — Status transitions to match, e.g. Todo->In Progress.
          - `priorities` string[] — Issue priorities to match.
          - `actors` string[] — Linear user ids of the actor that fired the event.
          - `labels` string[] — Match when any of these labels is present.
          - `assignees` string[] — Linear user ids of the assignee to match.
          - `cycles` string[] — Linear cycle ids to match.
        - `run_when` string — Natural-language gate checked against each event before a run starts; non-matching events are skipped, so keep it to one sentence. To remove the gate, omit this field from the trigger; null is rejected.
      - object
        - `type` 'incoming_webhook', required
        - `conditions` object — Filters that narrow which incoming requests start a run. A condition matches when the request matches any of its listed values.
          - `contains` string[] — Run only when the request body contains one of these substrings.
          - `excludes` string[] — Skip when the request body contains one of these substrings.
          - `regex` string — Run only when the request body matches this regular expression.
        - `run_when` string — Natural-language gate checked against each event before a run starts; non-matching events are skipped, so keep it to one sentence. To remove the gate, omit this field from the trigger; null is rejected.
      - object
        - `type` 'on_demand', required
  - `model` ModelSelection, required
    - `modelId` string, required
    - `reasoningMode` 'none' | 'instant' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'
    - `modes` object
      - `fast` boolean
      - `pro` boolean
  - `repos` object[], required
    - `repo` string, required
    - `branch` string, required
  - `threadMode` 'new' | 'single', required
  - `mcpOverrides` object, nullable, required
    - `enabled_server_keys` string[] — External MCP server keys to enable for this automation's runs, beyond the project defaults. A key may not appear in both lists.
    - `disabled_server_keys` string[] — External MCP server keys to disable for this automation's runs.
  - `maxRunsPerDay` integer, nullable, required
  - `machineSize` 'small' | 'medium' | 'large' | 'ultra' | 'hyper' | 'bigguy', nullable, required
  - `enabled` boolean, required
  - `deleted` boolean, required
  - `disabledReason` 'run_as_unavailable', nullable, required
  - `runAsKind` 'human' | 'service', required
  - `runAsId` string, required
  - `runCount` integer, required
  - `lastTriggeredAt` string, nullable, required
  - `createdAt` string, required
  - `updatedAt` string, required

## Other responses

- `401` — capy/Unauthorized
- `403` — capy/Forbidden
- `404` — capy/AutomationNotFound

## Changes

- **2026-08-28** `e9babb6783f3` — 1 warning
  - added the new `instant` enum value to the `model/anyOf[#/components/schemas/ModelSelection]/reasoningMode` response property for the response status `200`
- **2026-08-27** `6cd1e287d2c5` — 2 info
  - added `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6` to the `triggers/items/` response property `anyOf` list for the response status `200`
  - removed `subschema #1, subschema #2, subschema #3, subschema #4, subschema #5, subschema #6` from the `triggers/items/` response property `anyOf` list for the response status `200`
- **2026-08-22** `3fda89533361` — 3 info
  - added the optional property `triggers/items/anyOf[subschema #3]/ack_reaction` to the response with the `200` status
  - added `subschema #1, subschema #2` to the `triggers/items/anyOf[subschema #3]/conditions/grouping_window_seconds` response property `allOf` list for the response status `200`
  - removed `subschema #1, subschema #2` from the `triggers/items/anyOf[subschema #3]/conditions/grouping_window_seconds` response property `allOf` list for the response status `200`
- …earlier changes not shown

[Full history](https://skmtc.dev/capy/apis/capy-api/changes/api/v1/automations/:automationId/disable/post.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-service-production.skmtc.workers.dev/v1/apis/capy/capy-api/revisions/e9babb6783f3/schema)
