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

# Upload Document Attachment

> Upload an image attachment to a knowledge document.



## OpenAPI

````yaml /openapi-v1.json post /api/v1/documents/{document_id}/attachments
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/documents/{document_id}/attachments:
    post:
      tags:
        - Documents
      summary: Upload Document Attachment
      description: Upload an image attachment to a knowledge document.
      operationId: core_api_v1_controllers_documents_upload_document_attachment
      parameters:
        - in: path
          name: document_id
          schema:
            title: Document Id
            type: string
          required: true
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  title: File
                  type: string
              required:
                - file
              title: FileParams
              type: object
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentOut'
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    AttachmentOut:
      description: Schema for an attachment upload response.
      properties:
        object:
          default: attachment
          title: Object
          type: string
        url:
          title: Url
          type: string
        name:
          title: Name
          type: string
        content_type:
          title: Content Type
          type: string
      required:
        - url
        - name
        - content_type
      title: AttachmentOut
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````