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

# Delete an automation

> Deletes the saved definition. Does not cancel work already running in a Motion chat. 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.



## OpenAPI

````yaml /openapi.json delete /automations/{automation_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}:
    delete:
      tags:
        - Automations
      summary: Delete an automation
      description: >-
        Deletes the saved definition. Does not cancel work already running in a
        Motion chat. 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.
      operationId: delete_automation
      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.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationDeleted'
        '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:write
components:
  schemas:
    AutomationDeleted:
      type: object
      properties:
        deleted:
          type: boolean
          const: true
      required:
        - deleted
      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.