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

# 创建空间

> 创建一个新的工作空间



## OpenAPI

````yaml /docflow/cn/rest-api/openapi.bundle.yaml post /api/app-api/sip/platform/v2/workspace/create
openapi: 3.0.0
info:
  title: DocFlow API
  description: DocFlow REST API，提供文件上传和获取文件处理结果能力
  version: 2.8.4
servers:
  - url: https://docflow.textin.com
security:
  - ApiId: []
    SecretCode: []
paths:
  /api/app-api/sip/platform/v2/workspace/create:
    post:
      tags:
        - 空间管理
      summary: 创建空间
      description: 创建一个新的工作空间
      operationId: createWorkspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 空间名称
                  example: 我的工作空间
                  maxLength: 50
                description:
                  type: string
                  description: 空间描述
                  example: 这是一个用于处理发票的工作空间
                  maxLength: 200
                auth_scope:
                  type: integer
                  description: 协作范围 0:仅自己可见 1:企业成员可见
                  example: 1
                  enum:
                    - 0
                    - 1
              required:
                - name
                - auth_scope
      responses:
        '200':
          description: 成功创建空间
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        type: object
                        properties:
                          workspace_id:
                            type: string
                            description: 空间ID
                            example: '1234567890'
components:
  schemas:
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: 状态码
          example: 200
        msg:
          type: string
          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

````