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

# Get an automation run

>  Requires motion:automations:read 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.



## OpenAPI

````yaml /openapi.json get /automations/{automation_id}/runs/{run_id}
openapi: 3.1.0
info:
  title: Motion
  version: 1.0.0
  description: >-
    Create and edit videos with Motion through a prompt, optional attachments,
    and follow-up edits. New video jobs default to GVA standard. Motion Legacy
    requires eligible existing-account or administrator access. Use GET /engines
    for available choices. Manage owner-scoped automations, schedules, run
    history, and analytics. Automation execution is GVA-only and defaults to
    standard effort.
servers:
  - url: https://api.motion.so/api/motion
security:
  - MotionApiKey: []
paths:
  /automations/{automation_id}/runs/{run_id}:
    get:
      tags:
        - Automations
      summary: Get an automation run
      description: ' Requires motion:automations:read 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.'
      operationId: get_automation_run
      parameters:
        - name: automation_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9_-]+$
            minLength: 1
            maxLength: 200
          description: ID returned by list or create.
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9_-]+$
            minLength: 1
            maxLength: 200
          description: Run ID from this automation.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationRunDetail'
        '400':
          description: Invalid input or cursor; read the error message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '401':
          description: Missing, invalid, or wrong-audience credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '403':
          description: Missing OAuth scope, account automation access, or engine access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '404':
          description: >-
            Unavailable environment, or automation/run not owned by this
            account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '503':
          description: Temporarily unavailable; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
      security:
        - MotionApiKey: []
        - MotionOAuth:
            - motion:automations:read
components:
  schemas:
    AutomationRunDetail:
      type: object
      properties:
        automation:
          $ref: '#/components/schemas/Automation'
        run:
          $ref: '#/components/schemas/AutomationRun'
        session:
          $ref: '#/components/schemas/AutomationSession'
      required:
        - automation
        - run
        - session
      additionalProperties: false
    AutomationError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
      additionalProperties: false
    Automation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        enabled:
          type: boolean
        prompt:
          type: string
        trigger:
          type: object
          properties:
            type:
              type: string
            platform:
              type: string
            source:
              type: string
          required:
            - type
            - platform
            - source
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        nextRunAt:
          type:
            - string
            - 'null'
          format: date-time
        runs:
          type: array
          items:
            $ref: '#/components/schemas/AutomationRun'
        memory:
          $ref: '#/components/schemas/AutomationMemory'
        connectorPolicy:
          $ref: '#/components/schemas/AutomationConnectorPolicy'
        maxConcurrentRuns:
          type: integer
        maxRunsPerHour:
          type: integer
      required:
        - id
        - name
        - enabled
        - prompt
        - trigger
        - createdAt
        - updatedAt
        - nextRunAt
        - runs
      additionalProperties: true
      description: >-
        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.
    AutomationRun:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - queued
            - running
            - completed
            - skipped
            - failed
            - blocked
        motionAgentChatId:
          type:
            - string
            - 'null'
          description: >-
            Null until a Motion chat is created. Open
            https://motion.so/agent?chat={motionAgentChatId} to inspect the run.
        queuedAt:
          type: string
          format: date-time
        startedAt:
          type:
            - string
            - 'null'
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
        attempt:
          type: integer
        resultSummary:
          type:
            - string
            - 'null'
        error:
          type:
            - string
            - 'null'
      required:
        - id
        - status
        - motionAgentChatId
        - queuedAt
      additionalProperties: true
      description: >-
        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.
    AutomationSession:
      type: object
      properties:
        id:
          type: string
        runId:
          type: string
        motionAgentChatId:
          type:
            - string
            - 'null'
        status:
          type: string
      required:
        - id
        - runId
        - motionAgentChatId
        - status
      additionalProperties: true
    AutomationMemory:
      type: object
      properties:
        rememberProcessedItems:
          type: boolean
        includePreviousRuns:
          type: integer
          minimum: 0
          maximum: 20
        compactAfterRuns:
          type: integer
          minimum: 5
          maximum: 100
      required:
        - rememberProcessedItems
        - includePreviousRuns
        - compactAfterRuns
      additionalProperties: false
    AutomationConnectorPolicy:
      type: object
      properties:
        mode:
          type: string
          enum:
            - none
            - fixed
            - conditional
        onUnavailable:
          type: string
          enum:
            - block
            - run_without
        grants:
          type: array
          maxItems: 6
          items:
            $ref: '#/components/schemas/AutomationConnectorGrant'
      required:
        - mode
        - onUnavailable
        - grants
      additionalProperties: false
      description: >-
        Uses existing connected accounts and permissions; this request cannot
        connect an account or grant access.
    AutomationConnectorGrant:
      type: object
      properties:
        connectorId:
          type: string
          enum:
            - github
            - notion
            - figma
            - google-drive
            - dropbox
            - getty
        access:
          type: string
          enum:
            - read
        resources:
          type: array
          maxItems: 50
          items:
            type: string
            minLength: 1
            maxLength: 2000
        condition:
          $ref: '#/components/schemas/AutomationConnectorCondition'
      required:
        - connectorId
        - access
        - resources
      additionalProperties: false
    AutomationConnectorCondition:
      type: object
      properties:
        eventTypes:
          type: array
          items:
            type: string
            enum:
              - schedule_once
              - schedule_recurring
              - youtube_video_uploaded
              - twitch_stream_ended
              - kick_stream_ended
        payloadField:
          type: string
          maxLength: 200
        equals:
          type: string
          maxLength: 2000
      required: []
      additionalProperties: false
  securitySchemes:
    MotionApiKey:
      type: http
      scheme: bearer
      description: >-
        Motion API key (motion_ prefix), authenticated as its owner. Account and
        engine permissions still apply.
    MotionOAuth:
      type: oauth2
      description: >-
        OAuth token audience must be https://mcp.motion.so/mcp for REST. Tokens
        for restricted MCP profiles cannot be reused here. Existing grants
        require reauthorization to add automation scopes.
      flows:
        authorizationCode:
          authorizationUrl: https://mcp.motion.so/oauth/authorize
          tokenUrl: https://mcp.motion.so/oauth/token
          scopes:
            motion:automations:read: Read automation definitions, capabilities, runs, and analytics.
            motion:automations:write: Create, edit, delete, invoke, and retry automations.

````

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