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

# Get file by ID

> Return file metadata and current `used_in` links.



## OpenAPI

````yaml /openapi.json get /v1/public/files/{file_id}
openapi: 3.1.0
info:
  title: Poelis Public API
  description: |2-

            Poelis Public API - REST endpoints for external clients and integrations.
            
            ## Authentication
            
            All endpoints require an API key in the `Authorization` header:
            ```
            Authorization: Bearer poelis_api_...
            ```
            
            Get your API key from the web application's API Keys section.
            
            ## Rate Limiting
            
            API requests are rate-limited per organization. Contact support for higher limits.
            
            ## Support
            
            For questions or issues, contact support@poelis.com
            
  version: 1.0.0
servers:
  - url: https://api.poelis.com
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /v1/public/files/{file_id}:
    get:
      tags:
        - Files
      summary: Get file by ID
      description: Return file metadata and current `used_in` links.
      operationId: get_file_v1_public_files__file_id__get
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            title: File Id
      responses:
        '200':
          description: File metadata and link usages.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicFile'
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
        '401':
          description: Unauthorized - Invalid or missing API key
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: unauthorized
                message: Invalid or missing API key
        '403':
          description: Forbidden - Access denied
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: forbidden
                message: Access denied
        '404':
          description: Not found
          headers:
            x-request-id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: not_found
                message: Not found
        '422':
          description: Validation error - Invalid request body or parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: validation_error
                message: Invalid data format
                details:
                  errors:
                    - loc:
                        - body
                        - field_name
                      msg: field required
                      type: value_error.missing
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: rate_limit_exceeded
                message: Too many requests
      security:
        - API Key: []
components:
  schemas:
    PublicFile:
      properties:
        id:
          type: string
          title: Id
          description: File ID
        name:
          type: string
          title: Name
          description: Original file name (legacy compatibility field)
        originalFileName:
          type: string
          title: Originalfilename
          description: Original file name
        userTitle:
          anyOf:
            - type: string
            - type: 'null'
          title: Usertitle
          description: Optional editable file title
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
          description: MIME type
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: File description
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: File size in bytes
        uploadedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploadedat
          description: ISO 8601 upload timestamp
        uploadedBy:
          anyOf:
            - $ref: '#/components/schemas/PublicUser'
            - type: 'null'
          description: User who uploaded the file
        deleted:
          type: boolean
          title: Deleted
          description: Whether the file is soft-deleted
        used_in:
          items:
            $ref: '#/components/schemas/PublicFileUsage'
          type: array
          title: Used In
          description: Current file link placements for this file
      type: object
      required:
        - id
        - name
        - originalFileName
        - deleted
      title: PublicFile
      description: Public representation of a stored file.
      example:
        content_type: application/pdf
        deleted: false
        description: >-
          Specification document for compressor performance and operating
          constraints.
        id: 990e8400-e29b-41d4-a716-446655440000
        name: compressor-spec-v3.pdf
        originalFileName: compressor-spec-v3.pdf
        size_bytes: 245612
        uploadedBy:
          id: auth0|550e8400-e29b-41d4-a716-446655440000
          imageUrl: https://example.com/avatar.png
          userName: Jane Doe
        uploaded_at: '2026-04-01T10:11:12.123Z'
        used_in:
          - file_link_id: 890e8400-e29b-41d4-a716-446655440000
            product_id: 660e8400-e29b-41d4-a716-446655440000
            target_id: 770e8400-e29b-41d4-a716-446655440000
            target_type: item
        userTitle: Compressor specification
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Machine-readable error code (e.g. validation_error, item_not_found).
        message:
          type: string
          description: Human-readable error message.
        details:
          type: object
          description: >-
            Additional error context (optional). For validation errors, contains
            a list of field-level issues.
          nullable: true
      required:
        - error
        - message
    PublicUser:
      properties:
        id:
          type: string
          title: Id
          description: User ID
        userName:
          type: string
          title: Username
          description: Display name
        imageUrl:
          anyOf:
            - type: string
            - type: 'null'
          title: Imageurl
          description: Avatar URL
      type: object
      required:
        - id
        - userName
      title: PublicUser
      description: >-
        User representation in public API responses (owner, createdBy,
        updatedBy).
      example:
        id: auth0|550e8400-e29b-41d4-a716-446655440000
        imageUrl: https://example.com/avatar.png
        userName: Jane Doe
    PublicFileUsage:
      properties:
        file_link_id:
          type: string
          title: File Link Id
          description: File link ID
        product_id:
          type: string
          title: Product Id
          description: Product ID where the file is linked
        target_type:
          type: string
          enum:
            - item
            - property
          title: Target Type
          description: Linked target type
        target_id:
          type: string
          title: Target Id
          description: Linked target ID (item ID or property ID)
        property_type:
          anyOf:
            - type: string
              enum:
                - numeric
                - text
                - date
                - status
                - matrix
                - formula
            - type: 'null'
          title: Property Type
          description: Property type when target_type is property
      type: object
      required:
        - file_link_id
        - product_id
        - target_type
        - target_id
      title: PublicFileUsage
      description: Link usage metadata for a file.
      example:
        file_link_id: 890e8400-e29b-41d4-a716-446655440000
        product_id: 660e8400-e29b-41d4-a716-446655440000
        target_id: 770e8400-e29b-41d4-a716-446655440000
        target_type: item
  headers:
    RequestId:
      description: >-
        Request correlation ID. Echoes the incoming `x-request-id` header or a
        server-generated ID.
      schema:
        type: string
    RateLimitLimit:
      description: Request limit for the current rate limit window.
      schema:
        type: integer
    RateLimitRemaining:
      description: Remaining requests in the current rate limit window.
      schema:
        type: integer
    RateLimitReset:
      description: Unix timestamp (seconds) when the current rate limit window resets.
      schema:
        type: integer
  securitySchemes:
    API Key:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Enter your API key. Example: Bearer poelis_api_...'

````