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

# Get an automation

`GET /api/v0/automations/{automationId}`

## Request

- Base URL: `https://api.factory.ai`
- URL: `https://api.factory.ai/api/v0/automations/{automationId}`
- Auth: HTTP bearer

Returns an automation the caller may read: its owner, any member when it is shared with the organization, any member of the workstream that created it when it runs as a service account, and the service account it runs as. canWrite says whether the caller may also change it. Any other automation answers 404, as an unknown id does.

## Path parameters

- `automationId` string, required: Automation ID

## Query parameters

- `includeWebhookTriggers` boolean: Set to "true" to allow a webhook-triggered automation in the response.
- `includeAutomationTriggers` boolean: Set to "true" to allow a chained (automation-triggered) automation in the response.

## Headers

- `X-Factory-Org-Id` string

## Response `200`

Response for status 200

- GetAutomation200ResponseBody
  - `id` string, required
  - `ownerId` string, required
  - `name` string, required
  - `description` string, nullable
  - `prompt` string, required
  - `triggerType` 'schedule' | 'ci' | 'slack' | 'webhook' | 'automation'
  - `schedule` string, required
  - `triggerConfig` object
    - `repo` string
    - `events` string[]
    - `workflowParams` string
    - `workflowFilePath` string
    - `workflowFileSha` string
    - `automaticReview` boolean
    - `automaticSecurityReview` boolean
    - `securityModel` string
    - `channels` object[]
      - `channelId` string, required
      - `channelName` string, required
      - `isPrivate` boolean
    - `channelPatterns` string[]
    - `autoRun` boolean
    - `customPrompt` string
    - `sessionPrivacy` 'private' | 'team'
    - `model` string
    - `keywords` string[]
    - `messageSource` 'anyone' | 'humans' | 'bots'
    - `excludedAuthors` string[]
    - `excludedKeywords` string[]
    - `serviceAccountId` string
    - `payloadRegex` string
    - `maxRunsPerHour` number
    - `webhookId` string
  - `triggerChannelIds` string[]
  - `triggerChannelPatterns` string[]
  - `model` string, nullable
  - `reasoningEffort` string, nullable
  - `workingDirectory` string, nullable
  - `templateId` 'code-review' | 'qa' | 'wiki' | 'security-audit' | 'code-walkthrough' | 'triage' | 'incident-response' | 'ticket-to-pr' | 'pr-reviewer' | 'daily-status-digest' | 'code-health' | 'meeting-notes-sync' | 'error-triage' | 'slack-digest' | 'slack-bug-fixer' | 'channel-qa' | 'slack-ticket-filer' | 'alert-responder' | 'ci-failure-triage' | 'new-issue-investigator' | 'review-comment-fixer' | 'test-coverage' | 'docs-refresh': More values may be added; treat a value you do not know as unknown.
  - `tags` string[], required
  - `status` 'active' | 'paused' | 'degraded', required: More values may be added; treat a value you do not know as unknown.
  - `pausedReason` 'computer_deleted' | 'computer_over_capacity' | 'consecutive_failures' | 'invalid_payload_regex' | 'managed_computers_disabled' | 'owner_inactive' | 'org_deactivated' | 'computer_disk_full' | 'missed_runs' | 'workstream_inactive' | 'target_session_unavailable'
  - `setupState` 'creating' | 'needs_input' | 'complete' | 'failed'
  - `setupSessionId` string
  - `computerId` string
  - `executionTemplateId` string, nullable
  - `executionTemplateName` string
  - `computerName` string
  - `runConfig` 'org_default'
  - `createdAt` number, required: Unix timestamp, in milliseconds, when the automation was created.
  - `updatedAt` number, required: Unix timestamp, in milliseconds, when the automation last changed.
  - `privacyLevel` 'private' | 'organization'
  - `createdBy` object
    - `name` string, required
    - `email` string
    - `avatarUrl` string
  - `creationSource` 'web' | 'desktop' | 'cli' | 'cli-menu' | 'api' | 'sync' | 'fork': More values may be added; treat a value you do not know as unknown.
  - `canWrite` boolean: Whether the caller may edit, pause or resume, delete, or run the automation: always for its owner; when it runs as a service account, for the creators and editors of the workstream that created it, and, when it is shared with the organization, for every other human member except that workstream's viewers.
  - `forkedFrom` string, nullable
  - `workstreamId` string, nullable
  - `creationSessionId` string
  - `creationWorkstreamId` string
  - `nextAutomationIds` string[]
  - `passUpstreamContext` boolean
  - `machineId` string
  - `hostId` string
  - `targetSessionId` string
  - `lastRunAt` string
  - `lastRunSessionId` string
  - `lastRunStatus` string
  - `runCount` number
  - `ciSetupStatus` 'pending_setup' | 'active' | 'inactive' | 'pending_removal'
  - `ciPrUrl` string
  - `ciPrNumber` number
  - `ciWorkflowFilePath` string

## Other responses

- `400`: Response for status 400
- `401`: Response for status 401
- `402`: Response for status 402
- `403`: Response for status 403
- `404`: Response for status 404
- `451`: Response for status 451
- `500`: Response for status 500
- `503`: Response for status 503

## Changes

- **2026-11-12** `b6a46c415079`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/factory/apis/factory-public-api/changes/api/v0/automations/:automationId/get.md)

---

[API](https://skmtc.dev/factory/apis/factory-public-api.md) - [All operations](https://skmtc.dev/factory/apis/factory-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/factory/apis/factory-public-api/revisions/2e37e1b079d2?raw)
