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

# Create Review Rule

> Create review rule



## OpenAPI

````yaml /docflow/en/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/review/rule/create
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/review/rule/create:
    post:
      tags:
        - Intelligent Review
      summary: Create Review Rule
      description: Create review rule
      operationId: createReviewRule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/ReviewRuleProperties'
                - type: object
                  properties:
                    workspace_id:
                      type: string
                      description: Workspace ID
                      example: '1234567890'
                    repo_id:
                      type: integer
                      description: Review rule repository ID
                      example: '31415926'
                  required:
                    - workspace_id
                    - repo_id
      responses:
        '200':
          description: Successfully created review rule
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          rule_id:
                            type: string
                            description: Review rule ID
                            example: '31415926'
                  - $ref: '#/components/schemas/CodeMessage'
components:
  schemas:
    ReviewRuleProperties:
      type: object
      properties:
        group_id:
          type: string
          description: Review rule group ID
          example: '31415926'
        name:
          type: string
          description: Rule name
          example: Review Rule 1
        prompt:
          type: string
          description: Rule prompt
          example: Review rule prompt
        category_ids:
          type: array
          items:
            type: string
            description: Category ID
            example: '1234567890'
        risk_level:
          $ref: '#/components/schemas/RiskLevel'
        referenced_fields:
          type: array
          items:
            $ref: '#/components/schemas/ReviewRuleReferencedField'
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: Status code
          example: 200
        msg:
          type: string
          description: Status description
      required:
        - code
        - msg
    RiskLevel:
      type: integer
      description: |
        Risk level
        - 10: High risk
        - 20: Medium risk
        - 30: Low risk
      enum:
        - 10
        - 20
        - 30
    ReviewRuleReferencedField:
      type: object
      properties:
        category_id:
          type: string
          description: Category ID
          example: '1234567890'
        category_name:
          type: string
          description: Category name
          example: Invoice
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ReviewRuleField'
        tables:
          type: array
          items:
            type: object
            properties:
              table_id:
                type: string
                description: Table ID
                example: '1234567890'
              table_name:
                type: string
                description: Table name
                example: Invoice Table
              fields:
                type: array
                items:
                  $ref: '#/components/schemas/ReviewRuleField'
    ReviewRuleField:
      type: object
      properties:
        field_id:
          type: string
          description: Field ID
          example: '1234567890'
        field_name:
          type: string
          description: Field name
          example: Invoice Code
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````