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

# Upload a signed respondent attachment

> Signed session headers bind file to tenant, form, immutable version and question. 20 MiB/file ; 10 files or 50 MiB/session ; 1,000 or 1 GiB/form/UTC day; positive question.max adds MiB limit. Accepted inspected images/PDF/text/CSV/audio/video; no SVG/HTML/scripts/archives. video_audio accepts media only. Store returned receipt unchanged.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/forms/{publicCode}/assets
openapi: 3.0.3
info:
  contact:
    name: HueChat support
    email: support@huechat.ai
    url: https://huechat.ai/contact
  description: >-
    Account-scoped REST API for HueChat: conversations, messages, contacts,
    Customer CDP, Sales CRM, forms, appointments, inboxes, teams, agents, AI
    agents and knowledge, WhatsApp templates and broadcasts, workflows and chat
    menus. Authenticate with account-scoped API keys; every route is scoped to
    your own account.
  license:
    name: Proprietary
    url: https://huechat.ai/terms
  termsOfService: https://huechat.ai/terms
  title: HueChat API
  version: 2.0.0
servers:
  - url: https://app.huechat.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: The human agents on your account and their availability.
  - name: AI Agents
    description: >-
      Assistants you build to answer customers on their own: persona, language,
      guardrails, tools and a knowledge base, published to inboxes, replying in
      Arabic or English until they hand off to a human. Create, publish, test,
      monitor quality and roll back versions.
  - name: Broadcasts
    description: >-
      Send a WhatsApp template to a list of contacts from a CSV or saved
      audience, with scheduling, pause and resume, and delivery reports.
  - name: Chat Menus
    description: >-
      Numbered or button-driven menus a customer sees at the start of a
      conversation.
  - name: Contacts
    description: >-
      The people your team talks to: phone, email, name, custom attributes,
      labels and notes. One contact can have conversations on several channels.
  - name: Conversations
    description: >-
      A conversation is one thread between a contact and your team on one
      channel, with status, assignee, team, labels, priority and custom
      attributes. List, filter, search, assign, resolve and annotate them.
  - name: Forms
    description: >-
      Form management, assets, delivery, respondent sessions, submissions,
      scheduling, reports and AI-assisted authoring in one group.
  - name: Inboxes
    description: >-
      Connected channels: a WhatsApp Business number, an Instagram or Messenger
      page, an email address or a website live-chat widget. Inboxes decide where
      a conversation comes from and who can see it.
  - name: Knowledge
    description: >-
      Documents, web pages and text that ground an AI agent's answers. Upload,
      point at a URL or paste text; HueChat indexes it and the agent cites it.
  - name: Messages
    description: >-
      Everything said inside a conversation: text, attachments, WhatsApp
      templates and interactive replies. Sending through the API delivers on the
      conversation's channel and shows in the inbox like any agent reply.
  - name: Sales CRM
    description: >-
      The full tenant-scoped Sales workspace: Leads, Companies, Deals, tasks,
      products, price books, quotes, payments, forecasts, reports and settings.
  - name: Teams
    description: Groups of agents used for assignment and reporting.
  - name: Templates
    description: >-
      Pre-approved WhatsApp message formats required by Meta for
      business-initiated messages. Create, sync from Meta, AI-generate,
      test-send and read analytics.
  - name: Workflows
    description: >-
      Automation flows built from triggers and steps: route, tag, reply, wait,
      hand off. Create, publish, version and toggle.
paths:
  /api/v2/forms/{publicCode}/assets:
    parameters:
      - $ref: '#/components/parameters/publicCode'
    post:
      tags:
        - Forms
      summary: Upload a signed respondent attachment
      description: >-
        Signed session headers bind file to tenant, form, immutable version and
        question. 20 MiB/file ; 10 files or 50 MiB/session ; 1,000 or 1
        GiB/form/UTC day; positive question.max adds MiB limit. Accepted
        inspected images/PDF/text/CSV/audio/video; no SVG/HTML/scripts/archives.
        video_audio accepts media only. Store returned receipt unchanged.
      operationId: postApiV2FormsPubliccodeAssets
      parameters:
        - $ref: '#/components/parameters/formSession'
        - $ref: '#/components/parameters/formInvite'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                question_id:
                  type: string
              required:
                - file
                - question_id
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  asset:
                    $ref: '#/components/schemas/AssetReceipt'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '410':
          $ref: '#/components/responses/Gone'
        '413':
          $ref: '#/components/responses/TooLarge'
        '422':
          $ref: '#/components/responses/ValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
      security: []
components:
  parameters:
    publicCode:
      name: publicCode
      in: path
      required: true
      schema:
        type: string
        minLength: 8
        maxLength: 24
    formSession:
      name: X-Form-Session
      in: header
      required: true
      schema:
        type: string
      description: Signed session from GET /forms/{publicCode}.
    formInvite:
      name: X-Form-Invitation
      in: header
      schema:
        type: string
      description: Invitation bearer token when using a recipient link.
  schemas:
    AssetReceipt:
      type: object
      properties:
        asset_id:
          type: string
          format: uuid
        filename:
          type: string
          minLength: 1
          maxLength: 180
        mime_type:
          type: string
        byte_size:
          type: integer
          minimum: 1
          maximum: 20971520
      required:
        - asset_id
        - filename
        - mime_type
        - byte_size
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    BadRequest:
      description: Malformed request, invalid ID/filter or unknown top-level field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Invitation, session, membership, or consent requirement not met.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Form not found in the account or not publicly available.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Stale version, duplicate response, or already used invitation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Gone:
      description: Published expiry or response cap reached.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooLarge:
      description: Request body, upload or CSV row limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: The request or definition is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: >-
        Public admission, upload or AI quota exceeded. Reserved AI failures
        count.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Dependency/configuration unavailable; fail closed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your personal access token where supported, or a scoped API key (`hc_…`)
        created inside HueChat at Account → Developer API. Send it as
        `Authorization: Bearer <token>`.

````