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

# Upload a binary as a generic event

> Upload a binary file as a generic custom event. Bytes are stored via the
same `store_blob` path as Drive/OneDrive raw objects, so the LLM enricher
picks them up automatically when the mime is supported.

<Snippet file="api/ingestion/ingest-custom-upload.mdx" />


## OpenAPI

````yaml POST /v1/custom-connectors/{connector_id}/ingest/upload
openapi: 3.1.0
info:
  title: Adapter API
  description: Connect and sync data from any SaaS tool.
  version: 0.1.0
servers:
  - url: https://api.adapter.com
security:
  - ApiKeyAuth: []
tags:
  - name: connections
    description: Manage OAuth connections to data sources.
paths:
  /v1/custom-connectors/{connector_id}/ingest/upload:
    post:
      tags:
        - ingestion
      summary: Upload a binary as a generic event
      description: >-
        Upload a binary file as a generic custom event. Bytes are stored via the

        same `store_blob` path as Drive/OneDrive raw objects, so the LLM
        enricher

        picks them up automatically when the mime is supported.
      operationId: ingest_custom_upload
      parameters:
        - name: connector_id
          in: path
          required: true
          schema:
            type: string
            title: Connector Id
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_ingest_custom_upload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestUploadResponse'
        '402':
          description: >-
            Ingest fully rejected — the workspace is over a tier quota
            (documents / storage / per-document size). Partial batches instead
            return 200 with a `rejected` list. Not transient; upgrade or free
            space rather than retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaExceededErrorModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Body_ingest_custom_upload:
      properties:
        file:
          type: string
          contentMediaType: application/octet-stream
          title: File
      type: object
      required:
        - file
      title: Body_ingest_custom_upload
    IngestUploadResponse:
      properties:
        status:
          type: string
          title: Status
          description: Always 'uploaded' (a quota-rejected upload returns 402).
          examples:
            - uploaded
        key:
          type: string
          title: Key
          description: S3 key of the stored raw object.
        size:
          type: integer
          title: Size
          description: Size of the uploaded blob in bytes.
        file_id:
          type: string
          title: File Id
          description: external_id assigned to the resulting event.
      type: object
      required:
        - status
        - key
        - size
        - file_id
      title: IngestUploadResponse
    QuotaExceededErrorModel:
      properties:
        error_code:
          type: string
          const: quota_exceeded
          title: Error Code
          default: quota_exceeded
        message:
          type: string
          title: Message
          default: 'Ingest rejected: this workspace is over its plan quota.'
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Carries `rejected`: the refused items as `{external_id, resource,
            reason}` (resource ∈ documents/storage/doc_size).
      type: object
      title: QuotaExceededErrorModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Pass your `pk_live_...` API key as a Bearer token.

````