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

# Delete an agent run and request the erase of its data

> Removes the run record and requests the erase of the other data of the run.
Returns 404 for both "never existed" and "owned by someone else" to avoid leaking existence of other
users' conversations.




## OpenAPI

````yaml /api-reference/openapi.yml delete /query/runs/{runId}
openapi: 3.0.3
info:
  title: DataLinks
  version: 3.21.1
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /query/runs/{runId}:
    delete:
      tags:
        - agentRuns
      summary: Delete an agent run and request the erase of its data
      description: >
        Removes the run record and requests the erase of the other data of the
        run.

        Returns 404 for both "never existed" and "owned by someone else" to
        avoid leaking existence of other

        users' conversations.
      operationId: deleteAgentRun
      parameters:
        - name: runId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '202':
          description: >
            A lease holds the run. The server removes the run record when it
            receives the request. The server erases

            the other data of the run after the lease ends. A second DELETE
            returns 404.
        '204':
          description: Deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: >-
        Unauthorized. This error occurs if the authentication token is missing
        or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      required:
        - error_code
        - message
      type: object
      properties:
        error_code:
          type: string
          example: UNAUTHORIZED
        error_message:
          type: string
          example: ''
        message:
          type: string
          example: Missing authentication token
        sub_errors:
          type: array
          items:
            required:
              - code
              - message
            type: object
            properties:
              code:
                type: string
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      description: >
        Use a Bearer token for authentication. Submit the token using the
        `Authorization`

        header: `Authorization: Bearer <token>`.
      scheme: bearer
    openId:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth
          scopes:
            openid: openid

````

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