> ## 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 automation analytics

>  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}/analytics
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}/analytics:
    get:
      tags:
        - Automations
      summary: Get automation analytics
      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_analytics
      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: days
          in: query
          required: false
          schema:
            type: integer
            minimum: 7
            maximum: 90
            default: 30
          description: ''
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationAnalytics'
        '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:
    AutomationAnalytics:
      type: object
      properties:
        days:
          type: number
        total:
          type: number
        buckets:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
              completed:
                type: number
              failed:
                type: number
              skipped:
                type: number
              inProgress:
                type: number
              total:
                type: number
            required:
              - date
              - completed
              - failed
              - skipped
              - inProgress
              - total
            additionalProperties: false
      required:
        - days
        - total
        - buckets
      additionalProperties: false
    AutomationError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
      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.