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

# Get a file

> Returns one file from the org's library, with a short-lived read URL once its bytes are ready. A message's media part names its file by id; this is where that id resolves. Another org's file id reads as not found.

Minimum role required: Viewer


## OpenAPI

````yaml /api-reference/openapi-backend.json get /files/{file_id}
openapi: 3.1.0
info:
  description: Axilio backend HTTP API.
  title: Axilio API
  version: 0.155.0
servers:
  - url: https://api.axilio.ai/api/v1
    description: Production
security: []
tags:
  - name: Agents
  - name: API Keys
  - name: Billing
  - name: Conversations
  - name: Files
  - name: Messages
  - name: Models
  - name: Organization
  - name: Phones
  - name: Runs
  - name: Sessions
  - name: Skill
  - name: Usage
  - name: Webhooks
paths:
  /files/{file_id}:
    get:
      tags:
        - Files
      summary: Get a file
      description: >-
        Returns one file from the org's library, with a short-lived read URL
        once its bytes are ready. A message's media part names its file by id;
        this is where that id resolves. Another org's file id reads as not
        found.
      operationId: files_get
      parameters:
        - description: file identifier
          in: path
          name: file_id
          required: true
          schema:
            description: file identifier
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileSummary'
          description: OK
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Not Found
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  schemas:
    FileSummary:
      additionalProperties: false
      description: One file in the org's library.
      properties:
        attachment_url:
          description: >-
            Short-lived signed URL that downloads the file as an attachment
            under its name. Present only for ready files.
          type: string
        bytes_transferred:
          description: >-
            Bytes moved so far for an in-flight phone transfer. Absent until the
            phone reports progress.
          format: int64
          type: integer
        capture_error:
          description: >-
            Reason the phone's upload failed, when it did. Present for captures
            and message attachments.
          type: string
        capture_state:
          description: >-
            Upload lifecycle of a file the phone sends itself:
            detected/uploading while in flight, ready when usable, or a terminal
            skip/failure with its reason. Present for captures and message
            attachments.
          enum:
            - detected
            - uploading
            - ready
            - skipped_size
            - skipped_quota
            - skipped_type
            - dropped_teardown
            - failed
          type: string
        checksum:
          description: >-
            SHA-256 of the bytes, computed on the phone while uploading. Present
            for captures and message attachments.
          type: string
        created_at:
          description: >-
            When the file was registered: upload registration, or capture
            detection.
          format: date-time
          type: string
        display_url:
          description: >-
            Short-lived signed URL for a full-resolution JPEG of a HEIC or HEIF
            original, for display where a browser cannot draw the original.
            Absent for other types and until generated.
          type: string
        download_url:
          description: >-
            Short-lived signed URL to read the file's bytes. Present only for
            ready files; re-list to refresh an expired one.
          type: string
        duration_seconds:
          description: Video duration in seconds.
          format: int64
          type: integer
        filename:
          description: >-
            Original filename; used as the display name when the file lands on a
            phone.
          type: string
        height:
          description: Intrinsic pixel height of the source.
          format: int64
          type: integer
        id:
          description: >-
            File identifier. Unique across the whole library; deliverable to a
            phone regardless of source.
          type: string
        message_id:
          description: >-
            The message this file was attached to. Present for message
            attachments once the message is stored; a file whose message never
            arrived still names its phone.
          type: string
        mime_type:
          description: Declared MIME type, pinned by the presigned upload.
          type: string
        on_phone_count:
          description: >-
            Distinct phones currently holding or receiving a delivered copy.
            Informational: deleting the file from the library does not remove
            these.
          format: int64
          type: integer
        phone_id:
          description: >-
            The phone that received the message this file was attached to.
            Present for message attachments.
          type: string
        preview_state:
          description: >-
            Whether the preview exists, is still being generated, or will never
            be available for this format.
          enum:
            - processing
            - ready
            - unavailable
          type: string
        reel_url:
          description: >-
            Short-lived signed URL for the animated hover preview. Videos only;
            absent until generated.
          type: string
        session_id:
          description: Session that produced the file. Present only for captures.
          type: string
        size_bytes:
          description: Declared size in bytes, pinned by the presigned upload.
          format: int64
          type: integer
        source:
          description: >-
            How the file entered the library: upload (put in directly), capture
            (lifted off a session), or message (attached to a message one of the
            org's dedicated phones received).
          enum:
            - upload
            - capture
            - message
          type: string
        status:
          description: >-
            uploading until the object is verified in storage, then ready. For a
            capture, read capture_state for the fuller lifecycle.
          enum:
            - uploading
            - ready
          type: string
        surface:
          description: >-
            Which surface a capture or message attachment came off (phone
            today). Absent for a direct upload.
          enum:
            - phone
          type: string
        thumbnail_url:
          description: >-
            Short-lived signed URL for the generated preview image. Absent while
            generation is pending, and permanently absent for formats without a
            preview.
          type: string
        width:
          description: Intrinsic pixel width of the source.
          format: int64
          type: integer
      required:
        - id
        - source
        - filename
        - mime_type
        - size_bytes
        - status
        - created_at
        - on_phone_count
        - preview_state
      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.