> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automations

> Developer automations, their versions and runs, and workspaces for editing them.

## Queries

* [`automation`](/docs/api-reference/v3/reference/automations/queries/automation) **(Beta)** — Fetch an automation by id. Read its `script`, or open a workspace with `createWorkspace` to change it.
* [`automationCatalog`](/docs/api-reference/v3/reference/automations/queries/automation-catalog) **(Beta)** — Read automation docs by path: one entry per path, in order, null for an unknown path. "" is the index; start with "guide/". Then `createWorkspace` to build one.
* [`automationRun`](/docs/api-reference/v3/reference/automations/queries/automation-run) **(Beta)** — Fetch a run by id, with its steps. Runs are deleted 30 days after they finish.
* [`automations`](/docs/api-reference/v3/reference/automations/queries/automations) **(Beta)** — List automations, most recently changed first.
* [`testAutomation`](/docs/api-reference/v3/reference/automations/queries/test-automation) **(Beta)** — Run the workspace's current, uncommitted automation once against a scenario and return what happened. Nothing is stored and nothing real happens: no messages are sent and no records change. Null if the workspace doesn't exist. INVALID while the document has an ERROR diagnostic or can't run; INVALID\_SCENARIO, with the failing fields, for a scenario that doesn't match `schemas/scenario` in `automationCatalog`.
* [`workspace`](/docs/api-reference/v3/reference/automations/queries/workspace) **(Beta)** — Read a workspace. Null if it doesn't exist or expired.

## Mutations

* [`commitWorkspace`](/docs/api-reference/v3/reference/automations/mutations/commit-workspace) **(Beta)** — Save a workspace to its resource. STALE if the resource changed since the workspace started; INVALID while an ERROR diagnostic remains. The workspace stays open. For an automation, publish with `publishAutomation` next. Null if the workspace is gone.
* [`createWorkspace`](/docs/api-reference/v3/reference/automations/mutations/create-workspace) **(Beta)** — Open a working copy of a resource. Omit `resourceId` to start a new resource; committing creates it. Null if the resource doesn't exist. Read the resource type's guide in `automationCatalog` first.
* [`deleteAutomation`](/docs/api-reference/v3/reference/automations/mutations/delete-automation) **(Beta)** — Delete an automation that has never been published. A published one keeps its versions and runs: turn it off with `updateAutomation` instead. False if the automation doesn't exist.
* [`deleteWorkspace`](/docs/api-reference/v3/reference/automations/mutations/delete-workspace) **(Beta)** — Discard a workspace. The resource is unchanged. False if the workspace doesn't exist.
* [`publishAutomation`](/docs/api-reference/v3/reference/automations/mutations/publish-automation) **(Beta)** — Publish the automation's draft as its next version. Call without `acknowledgedRisks` first to see the `risks`; nothing is published until each one is acknowledged. The first publish turns the automation on. Null if the automation doesn't exist.
* [`updateAutomation`](/docs/api-reference/v3/reference/automations/mutations/update-automation) **(Beta)** — Change an automation's settings. Its name and content are edited in a workspace. Null if the automation doesn't exist.
* [`updateWorkspace`](/docs/api-reference/v3/reference/automations/mutations/update-workspace) **(Beta)** — Apply text edits to a workspace, in order. Edits fail only mechanically (stale revision, text not found or ambiguous, more than 100 edits or 1 MB); text that doesn't parse is reported in `diagnostics`. Changes only the working copy. Null if the workspace is gone.

## Objects

* [`Automation`](/docs/api-reference/v3/reference/automations/automation) **(Beta)** — An automation built in Developer › Automations: a trigger and the steps it runs. For email and SMS flows, use MarketingAutomation. To create or edit one, use a workspace (`createWorkspace`); read `guide/` in `automationCatalog` first.
* [`AutomationCatalogEntry`](/docs/api-reference/v3/reference/automations/automation-catalog-entry) **(Beta)** — A page of the automation catalog.
* [`AutomationCatalogListing`](/docs/api-reference/v3/reference/automations/automation-catalog-listing) **(Beta)** — A catalog page, as listed under its parent.
* [`AutomationPublishImpact`](/docs/api-reference/v3/reference/automations/automation-publish-impact) **(Beta)** — What publishing does to runs in progress. Runs on the LATEST strategy move to the new version; PINNED runs stay.
* [`AutomationRisk`](/docs/api-reference/v3/reference/automations/automation-risk) **(Beta)** — Something publishing would do that you must accept first: pass its `code` in `acknowledgedRisks`.
* [`AutomationRun`](/docs/api-reference/v3/reference/automations/automation-run) **(Beta)** — One execution of an automation. Runs are deleted 30 days after they finish.
* [`AutomationRunFailure`](/docs/api-reference/v3/reference/automations/automation-run-failure) **(Beta)** — Why a run failed.
* [`AutomationStepRecord`](/docs/api-reference/v3/reference/automations/automation-step-record) **(Beta)** — One step a run executed, in order.
* [`AutomationTestRun`](/docs/api-reference/v3/reference/automations/automation-test-run) **(Beta)** — What one test run of a workspace did. Nothing it did was stored or performed.
* [`AutomationVersion`](/docs/api-reference/v3/reference/automations/automation-version) **(Beta)** — A published version of an automation. Immutable.
* [`AutomationVersionRunCount`](/docs/api-reference/v3/reference/automations/automation-version-run-count) **(Beta)** — Runs in progress on one version.
* [`Diagnostic`](/docs/api-reference/v3/reference/automations/diagnostic) **(Beta)** — A problem in a document. Its message names a `diagnostics/<code>` page in `automationCatalog` that explains it.
* [`DiagnosticFix`](/docs/api-reference/v3/reference/automations/diagnostic-fix) **(Beta)** — A suggested fix: edits to apply with `updateWorkspace`.
* [`TextEdit`](/docs/api-reference/v3/reference/automations/text-edit) **(Beta)** — Replace `find`, which occurs exactly once in the document, with `replace`. Pass it to `updateWorkspace` as is.
* [`Workspace`](/docs/api-reference/v3/reference/automations/workspace) **(Beta)** — A working copy of one resource, as text. Edit it with `updateWorkspace`, check `diagnostics`, then save it with `commitWorkspace`. Expires 7 days after its last change.

## Input objects

* [`TextEditInput`](/docs/api-reference/v3/reference/automations/text-edit-input) **(Beta)** — Replace `find` with `replace`. `find` must occur exactly once unless `all` is set. Omit `find` to replace the whole document.
* [`UpdateAutomationInput`](/docs/api-reference/v3/reference/automations/update-automation-input) **(Beta)** — Settings to change; omitted fields are left as they are.

## Enums

* [`AutomationPublishStatus`](/docs/api-reference/v3/reference/automations/automation-publish-status) **(Beta)** — What `publishAutomation` did.
* [`AutomationRunSortKey`](/docs/api-reference/v3/reference/automations/automation-run-sort-key) **(Beta)** — A field this list can be ordered by; pass to the list's `orderBy` argument and pair with `reverse` to flip direction.
* [`AutomationRunStatus`](/docs/api-reference/v3/reference/automations/automation-run-status) **(Beta)** — Where a run is in its lifecycle.
* [`AutomationSortKey`](/docs/api-reference/v3/reference/automations/automation-sort-key) **(Beta)** — A field this list can be ordered by; pass to the list's `orderBy` argument and pair with `reverse` to flip direction.
* [`AutomationVersionSortKey`](/docs/api-reference/v3/reference/automations/automation-version-sort-key) **(Beta)** — A field this list can be ordered by; pass to the list's `orderBy` argument and pair with `reverse` to flip direction.
* [`AutomationVersionStrategy`](/docs/api-reference/v3/reference/automations/automation-version-strategy) **(Beta)** — Which version a run already in flight continues on.
* [`DiagnosticSeverity`](/docs/api-reference/v3/reference/automations/diagnostic-severity) **(Beta)** — How much a diagnostic matters.
* [`WorkspaceCommitStatus`](/docs/api-reference/v3/reference/automations/workspace-commit-status) **(Beta)** — What a commit did.
* [`WorkspaceResourceType`](/docs/api-reference/v3/reference/automations/workspace-resource-type) **(Beta)** — A kind of resource a workspace can edit.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.