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

# Update File Category

> Update the specified file category information.

Note: Setting extract_model will cascade override the extraction model of all fields and tables under this category.




## OpenAPI

````yaml /docflow/en/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/category/update
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.com
security:
  - ApiId: []
    SecretCode: []
paths:
  /api/app-api/sip/platform/v2/category/update:
    post:
      tags:
        - File Category
      summary: Update File Category
      description: >
        Update the specified file category information.


        Note: Setting extract_model will cascade override the extraction model
        of all fields and tables under this category.
      operationId: updateCategory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: Workspace ID
                  example: '1234567890'
                category_id:
                  type: string
                  description: File category ID
                  example: '1234567890'
                name:
                  type: string
                  description: File category name
                  example: Invoice
                  maxLength: 50
                category_prompt:
                  type: string
                  description: Prompt for classification
                  example: >-
                    VAT invoice, including fields such as invoice code, invoice
                    number, etc.
                  maxLength: 150
                enabled:
                  $ref: '#/components/schemas/EnabledStatus'
                extract_model:
                  type: string
                  description: |
                    Extraction model, cascades to all fields and tables when set
                    - Model 1: Fast speed with stable extraction results
                    - Model 2: Suitable for complex document understanding
                    - Model 3: VLM, suitable for simple extraction
                  example: Model 1
                  enum:
                    - Model 1
                    - Model 2
                    - Model 3
                with_detail:
                  type: boolean
                  description: >
                    Whether to return full details. When true, the response
                    returns category self info (without child-level
                    fields/tables).

                    When not set or false, only code/msg is returned.
              required:
                - workspace_id
                - category_id
      responses:
        '200':
          description: Successfully updated file category
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        description: >-
                          Category self info when with_detail=true, otherwise
                          null
                        type: object
                        properties:
                          id:
                            type: string
                            description: Category ID
                          name:
                            type: string
                            description: Category name
                          description:
                            type: string
                            description: Category description
                          category_prompt:
                            type: string
                            description: Classification prompt
                          extract_model:
                            type: string
                            description: Extraction model
                          enabled:
                            type: integer
                            description: Enabled status
components:
  schemas:
    EnabledStatus:
      type: integer
      description: |
        Enabled status
        - 0: Disabled
        - 1: Enabled
        - 2: Draft
      enum:
        - 0
        - 1
        - 2
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: Status code
          example: 200
        msg:
          type: string
          description: Status description
      required:
        - code
        - msg
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````