---
title: "Get an automation"
method: GET
path: "/automations/{automationId}"
tags: ["Automations"]
---

# Get an automation

`GET /automations/{automationId}`

## Request

- Base URL: `https://api.sazabi.com/v1`
- URL: `https://api.sazabi.com/v1/automations/{automationId}`
- Auth: none declared

Get a single automation by ID.

## Path parameters

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

## Query parameters

- `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. Null when unset.
    - `kind` 'script', required: Automation kind: a script run on a schedule or by its webhook.
    - `trigger` 'schedule' | 'webhook', required: What starts the automation's runs: its cron schedule or a delivery to its webhook.
    - `webhook` object, nullable, required: The hook a webhook automation receives deliveries at. Null for other automations.
      - `hookId` string, required: Public id of the hook, the last segment of its URL.
      - `url` string, nullable, required: URL to POST deliveries to. Null only when the deployment has no public webhook URL configured.
      - `lastDeliveryAt` string, date-time, nullable, required: When the hook last received a verified delivery.
      - `secretRotatedAt` string, date-time, nullable, required: When the signing secret was last rotated. Null if never.
    - `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.
    - `scriptName` string, nullable, required: Name of the project_scripts row this automation runs (see scriptId). Null when scriptId is null.
    - `enabled` boolean, required
    - `cronExpression` string, nullable, required: Cron schedule for scheduled automations. Null for webhook 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 script automations backed by project_scripts.
    - `canToggle` boolean, required: Whether the caller may enable or disable this automation.

## Changes

- **2026-10-24** `965b6230cf45`: 2 breaking, 2 info
  - removed the required property `automation/signalDefinitionId` from the response with the `200` status
  - removed the required property `automation/signalType` from the response with the `200` status
  - removed the `log_match` enum value from the `automation/kind` response property for the response status `200`
  - removed the `signal` enum value from the `automation/trigger` response property for the response status `200`
- **2026-10-20** `b32270ee84f4`: 2 info
  - added the required property `automation/trigger` to the response with the `200` status
  - added the required property `automation/webhook` to the response with the `200` status
- **2026-10-05** `b7c27d694271`: 2 info
  - 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

[Operation history](https://skmtc.dev/sazabi/apis/sazabi-public-api/changes/automations/:automationId/get.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/965b6230cf45?raw)
