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

# AttachKnowledgeAssetAPI mirrors the erdo_attach_knowledge_asset MCP tool.




## OpenAPI

````yaml /api/openapi.json post /v1/knowledge/{objectID}/attachments
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, and experiments. Authenticate with
    a Bearer API key (erdo_api_...) or scoped token (erdo_token_...).
  version: '2026-08-15'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/knowledge/{objectID}/attachments:
    post:
      summary: >
        AttachKnowledgeAssetAPI mirrors the erdo_attach_knowledge_asset MCP
        tool.
      operationId: POST:mcp.AttachKnowledgeAssetAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: objectID
          required: true
          schema:
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                content_base64:
                  title: >
                    ContentBase64 carries the bytes directly. Mutually exclusive
                    with SourceURL.
                  type: string
                description:
                  description: >
                    a search can match, so an uncaptioned upload is findable by
                    filename alone. Left empty, the platform captions raster
                    images in the background.
                  title: >
                    Description is the asset's caption — and for an image it is
                    the ONLY text
                  type: string
                filename:
                  title: >
                    Filename must include the extension — it drives media-type
                    detection.
                  type: string
                media_type:
                  type: string
                object_id:
                  description: |
                    Style record, which is where a page's brand imagery lives.
                  title: >
                    ObjectID is the Knowledge object to attach to — usually the
                    org's Brand
                  type: string
                source_url:
                  title: >
                    SourceURL is fetched by the knowledge service itself,
                    streaming to storage.
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  asset_id:
                    format: uuid
                    type: string
                  byte_size:
                    format: int64
                    type: integer
                  filename:
                    type: string
                  media_type:
                    type: string
                  object_id:
                    format: uuid
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````