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

# Disable an automation

`POST /automations/{automationId}/disable`

Disable an automation so it stops running on its schedule.

## Path parameters

- `automationId` string, uuid, required — Automation ID.

## Request body

- object
  - `expectedRevision` integer, required — Configuration revision returned by the last read. Stale writes return a conflict; reload before retrying.
  - `projectId` string, uuid — Project that owns the automation. Auto-filled from CLI and SDK context when omitted.

## Response `200`

OK

- object
  - `automation` object, required
    - `id` string, uuid, required
    - `configurationRevision` integer, required
    - `templateProvenance` object, nullable, required
      - `templateId` string, required
      - `templateVersion` integer, required
      - `resolvedInputs` object, required
    - `projectId` string, uuid, required
    - `name` string, required
    - `description` string, nullable, required — Human-readable description. For log-match automations this is the investigation prompt the agent runs with. Null when unset.
    - `kind` 'script' | 'log_match', required — Automation kind: a scheduled script or a log-match investigation.
    - `scriptId` string, uuid, nullable, required — ID of the project_scripts row this automation runs, for DB-backed script automations. Null for legacy script_path automations and for log-match automations.
    - `scriptName` string, nullable, required — Name of the project_scripts row this automation runs (see scriptId). Null when scriptId is null.
    - `signalDefinitionId` string, uuid, nullable, required — Signal definition bound to this automation. Null for script automations.
    - `signalType` 'expression_matched', nullable, required — Signal trigger type for log-match automations. Null for script automations.
    - `enabled` boolean, required
    - `cronExpression` string, nullable, required — Cron schedule for scheduled automations. Null for signal automations.
    - `timezone` string, required
    - `timeoutSeconds` integer, nullable, required
    - `health` 'healthy' | 'failing' | 'never_run', required — Health derived from the most recent run.
    - `lastRun` object, nullable, required
      - `id` string, uuid, required
      - `automationRunKey` string, required
      - `status` 'running' | 'succeeded' | 'failed' | 'timed_out' | 'cancelled', required
      - `startedAt` string, date-time, required
      - `completedAt` string, date-time, nullable, required
      - `durationMs` integer, nullable, required
      - `exitCode` integer, nullable, required
    - `successRate` number, nullable, required — Fraction of terminal runs that succeeded over the last 7 days.
    - `runCount` integer, required — Total runs over the last 7 days.
    - `failedRunCount` integer, required — Failed or timed-out runs over the last 7 days.
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `recordedHistoryStartsAt` string, date-time, required — Earliest timestamp for which run history is recorded.
    - `scriptIdentifier` string, nullable, required — Relative project script path executed by the automation. Null for signal automations.
    - `canToggle` boolean, required — Whether the caller may enable or disable this automation.

## Changes

- **2026-10-05** `b7c27d694271` — 2 breaking, 2 info
  - added the new required request property `expectedRevision`
  - request body became required
  - added the required property `automation/configurationRevision` to the response with the `200` status
  - added the required property `automation/templateProvenance` to the response with the `200` status
- **2026-09-25** `faca1a7e107c` — 1 breaking
  - removed the required property `automation/source` from the response with the `200` status
- **2026-09-09** `5d3fb365a36b` — 1 info
  - added the required property `automation/description` to the response with the `200` status

[Change history](https://skmtc.dev/sazabi/apis/sazabi-public-api/changes/automations/:automationId/disable/post.md)

---

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