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

# Download file directly by attachment ID



## OpenAPI

````yaml /openapi.json get /api/v1/files/{id}/download
openapi: 3.0.0
info:
  title: Placet API
  description: Chat-based agent inbox for AI-human interaction
  version: 0.1.0
  contact: {}
servers:
  - url: http://localhost:3001
    description: Local development
security: []
tags: []
paths:
  /api/v1/files/{id}/download:
    get:
      tags:
        - Files
      summary: Download file directly by attachment ID
      operationId: FilesAgentController_download
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: File stream
        '401':
          description: Invalid API key
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Not your file
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Attachment not found
          content:
            application/octet-stream:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api-key: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Validation failed
        errors:
          description: Zod validation errors (only on 400)
          type: array
          items:
            $ref: '#/components/schemas/ZodValidationError'
      required:
        - statusCode
        - message
    ZodValidationError:
      type: object
      properties:
        code:
          type: string
          example: invalid_type
        message:
          type: string
          example: Expected string, received number
        path:
          example:
            - email
          type: array
          items:
            type: string
      required:
        - code
        - message
        - path
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Placet API key (hp_...)

````