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

# Delete automation

> Delete an automation. The automation is soft-deleted: it stops firing and no longer appears in list or retrieve responses, but its past run history is retained. The agent and its other automations are not affected. Scheduled runs that are already queued may still execute before the deletion propagates.



## OpenAPI

````yaml delete /agents/{agent_id}/automations/{automation_id}
openapi: 3.0.3
info:
  version: 0.1.1
  title: Datagrid API
  description: Datagrid API
servers:
  - url: https://api.datagrid.com/v1
security:
  - BearerAuth: []
paths:
  /agents/{agent_id}/automations/{automation_id}:
    delete:
      tags:
        - Automations
      summary: Delete automation
      description: >-
        Delete an automation. The automation is soft-deleted: it stops firing
        and no longer appears in list or retrieve responses, but its past run
        history is retained. The agent and its other automations are not
        affected. Scheduled runs that are already queued may still execute
        before the deletion propagates.
      operationId: DeleteAutomation
      parameters:
        - name: agent_id
          in: path
          required: true
          description: The ID of the agent that owns the automation.
          schema:
            type: string
        - name: automation_id
          in: path
          required: true
          description: The ID of the automation to delete.
          schema:
            type: string
      responses:
        '204':
          description: Automation deleted successfully
        '404':
          description: >-
            Not found. The requested automation does not exist, or the
            authenticated API key does not have permission to access it.
        '429':
          description: >-
            Rate limit exceeded. The request has been throttled because the rate
            limit for this endpoint has been reached. Check the `Retry-After`
            response header and retry after the specified number of seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
components:
  schemas:
    RateLimitError:
      type: object
      description: >-
        Returned when the rate limit is exceeded. Rate limits are enforced per
        teamspace, endpoint path, and HTTP method over a 60-second sliding
        window. Each endpoint may have its own limit — check the
        X-RateLimit-Limit response header for the effective value.
      required:
        - error
        - message
        - retryable
        - status_code
      properties:
        status_code:
          type: integer
          description: The HTTP status code (429).
        statusCode:
          type: integer
          deprecated: true
          description: Deprecated. Use status_code instead.
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: The error code identifying this as a rate limit error.
        message:
          type: string
          description: A human-readable error message.
        mitigation:
          type: string
          description: Suggested action to resolve the error.
        retryable:
          type: boolean
          description: Whether the request can be retried after a delay.
        details:
          type: object
          properties:
            reason:
              type: string
              description: A detailed explanation of why the rate limit was exceeded.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````