> ## 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.

# 単一ファイルカテゴリテーブルを追加

> 指定したファイルカテゴリ配下に新しいテーブルを追加します

> ⚠️ このエンドポイントは現在も利用できますが、今後メンテナンスされません。代わりに [ファイルカテゴリのテーブルを追加](/api-reference/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA%E3%81%AE%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%92%E8%BF%BD%E5%8A%A0) を使用してください。




## OpenAPI

````yaml /docflow-global/ja/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/category/tables/add
openapi: 3.0.0
info:
  title: DocFlow API
  description: DocFlow REST API。ファイルアップロードとファイル処理結果の取得機能を提供します。
  version: 2.8.4
  contact:
    name: TextIn
    url: https://www.textin.ai/contact?type=27&sub_type=1
servers:
  - url: https://docflow.textin.ai
security:
  - ApiId: []
    SecretCode: []
tags:
  - name: ワークスペース管理
    description: ワークスペース関連 API
  - name: ファイルカテゴリ
    description: ファイルカテゴリ関連 API
  - name: ファイルカテゴリサンプル
    description: ファイルカテゴリサンプル関連 API
  - name: スマートレビュー
    description: スマートレビュー関連 API
  - name: 廃止済み
    description: 廃止済み API
paths:
  /api/app-api/sip/platform/v2/category/tables/add:
    post:
      tags:
        - 廃止済み
      summary: 単一ファイルカテゴリテーブルを追加
      description: >
        指定したファイルカテゴリ配下に新しいテーブルを追加します


        > ⚠️ このエンドポイントは現在も利用できますが、今後メンテナンスされません。代わりに
        [ファイルカテゴリのテーブルを追加](/api-reference/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA%E3%81%AE%E3%83%86%E3%83%BC%E3%83%96%E3%83%AB%E3%82%92%E8%BF%BD%E5%8A%A0)
        を使用してください。
      operationId: addCategoryTable
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: ワークスペース ID
                  example: '1234567890'
                category_id:
                  type: string
                  description: ファイルカテゴリ ID
                  example: '1234567890'
                name:
                  type: string
                  description: テーブル名
                  example: Table 1
                  maxLength: 50
                prompt:
                  type: string
                  description: テーブルの意味抽出プロンプト
                  example: 各行から品目名、数量、金額を抽出します
                  maxLength: 200
                collect_from_multi_table:
                  type: boolean
                  description: 複数テーブルを結合
                  example: true
                extract_model:
                  type: string
                  description: |
                    テーブルレベルの抽出モデル
                    - Auto: 抽出モデルを自動でマッチング
                    - Acgpt: 高速で安定した抽出結果
                    - Acgpt-VL: VLM。シンプルな抽出に適しています（≤10 ページ）
                    - DF-M1: 複雑な文書理解に適しています
                  example: Acgpt
                  enum:
                    - Auto
                    - Acgpt
                    - Acgpt-VL
                    - DF-M1
                with_detail:
                  type: boolean
                  description: |
                    完全な詳細を返すかどうか。true の場合、レスポンスにテーブルの完全な情報（フィールドリストを含む）が含まれます。
                    未設定または false の場合、table_id のみを返します。
              required:
                - workspace_id
                - category_id
                - name
      responses:
        '200':
          description: ファイルカテゴリテーブルの追加に成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          table_id:
                            type: string
                            description: 新規テーブル ID
                            example: '1234567890'
                          name:
                            type: string
                            description: テーブル名（with_detail=true の場合に返却）
                          description:
                            type: string
                            description: テーブルの説明（with_detail=true の場合に返却）
                          prompt:
                            type: string
                            description: テーブルの意味抽出プロンプト（with_detail=true の場合に返却）
                          collect_from_multi_table:
                            type: boolean
                            description: 複数テーブルを結合（with_detail=true の場合に返却）
                          extract_model:
                            type: string
                            description: テーブルレベルの抽出モデル（with_detail=true の場合に返却）
                          fields:
                            type: array
                            description: テーブルフィールドリスト（with_detail=true の場合に返却）
                            items:
                              $ref: '#/components/schemas/CategoryField'
                        required:
                          - table_id
components:
  schemas:
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: ステータスコード
          example: 200
        msg:
          type: string
          description: ステータス説明
      required:
        - code
        - msg
    CategoryField:
      allOf:
        - $ref: '#/components/schemas/CategoryFieldConfig'
        - type: object
          properties:
            id:
              type: string
              description: フィールド ID
              example: '1234567890'
            enabled:
              $ref: '#/components/schemas/EnabledStatus'
            extract_model:
              type: string
              description: >
                フィールド抽出モデル

                - Auto: 抽出モデルを自動でマッチング

                - Acgpt: 高速で安定した抽出結果

                - Acgpt-VL: VLM。シンプルな抽出に適しています（≤10 ページ）

                - DF-M1: 複雑な文書理解に適しています

                -
                テーブルフィールドではテーブルモデルを継承し、通常フィールドではフィールド単位の設定を使用します。既存データはカテゴリ設定から推定されます
              example: Acgpt
    CategoryFieldConfig:
      type: object
      properties:
        name:
          type: string
          description: フィールド名
          example: インボイスコード
        description:
          type: string
          description: フィールドの説明
          example: インボイスコードの説明
        prompt:
          type: string
          description: 意味抽出プロンプト
        use_prompt:
          type: boolean
          description: 意味抽出プロンプトを使用するかどうか
        alias:
          type: array
          description: 'フィールド別名。更新時: 省略=変更なし、空配列 []=別名をクリア、空でない配列=上書き'
          items:
            type: string
          example:
            - インボイス No.
            - 請求書番号
        identity:
          type: string
          description: 'エクスポート時のフィールド名。更新時: 省略=変更なし、空文字列 ""=クリア、空でない値=上書き'
          example: invoice_number
        multi_value:
          type: boolean
          description: 複数値抽出を有効にするかどうか
        duplicate_value_distinct:
          type: boolean
          description: multi_value が true の場合のみ有効な重複値除去を行うかどうか
        transform_settings:
          $ref: '#/components/schemas/TransformSettings'
    EnabledStatus:
      type: integer
      description: |
        有効化ステータス
        - 0: 無効
        - 1: 有効
        - 2: 下書き
      enum:
        - 0
        - 1
        - 2
    TransformSettings:
      type: object
      description: フィールド出力変換設定。抽出結果を出力前に整形します。
      properties:
        type:
          type: string
          description: |
            変換タイプ。適用する変換ルールを決定します:
            - `datetime`: 抽出結果を指定した日付形式に正規化します
            - `enumerate`: 抽出結果を事前設定された列挙値のいずれかに制限します
            - `regex`: 正規表現で抽出結果をマッチングして置換します
          enum:
            - datetime
            - enumerate
            - regex
        datetime_settings:
          type: object
          description: 日時フォーマット設定。type=datetime の場合は必須です。
          properties:
            format:
              type: string
              description: 対象の日付形式。抽出結果はこの形式に正規化されます。
              example: yyyy-MM-dd
        enumerate_settings:
          type: object
          description: 列挙制約設定。type=enumerate の場合は必須です。
          properties:
            items:
              type: array
              description: 許可される列挙値。抽出結果がこのリストに含まれない場合は mismatch_action が適用されます。
              items:
                type: string
              example:
                - VAT 専用インボイス
                - VAT 一般インボイス
                - 電子インボイス
        regex_settings:
          type: object
          description: 正規表現変換設定。type=regex の場合は必須です。
          properties:
            match:
              type: string
              description: 抽出結果をマッチングまたはキャプチャする正規表現パターン
              example: ^(\d{4})-(\d{2})-(\d{2})$
            replace:
              type: string
              description: 置換式。$1、$2 などのキャプチャグループ参照をサポートします
              example: $1/$2/$3
        mismatch_action:
          type: object
          description: 変換ルールに一致しない抽出結果の処理方法（すべてのタイプに適用、任意）。
          properties:
            mode:
              type: string
              description: |
                処理モード:
                - `default`: 指定したデフォルト値を出力します（default_value が必要）
                - `warning`: 元の抽出結果を保持し、手動レビュー用の警告を付けます
              enum:
                - default
                - warning
            default_value:
              type: string
              description: mode=default の場合の出力値
              example: N/A
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````