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

# Delete a file

> Removes a file from the org's library and everywhere it was delivered: the stored object and the library entry go immediately, and every phone holding a copy is scheduled to remove it (removal is confirmed per phone and retried until it lands). The response reports how many phones that recall reaches. This runs the same for an uploaded or a captured file; a capture's source phone keeps its own session copy, which belongs to the session, not the library.



## OpenAPI

````yaml /api-reference/openapi-backend.json delete /files/{file_id}
openapi: 3.1.0
info:
  description: Axilio backend HTTP API.
  title: Axilio API
  version: 0.85.0
servers:
  - url: https://api.axilio.ai/api/v1
    description: Production
security: []
tags:
  - name: API Keys
  - name: Billing
  - name: Files
  - name: Organization
  - name: Phones
  - name: Runs
  - name: Skill
  - name: Usage
  - name: Workflows
paths:
  /files/{file_id}:
    delete:
      tags:
        - Files
      summary: Delete a file
      description: >-
        Removes a file from the org's library and everywhere it was delivered:
        the stored object and the library entry go immediately, and every phone
        holding a copy is scheduled to remove it (removal is confirmed per phone
        and retried until it lands). The response reports how many phones that
        recall reaches. This runs the same for an uploaded or a captured file; a
        capture's source phone keeps its own session copy, which belongs to the
        session, not the library.
      operationId: files_delete
      parameters:
        - description: file identifier to delete
          in: path
          name: file_id
          required: true
          schema:
            description: file identifier to delete
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteFileOutputBody'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Error
      security:
        - apiKeyAuth: []
components:
  schemas:
    DeleteFileOutputBody:
      additionalProperties: false
      description: Confirmation that the file was deleted.
      properties:
        message:
          type: string
        phones_pending_removal:
          description: >-
            Phones that still hold a copy and have been scheduled to remove it.
            Zero means the file is already gone everywhere.
          format: int64
          type: integer
      required:
        - message
        - phones_pending_removal
      type: object
    V2ErrorModel:
      additionalProperties: false
      description: >-
        Error response, following RFC 9457 (Problem Details for HTTP APIs).
        Returned with a application/problem+json content type.
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/V2ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    V2ErrorDetail:
      additionalProperties: false
      description: >-
        One specific problem within an error response, locating the offending
        part of the request.
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    apiKeyAuth:
      description: Customer API key (axl_ prefix).
      in: header
      name: X-Axilio-Api-Key
      type: apiKey

````

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