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

# Upload Category Samples

> Upload multiple sample files for the specified file category, maximum 20 files



## OpenAPI

````yaml /docflow-global/en/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/category/sample/batch_upload
openapi: 3.0.0
info:
  title: DocFlow API
  description: >-
    DocFlow REST API, providing file upload and file processing result retrieval
    capabilities
  version: 2.8.4
servers:
  - url: https://docflow.textin.ai
security:
  - ApiId: []
    SecretCode: []
paths:
  /api/app-api/sip/platform/v2/category/sample/batch_upload:
    post:
      tags:
        - File Category Samples
      summary: Upload Category Samples
      description: >-
        Upload multiple sample files for the specified file category, maximum 20
        files
      operationId: batchUploadCategorySample
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: Workspace ID
                  example: '1234567890'
                category_id:
                  type: string
                  description: File category ID
                  example: '1234567890'
                files:
                  type: array
                  description: Sample file list, maximum 20 files
                  items:
                    type: string
                    format: binary
                  minItems: 1
                  maxItems: 10
                with_detail:
                  type: boolean
                  description: >-
                    When true, the response returns the full sample list of this
                    category
              required:
                - workspace_id
                - category_id
                - files
      responses:
        '200':
          description: Successfully batch uploaded samples
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          samples:
                            type: array
                            description: >-
                              Full sample list of this category (returned when
                              with_detail=true)
                            items:
                              $ref: '#/components/schemas/CategorySample'
components:
  schemas:
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: Status code
          example: 200
        msg:
          type: string
          description: Status description
      required:
        - code
        - msg
    CategorySample:
      type: object
      description: File category sample
      properties:
        sample_id:
          type: string
          description: Sample ID
          example: '1234567890'
        file_name:
          type: string
          description: File name
          example: invoice_sample.pdf
      required:
        - sample_id
        - file_name
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````