> ## 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.

# Read automation analytics

> Read daily run counts.



## OpenAPI

````yaml /openapi.json get /automations/{automation_id}/analytics
openapi: 3.1.0
info:
  title: Motion
  version: '2026-11-19'
  description: >-
    Create and edit Motion video projects from prompts, export MP4s and editor
    packages (Premiere, After Effects, Resolve, Final Cut), and manage
    templates, brand kits, library uploads, connectors, automations, and social
    posts.
servers:
  - url: https://api.motion.so/api/motion
security:
  - MotionApiKey: []
tags:
  - name: Projects
  - name: Exports
  - name: Library
  - name: Templates
  - name: Brand kits
  - name: Connectors
    description: Connect services and control the actions a project may use.
  - name: Automations
  - name: Social posting
paths:
  /automations/{automation_id}/analytics:
    get:
      tags:
        - Automations
      summary: Read automation analytics
      description: Read daily run counts.
      operationId: get_automation_analytics
      parameters:
        - name: automation_id
          in: path
          required: true
          schema:
            type: string
            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: Number of trailing days to aggregate (7–90, default 30).
        - $ref: '#/components/parameters/MotionApiVersion'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationAnalytics'
              example:
                days: 30
                total: 4
                buckets:
                  - date: '2026-11-19'
                    completed: 1
                    failed: 0
                    skipped: 0
                    in_progress: 0
                    total: 1
        '400':
          description: Invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '401':
          description: Missing or invalid authentication credential.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '403':
          description: Missing required scope or plan access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationError'
        '404':
          description: Automation or run not found.
          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:
  parameters:
    MotionApiVersion:
      name: Motion-API-Version
      in: header
      required: false
      description: >-
        Optional API version override for this request. When omitted, Motion
        uses the API version pinned to your API key or OAuth connection.
      schema:
        type: string
        enum:
          - '2026-11-19'
        default: '2026-11-19'
  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
              in_progress:
                type: number
              total:
                type: number
            required:
              - date
              - completed
              - failed
              - skipped
              - in_progress
              - 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: >-
        A Motion API key. Access is limited to its stored organization,
        workspace, scopes and the creator’s current permissions.
    MotionOAuth:
      type: oauth2
      description: OAuth 2.1 bearer token issued by Motion (https://mcp.motion.so/mcp).
      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.
            motion:connectors:read: Read available services, connected accounts, and allowed actions.
            motion:connectors:write: Connect and disconnect workspace services.
            motion:templates:read: Read and preview accessible templates.
            motion:templates:write: Create, edit, share, and archive prompt templates.
            motion:assets:read: Find and read permitted media library assets.
            motion:brand-kits:read: Read permitted brand kits.
            motion:brand-kits:write: Create, update, and delete brand kits.
            motion:social:read: Read authorized social accounts and posts.
            motion:social:write: Draft, submit, approve, and cancel social posts.
            motion:projects:read: Read projects, generations and exports.
            motion:projects:write: >-
              Create and edit projects, send messages and request exports. Uses
              workspace credits.
            motion:assets:write: Create and complete reusable media library uploads.

````

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