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

# Add Attachment

> Add one or more attachments to an invoice. Be careful: the attachments ARE NOT ADDED to the UBL! They are only stored in our database and can be downloaded later. To add attachments to the UBL, you need to add the attachment(s) via POST /api/documents



## OpenAPI

````yaml /openapi.json post /api/documents/{document_id}/attachments
openapi: 3.1.0
info:
  title: e-invoice.be Peppol Access Point API
  version: 1.1.0
  x-logo:
    url: https://e-invoice.be/einvoice.svg
servers:
  - url: https://api.e-invoice.be
    description: Production
security: []
paths:
  /api/documents/{document_id}/attachments:
    post:
      tags:
        - Documents
      summary: Add Attachment
      description: >-
        Add one or more attachments to an invoice. Be careful: the attachments
        ARE NOT ADDED to the UBL! They are only stored in our database and can
        be downloaded later. To add attachments to the UBL, you need to add the
        attachment(s) via POST /api/documents
      operationId: post_document_attachments_api_documents__document_id__attachments_post
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            title: Document Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/Body_post_document_attachments_api_documents__document_id__attachments_post
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentAttachment'
        '401':
          description: 'Unauthorized: API key is missing, invalid, or inactive'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: 'Not Found: Document with the specified ID doesn''t exist'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: 'Unprocessable Entity: Invalid response data'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: 'Internal Server Error: Unexpected server error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: true
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_post_document_attachments_api_documents__document_id__attachments_post:
      properties:
        file:
          type: string
          format: binary
          title: File
      type: object
      required:
        - file
      title: >-
        Body_post_document_attachments_api_documents__document_id__attachments_post
    DocumentAttachment:
      properties:
        file_name:
          type: string
          title: File Name
        file_type:
          type: string
          title: File Type
          default: application/pdf
        file_size:
          type: integer
          title: File Size
          default: 0
        id:
          type: string
          title: Id
        file_url:
          anyOf:
            - type: string
            - type: 'null'
          title: File Url
      type: object
      required:
        - file_name
        - id
      title: DocumentAttachment
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error response model.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````