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

# Update an automation

> Update an automation. Set enabled to false to pause it.



## OpenAPI

````yaml /openapi.json patch /automations/{automation_id}
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}:
    patch:
      tags:
        - Automations
      summary: Update an automation
      description: Update an automation. Set enabled to false to pause it.
      operationId: update_automation
      parameters:
        - name: automation_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
          description: ID returned by list or create.
        - $ref: '#/components/parameters/MotionApiVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAutomationRequest'
            example:
              enabled: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationEnvelope'
              example:
                automation:
                  id: auto_01j9x4m8n9p0q1r2s3t4u5v6
                  name: Daily product update
                  enabled: false
                  prompt: >-
                    Create a 15-second 16:9 animated update summarizing the
                    latest release notes.
                  trigger:
                    type: schedule_recurring
                    platform: schedule
                    label: Every 24 hours
                    source: Schedule
                    interval_minutes: 1440
                  created_at: '2026-11-18T14:00:00Z'
                  updated_at: '2026-11-19T14:02:18Z'
                  next_run_at: '2026-11-20T14:00:00Z'
                  runs:
                    - id: run_01j9x5q2k7w8m4n3p6r9s1t2
                      status: completed
                      motion_agent_chat_id: 4f20dcdd-f63b-4898-97d6-2e05c0d37c78
                      queued_at: '2026-11-19T14:00:00Z'
                      started_at: '2026-11-19T14:00:03Z'
                      completed_at: '2026-11-19T14:02:18Z'
                      attempt: 1
                      result_summary: Created the daily product update video.
                      error: null
                  memory:
                    remember_processed_items: true
                    include_previous_runs: 5
                    compact_after_runs: 20
                  max_concurrent_runs: 1
                  max_runs_per_hour: 4
        '400':
          description: Invalid request payload.
          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'
        '409':
          description: >-
            Concurrent execution edit: update_conflict. Read the automation
            again before retrying.
          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:write
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:
    UpdateAutomationRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 160
        prompt:
          type: string
          minLength: 1
          maxLength: 20000
          description: Self-contained instructions used for every future invocation.
        trigger:
          $ref: '#/components/schemas/AutomationTrigger'
        memory:
          $ref: '#/components/schemas/AutomationMemory'
        connector_policy:
          $ref: '#/components/schemas/AutomationConnectorPolicy'
        max_concurrent_runs:
          type: integer
          minimum: 1
          maximum: 10
          default: 1
        max_runs_per_hour:
          type: integer
          minimum: 1
          maximum: 100
          default: 4
        execution:
          $ref: '#/components/schemas/AutomationExecution'
        enabled:
          type: boolean
          description: >-
            False pauses future scheduling; true resumes it. Does not cancel an
            already running invocation.
      required: []
      additionalProperties: false
      minProperties: 1
      description: >-
        Fields to update on an automation. Nested objects replace their saved
        values.
    AutomationEnvelope:
      type: object
      properties:
        automation:
          $ref: '#/components/schemas/Automation'
      required:
        - automation
      additionalProperties: false
    AutomationError:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
      additionalProperties: false
    AutomationTrigger:
      type: object
      properties:
        type:
          type: string
          enum:
            - schedule_once
            - schedule_recurring
            - youtube_video_uploaded
            - youtube_stream_ended
            - youtube_channel_content
            - twitch_stream_ended
            - kick_stream_ended
        platform:
          type: string
          enum:
            - schedule
            - youtube
            - twitch
            - kick
        label:
          type: string
          minLength: 1
          maxLength: 160
        source:
          type: string
          minLength: 1
          maxLength: 2000
          description: >-
            Use Schedule for schedules; otherwise a channel URL, handle, or
            YouTube channel ID.
        timezone:
          type: string
          maxLength: 100
          description: >-
            Display timezone. Recurring intervals use elapsed minutes, not
            wall-clock cron scheduling.
        interval_minutes:
          type: integer
          minimum: 1
          maximum: 525600
          description: Required for recurring schedules.
        run_at:
          type: string
          format: date-time
          description: >-
            Required for one-time schedules. Include a UTC offset and choose a
            future timestamp.
        content_types:
          type: array
          items:
            type: string
            enum:
              - videos
              - shorts
              - livestreams
          minItems: 1
          maxItems: 3
          description: >-
            Optional YouTube content categories to watch when using
            youtube_channel_content.
      required:
        - type
        - platform
        - label
        - source
      additionalProperties: false
      description: Trigger configuration for a schedule or channel event.
    AutomationMemory:
      type: object
      properties:
        remember_processed_items:
          type: boolean
        include_previous_runs:
          type: integer
          minimum: 0
          maximum: 20
        compact_after_runs:
          type: integer
          minimum: 5
          maximum: 100
      required:
        - remember_processed_items
        - include_previous_runs
        - compact_after_runs
      additionalProperties: false
    AutomationConnectorPolicy:
      type: object
      properties:
        mode:
          type: string
          enum:
            - none
            - fixed
            - conditional
        on_unavailable:
          type: string
          enum:
            - block
            - run_without
        grants:
          type: array
          maxItems: 6
          items:
            $ref: '#/components/schemas/AutomationConnectorGrant'
      required:
        - mode
        - on_unavailable
        - grants
      additionalProperties: false
      description: Controls which connected services an automation may read during a run.
    AutomationExecution:
      type: object
      properties:
        effort:
          type: string
          enum:
            - standard
            - extended
          description: Project effort, fixed at creation. Defaults to standard.
      required: []
      additionalProperties: false
      minProperties: 1
      description: Execution effort settings for automation runs.
    Automation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        enabled:
          type: boolean
        prompt:
          type: string
        trigger:
          type: object
          properties:
            type:
              type: string
              enum:
                - schedule_once
                - schedule_recurring
                - youtube_video_uploaded
                - youtube_stream_ended
                - youtube_channel_content
                - twitch_stream_ended
                - kick_stream_ended
                - website_changed
            platform:
              type: string
              enum:
                - schedule
                - youtube
                - twitch
                - kick
                - website
            source:
              type: string
          required:
            - type
            - platform
            - source
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        next_run_at:
          type:
            - string
            - 'null'
          format: date-time
        runs:
          type: array
          items:
            $ref: '#/components/schemas/AutomationRun'
        memory:
          $ref: '#/components/schemas/AutomationMemory'
        connector_policy:
          $ref: '#/components/schemas/AutomationConnectorPolicy'
        max_concurrent_runs:
          type: integer
        max_runs_per_hour:
          type: integer
      required:
        - id
        - name
        - enabled
        - prompt
        - trigger
        - created_at
        - updated_at
        - next_run_at
        - runs
      additionalProperties: true
      description: An automation definition and its configuration.
    AutomationConnectorGrant:
      type: object
      properties:
        connector_id:
          type: string
          enum:
            - github
            - notion
            - google-drive
            - getty
        access:
          type: string
          enum:
            - read
        resources:
          type: array
          maxItems: 50
          items:
            type: string
            minLength: 1
            maxLength: 2000
        condition:
          $ref: '#/components/schemas/AutomationConnectorCondition'
      required:
        - connector_id
        - access
        - resources
      additionalProperties: false
    AutomationRun:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - queued
            - running
            - completed
            - skipped
            - failed
            - blocked
        motion_agent_chat_id:
          type:
            - string
            - 'null'
          description: >-
            Project chat ID once created. Open
            https://motion.so/agent?chat={motion_agent_chat_id} to inspect the
            run.
        queued_at:
          type: string
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        attempt:
          type: integer
        result_summary:
          type:
            - string
            - 'null'
        error:
          type:
            - string
            - 'null'
      required:
        - id
        - status
        - motion_agent_chat_id
        - queued_at
      additionalProperties: true
      description: A single automation run and its linked project.
    AutomationConnectorCondition:
      type: object
      properties:
        event_types:
          type: array
          items:
            type: string
            enum:
              - schedule_once
              - schedule_recurring
              - youtube_video_uploaded
              - youtube_stream_ended
              - youtube_channel_content
              - twitch_stream_ended
              - kick_stream_ended
        payload_field:
          type: string
          maxLength: 200
        equals:
          type: string
          maxLength: 2000
      required: []
      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.