---
title: "Retry an automation run"
method: POST
path: "/automations/{automation_id}/runs/{run_id}/retry"
tags: ["Automations"]
---

# Retry an automation run

`POST /automations/{automation_id}/runs/{run_id}/retry`

## Request

- Base URL: `https://api.motion.so/api/motion`
- URL: `https://api.motion.so/api/motion/automations/{automation_id}/runs/{run_id}/retry`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://mcp.motion.so/oauth/authorize`
    - Token URL: `https://mcp.motion.so/oauth/token` scopes: `motion:automations:write`
- TypeScript: <https://skmtc.dev/motion/apis/mosaic-motion/docs/automations/:automation_id/runs/:run_id/retry/post.ts> (a function with typed inputs; its response is checked against the schema)

Only failed or blocked runs. Reuses the original source event. Repeating the same failed run ID returns its existing replacement attempt. Send no body. Requires motion:automations:write for OAuth tokens. API keys use the owner account permissions. Automation access must be enabled for the account and environment. See /guides/automations. Automations execute only with GVA; Claude supports reads, pause, and delete only.

## Path parameters

- `automation_id` string, required
- `run_id` string, required

## Response `202`

Success

- AutomationInvocation
  - `automation` Automation, required: Owner-scoped read view. Read responses can include additional saved context and history. Use the dedicated run-history endpoint for pagination. Read fields are not accepted as write inputs.
    - `id` string, required
    - `name` string, required
    - `enabled` boolean, required
    - `prompt` string, required
    - `trigger` object, required
      - `type` string, required
      - `platform` string, required
      - `source` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `nextRunAt` string, date-time, nullable, required
    - `runs` AutomationRun[], required
      - `id` string, required
      - `status` 'queued' | 'running' | 'completed' | 'skipped' | 'failed' | 'blocked', required
      - `motionAgentChatId` string, nullable, required: Null until a Motion chat is created. Open https://motion.so/agent?chat={motionAgentChatId} to inspect the run.
      - `queuedAt` string, date-time, required
      - `startedAt` string, date-time, nullable
      - `completedAt` string, date-time, nullable
      - `attempt` integer
      - `resultSummary` string, nullable
      - `error` string, nullable
    - `memory` AutomationMemory
      - `rememberProcessedItems` boolean, required
      - `includePreviousRuns` integer, required
      - `compactAfterRuns` integer, required
    - `connectorPolicy` AutomationConnectorPolicy: Uses existing connected accounts and permissions; this request cannot connect an account or grant access.
      - `mode` 'none' | 'fixed' | 'conditional', required
      - `onUnavailable` 'block' | 'run_without', required
      - `grants` AutomationConnectorGrant[], required
        - `connectorId` 'github' | 'notion' | 'figma' | 'google-drive' | 'dropbox' | 'getty', required
        - `access` 'read', required
        - `resources` string[], required
        - `condition` AutomationConnectorCondition
          - `eventTypes` string[]
          - `payloadField` string
          - `equals` string
    - `maxConcurrentRuns` integer
    - `maxRunsPerHour` integer
  - `run` AutomationRun, required: Read view can also include event context, logs, artifacts, and connector snapshots. An accepted or completed agent run is not proof of a downloadable video; inspect saved exports in its Motion chat.
    - `id` string, required
    - `status` 'queued' | 'running' | 'completed' | 'skipped' | 'failed' | 'blocked', required
    - `motionAgentChatId` string, nullable, required: Null until a Motion chat is created. Open https://motion.so/agent?chat={motionAgentChatId} to inspect the run.
    - `queuedAt` string, date-time, required
    - `startedAt` string, date-time, nullable
    - `completedAt` string, date-time, nullable
    - `attempt` integer
    - `resultSummary` string, nullable
    - `error` string, nullable
  - `session` AutomationSession, required
    - `id` string, required
    - `runId` string, required
    - `motionAgentChatId` string, nullable, required
    - `status` string, required
  - `deduplicated` boolean, required

## Other responses

- `400`: Invalid input or cursor; read the error message.
- `401`: Missing, invalid, or wrong-audience credential.
- `403`: Missing OAuth scope, account automation access, or engine access.
- `404`: Unavailable environment, or automation/run not owned by this account.
- `409`: automation_paused: resume before retrying.
- `503`: Temporarily unavailable; retry later.

## Changes

- **2026-10-20** `075b364b747d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/motion/apis/mosaic-motion/changes/automations/:automation_id/runs/:run_id/retry/post.md)

---

[API](https://skmtc.dev/motion/apis/mosaic-motion.md) - [All operations](https://skmtc.dev/motion/apis/mosaic-motion/llms.txt) - [OpenAPI document](https://skmtc.dev/motion/apis/mosaic-motion/revisions/075b364b747d?raw)
