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

# Post apiaiv1kb bulk



## OpenAPI

````yaml /api/openapi.ai.json post /api/ai/v1/kb/{id}/bulk
openapi: 3.0.0
info:
  title: Xpert AI
  description: ''
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/ai/v1/kb/{id}/bulk:
    post:
      tags:
        - AI/v1
      operationId: AIV1Controller_createDocBulk
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        description: Knowledge documents
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/KnowledgeDocument'
      responses:
        '201':
          description: ''
      security:
        - bearer: []
components:
  schemas:
    KnowledgeDocument:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        disabled:
          type: boolean
        sourceConfig:
          type: object
        category:
          type: string
          enum:
            - text
            - image
            - audio
            - video
            - sheet
            - other
          description: Category of the document
        type:
          type: string
          description: Type of the file
        knowledgebase:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Knowledgebase'
        knowledgebaseId:
          type: string
          readOnly: true
        storageFile:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/StorageFile'
        storageFileId:
          type: string
          format: uuid
          description: Storage file ID
        thumbnail:
          type: string
        parserId:
          type: string
        parserConfig:
          type: object
          description: Parser Config
          example:
            chunkSize: 1000
            chunkOverlap: 100
            delimiter: ; , .
        name:
          type: string
        filePath:
          type: string
        fileUrl:
          type: string
        folder:
          type: string
        size:
          type: number
        mimeType:
          type: string
        tokenNum:
          type: number
        chunkNum:
          type: number
        progress:
          type: number
        processMsg:
          type: string
        processBeginAt:
          format: date-time
          type: string
        processDuation:
          type: number
        status:
          type: string
          enum:
            - waiting
            - validate
            - running
            - transformed
            - splitted
            - understood
            - embedding
            - cancel
            - finish
            - error
          description: Status of the document process
        jobId:
          type: string
        options:
          type: object
        metadata:
          type: object
        draft:
          type: object
        parent:
          description: Parent document
          allOf:
            - $ref: '#/components/schemas/KnowledgeDocument'
        integration:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Integration'
        integrationId:
          type: string
          readOnly: true
        pages:
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeDocumentPage'
        chunks:
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeDocumentChunk'
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - disabled
        - knowledgebase
        - knowledgebaseId
        - storageFile
        - storageFileId
        - parserConfig
        - integration
        - integrationId
        - pages
        - chunks
    Tenant:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        name:
          type: string
        organizations:
          $ref: '#/components/schemas/Organization'
        rolePermissions:
          $ref: '#/components/schemas/RolePermission'
        featureOrganizations:
          $ref: '#/components/schemas/FeatureOrganization'
        settings:
          $ref: '#/components/schemas/TenantSetting'
        importRecords:
          $ref: '#/components/schemas/ImportRecord'
      required:
        - createdAt
        - updatedAt
        - name
        - organizations
        - rolePermissions
        - featureOrganizations
        - settings
        - importRecords
    Organization:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        name:
          type: string
        isDefault:
          type: boolean
        profile_link:
          type: string
          minLength: 3
          maxLength: 100
        banner:
          type: string
          maxLength: 300
        totalEmployees:
          type: number
          maxLength: 4
        short_description:
          type: string
          maxLength: 600
        client_focus:
          type: string
        overview:
          type: string
        imageUrl:
          type: string
          maxLength: 500
        currency:
          type: string
          enum:
            - AFN
            - AFA
            - ALL
            - ALK
            - DZD
            - ADP
            - AOA
            - AOK
            - AON
            - AOR
            - ARA
            - ARS
            - ARM
            - ARP
            - ARL
            - AMD
            - AWG
            - AUD
            - ATS
            - AZN
            - AZM
            - BSD
            - BHD
            - BDT
            - BBD
            - BYN
            - BYB
            - BYR
            - BEF
            - BEC
            - BEL
            - BZD
            - BMD
            - BTN
            - BOB
            - BOL
            - BOV
            - BOP
            - BAM
            - BAD
            - BAN
            - BWP
            - BRC
            - BRZ
            - BRE
            - BRR
            - BRN
            - BRB
            - BRL
            - GBP
            - BND
            - BGL
            - BGN
            - BGO
            - BGM
            - BUK
            - BIF
            - XPF
            - KHR
            - CAD
            - CVE
            - KYD
            - XAF
            - CLE
            - CLP
            - CLF
            - CNX
            - CNY
            - COP
            - COU
            - KMF
            - CDF
            - CRC
            - HRD
            - HRK
            - CUC
            - CUP
            - CYP
            - CZK
            - CSK
            - DKK
            - DJF
            - DOP
            - NLG
            - XCD
            - DDM
            - ECS
            - ECV
            - EGP
            - GQE
            - ERN
            - EEK
            - ETB
            - EUR
            - XEU
            - FKP
            - FJD
            - FIM
            - FRF
            - XFO
            - XFU
            - GMD
            - GEK
            - GEL
            - DEM
            - GHS
            - GHC
            - GIP
            - GRD
            - GTQ
            - GWP
            - GNF
            - GNS
            - GYD
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - ISJ
            - INR
            - IDR
            - IRR
            - IQD
            - IEP
            - ILS
            - ILP
            - ILR
            - ITL
            - JMD
            - JPY
            - JOD
            - KZT
            - KES
            - KWD
            - KGS
            - LAK
            - LVL
            - LVR
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - LTT
            - LUL
            - LUC
            - LUF
            - MOP
            - MKD
            - MKN
            - MGA
            - MGF
            - MWK
            - MYR
            - MVR
            - MVP
            - MLF
            - MTL
            - MTP
            - MRO
            - MUR
            - MXV
            - MXN
            - MXP
            - MDC
            - MDL
            - MCF
            - MNT
            - MAD
            - MAF
            - MZE
            - MZN
            - MZM
            - MMK
            - NAD
            - NPR
            - ANG
            - TWD
            - NZD
            - NIO
            - NIC
            - NGN
            - KPW
            - NOK
            - OMR
            - PKR
            - PAB
            - PGK
            - PYG
            - PEI
            - PEN
            - PES
            - PHP
            - PLN
            - PLZ
            - PTE
            - GWE
            - QAR
            - XRE
            - RHD
            - RON
            - ROL
            - RUB
            - RUR
            - RWF
            - SVC
            - WST
            - SAR
            - RSD
            - CSD
            - SCR
            - SLL
            - SGD
            - SKK
            - SIT
            - SBD
            - SOS
            - ZAR
            - ZAL
            - KRH
            - KRW
            - KRO
            - SSP
            - SUR
            - ESP
            - ESA
            - ESB
            - LKR
            - SHP
            - SDD
            - SDG
            - SDP
            - SRD
            - SRG
            - SZL
            - SEK
            - CHF
            - SYP
            - STD
            - TJR
            - TJS
            - TZS
            - THB
            - TPE
            - TOP
            - TTD
            - TND
            - TRY
            - TRL
            - TMT
            - TMM
            - USD
            - USN
            - USS
            - UGX
            - UGS
            - UAH
            - UAK
            - AED
            - UYU
            - UYP
            - UYI
            - UZS
            - VUV
            - VEF
            - VEB
            - VND
            - VNN
            - CHE
            - CHW
            - XOF
            - YDD
            - YER
            - YUN
            - YUD
            - YUM
            - YUR
            - ZRN
            - ZRZ
            - ZMW
            - ZMK
            - ZWD
            - ZWR
            - ZWL
        valueDate:
          format: date-time
          type: string
        defaultValueDateType:
          type: string
          enum:
            - TODAY
            - END_OF_MONTH
            - START_OF_MONTH
        isActive:
          type: boolean
          default: true
        defaultAlignmentType:
          type: string
        timeZone:
          type: string
        regionCode:
          type: string
        brandColor:
          type: string
        dateFormat:
          type: string
        officialName:
          type: string
        startWeekOn:
          type: string
          enum:
            - MONDAY
            - TUESDAY
            - WEDNESDAY
            - THURSDAY
            - FRIDAY
            - SATURDAY
            - SUNDAY
        taxId:
          type: string
          maxLength: 256
        numberFormat:
          type: string
        minimumProjectSize:
          type: string
          enum:
            - 1000+
            - 5000+
            - 10000+
            - 25000+
            - 50000+
            - 100000+
        bonusType:
          type: string
          enum:
            - PROFIT_BASED_BONUS
            - REVENUE_BASED_BONUS
        bonusPercentage:
          type: number
        invitesAllowed:
          type: boolean
        createdDemo:
          type: boolean
        show_income:
          type: boolean
        show_profits:
          type: boolean
        show_bonuses_paid:
          type: boolean
        show_total_hours:
          type: boolean
        show_minimum_project_size:
          type: boolean
        show_projects_count:
          type: boolean
        show_clients_count:
          type: boolean
        show_clients:
          type: boolean
        show_employees_count:
          type: boolean
        inviteExpiryPeriod:
          type: number
        fiscalStartDate:
          format: date-time
          type: string
        fiscalEndDate:
          format: date-time
          type: string
        registrationDate:
          format: date-time
          type: string
        futureDateAllowed:
          type: boolean
        allowManualTime:
          type: boolean
        allowModifyTime:
          type: boolean
        allowDeleteTime:
          type: boolean
        requireReason:
          type: boolean
        requireDescription:
          type: boolean
        requireProject:
          type: boolean
        requireTask:
          type: boolean
        requireClient:
          type: boolean
        timeFormat:
          type: number
          enum:
            - 12
            - 24
        separateInvoiceItemTaxAndDiscount:
          type: boolean
        website:
          type: string
        fiscalInformation:
          type: string
        currencyPosition:
          type: string
          enum:
            - LEFT
            - RIGHT
        discountAfterTax:
          type: boolean
        defaultStartTime:
          type: string
        defaultEndTime:
          type: string
        defaultInvoiceEstimateTerms:
          type: string
        convertAcceptedEstimates:
          type: boolean
        daysUntilDue:
          type: number
        preferredLanguage:
          type: string
          enum:
            - zh-CN
            - zh-Hans
            - zh-Hant
            - en
        contact:
          $ref: '#/components/schemas/Contact'
        contactId:
          type: string
          readOnly: true
        employees:
          $ref: '#/components/schemas/Employee'
        languages:
          $ref: '#/components/schemas/OrganizationLanguage'
        featureOrganizations:
          $ref: '#/components/schemas/FeatureOrganization'
        tags:
          $ref: '#/components/schemas/Tag'
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - name
        - isDefault
        - profile_link
        - banner
        - totalEmployees
        - short_description
        - client_focus
        - overview
        - currency
        - defaultValueDateType
        - isActive
        - defaultAlignmentType
        - timeZone
        - regionCode
        - brandColor
        - dateFormat
        - officialName
        - startWeekOn
        - taxId
        - numberFormat
        - minimumProjectSize
        - bonusType
        - bonusPercentage
        - invitesAllowed
        - createdDemo
        - show_income
        - show_profits
        - show_bonuses_paid
        - show_total_hours
        - show_minimum_project_size
        - show_projects_count
        - show_clients_count
        - show_clients
        - show_employees_count
        - inviteExpiryPeriod
        - fiscalStartDate
        - fiscalEndDate
        - registrationDate
        - futureDateAllowed
        - allowManualTime
        - allowModifyTime
        - allowDeleteTime
        - requireReason
        - requireDescription
        - requireProject
        - requireTask
        - requireClient
        - timeFormat
        - website
        - fiscalInformation
        - preferredLanguage
        - contact
        - contactId
        - employees
        - languages
        - featureOrganizations
        - tags
    Knowledgebase:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        workspace:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/XpertWorkspace'
        workspaceId:
          type: string
          readOnly: true
        publishAt:
          type: string
          format: date-time
          example: '2023-11-21T06:20:32.232Z'
        deletedAt:
          type: string
          format: date-time
          example: '2024-10-14T06:20:32.232Z'
        name:
          type: string
        type:
          allOf:
            - $ref: '#/components/schemas/KnowledgebaseTypeEnum'
        structure:
          allOf:
            - $ref: '#/components/schemas/KnowledgeStructureEnum'
        language:
          type: string
        avatar:
          type: object
        description:
          type: string
        permission:
          type: string
          enum:
            - private
            - organization
            - public
        copilotModel:
          $ref: '#/components/schemas/CopilotModel'
        copilotModelId:
          type: string
        rerankModel:
          $ref: '#/components/schemas/CopilotModel'
        rerankModelId:
          type: string
        visionModel:
          $ref: '#/components/schemas/CopilotModel'
        visionModelId:
          type: string
        documentNum:
          type: number
        tokenNum:
          type: number
        chunkNum:
          type: number
        similarityThreshold:
          type: number
        vectorSimilarityWeight:
          type: number
        recall:
          type: object
        parserId:
          type: string
        parserConfig:
          type: object
        status:
          type: string
        metadataSchema:
          type: object
        apiEnabled:
          type: boolean
        extKnowledgebaseId:
          type: string
        documents:
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeDocument'
        integration:
          $ref: '#/components/schemas/Integration'
        integrationId:
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - workspace
        - workspaceId
        - publishAt
        - permission
        - copilotModel
        - copilotModelId
        - rerankModel
        - rerankModelId
        - visionModel
        - visionModelId
        - apiEnabled
        - integration
        - integrationId
    StorageFile:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        file:
          type: string
        url:
          type: string
        thumb:
          type: string
        originalName:
          type: string
        encoding:
          type: string
        recordedAt:
          format: date-time
          type: string
        deletedAt:
          format: date-time
          type: string
        size:
          type: number
        mimetype:
          type: string
        storageProvider:
          type: string
          enum:
            - LOCAL
            - S3
            - WASABI
            - OSS
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - file
        - url
        - thumb
        - originalName
        - encoding
        - recordedAt
        - deletedAt
        - size
        - mimetype
    Integration:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        avatar:
          type: object
        slug:
          type: string
          minLength: 10
          maxLength: 100
        provider:
          type: string
        options:
          type: object
        features:
          type: object
        tags:
          $ref: '#/components/schemas/Tag'
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - name
        - slug
        - provider
        - tags
    KnowledgeDocumentPage:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        knowledgebase:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Knowledgebase'
        knowledgebaseId:
          type: string
          readOnly: true
        document:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/KnowledgeDocument'
        documentId:
          type: string
          readOnly: true
        pageContent:
          type: string
        metadata:
          type: object
        status:
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - knowledgebase
        - knowledgebaseId
        - document
        - documentId
    KnowledgeDocumentChunk:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        pageContent:
          type: string
        metadata:
          type: object
        status:
          type: string
        parent:
          description: Parent document chunk
          allOf:
            - $ref: '#/components/schemas/KnowledgeDocumentChunk'
        knowledgebase:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Knowledgebase'
        knowledgebaseId:
          type: string
          readOnly: true
        document:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/KnowledgeDocument'
        documentId:
          type: string
          readOnly: true
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - knowledgebase
        - knowledgebaseId
        - document
        - documentId
    RolePermission:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        permission:
          type: string
          enum:
            - SUPER_ADMIN
            - ADMIN
            - DATA_ENTRY
            - EMPLOYEE
            - CANDIDATE
            - MANAGER
            - VIEWER
            - TRIAL
        enabled:
          type: boolean
          default: false
        roleId:
          type: string
          enum:
            - SUPER_ADMIN
            - ADMIN
            - DATA_ENTRY
            - EMPLOYEE
            - CANDIDATE
            - MANAGER
            - VIEWER
            - TRIAL
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - permission
        - roleId
    FeatureOrganization:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        feature:
          $ref: '#/components/schemas/Feature'
        featureId:
          type: string
          readOnly: true
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - feature
        - featureId
    TenantSetting:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        name:
          type: string
        value:
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - name
        - value
    ImportRecord:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        entityType:
          type: string
        sourceId:
          type: string
        destinationId:
          type: string
        importDate:
          format: date-time
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - entityType
        - sourceId
        - destinationId
        - importDate
    Contact:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        name:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        country:
          type: string
        city:
          type: string
        address:
          type: string
        address2:
          type: string
        postcode:
          type: string
        latitude:
          type: number
        longitude:
          type: number
        regionCode:
          type: string
        fax:
          type: string
        fiscalInformation:
          type: string
        website:
          type: string
        organization_contacts:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationContact'
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - name
        - firstName
        - lastName
        - country
        - city
        - address
        - address2
        - regionCode
        - organization_contacts
    Employee:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        valueDate:
          format: date-time
          type: string
        isActive:
          type: boolean
          default: true
        short_description:
          type: string
          maxLength: 200
        description:
          type: string
        startedWorkOn:
          format: date-time
          type: string
        endWork:
          format: date-time
          type: string
        payPeriod:
          type: string
          enum:
            - NONE
            - BI_WEEKLY
            - WEEKLY
            - TWICE_PER_MONTH
            - MONTHLY
        billRateValue:
          type: number
        billRateCurrency:
          type: string
          enum:
            - AFN
            - AFA
            - ALL
            - ALK
            - DZD
            - ADP
            - AOA
            - AOK
            - AON
            - AOR
            - ARA
            - ARS
            - ARM
            - ARP
            - ARL
            - AMD
            - AWG
            - AUD
            - ATS
            - AZN
            - AZM
            - BSD
            - BHD
            - BDT
            - BBD
            - BYN
            - BYB
            - BYR
            - BEF
            - BEC
            - BEL
            - BZD
            - BMD
            - BTN
            - BOB
            - BOL
            - BOV
            - BOP
            - BAM
            - BAD
            - BAN
            - BWP
            - BRC
            - BRZ
            - BRE
            - BRR
            - BRN
            - BRB
            - BRL
            - GBP
            - BND
            - BGL
            - BGN
            - BGO
            - BGM
            - BUK
            - BIF
            - XPF
            - KHR
            - CAD
            - CVE
            - KYD
            - XAF
            - CLE
            - CLP
            - CLF
            - CNX
            - CNY
            - COP
            - COU
            - KMF
            - CDF
            - CRC
            - HRD
            - HRK
            - CUC
            - CUP
            - CYP
            - CZK
            - CSK
            - DKK
            - DJF
            - DOP
            - NLG
            - XCD
            - DDM
            - ECS
            - ECV
            - EGP
            - GQE
            - ERN
            - EEK
            - ETB
            - EUR
            - XEU
            - FKP
            - FJD
            - FIM
            - FRF
            - XFO
            - XFU
            - GMD
            - GEK
            - GEL
            - DEM
            - GHS
            - GHC
            - GIP
            - GRD
            - GTQ
            - GWP
            - GNF
            - GNS
            - GYD
            - HTG
            - HNL
            - HKD
            - HUF
            - ISK
            - ISJ
            - INR
            - IDR
            - IRR
            - IQD
            - IEP
            - ILS
            - ILP
            - ILR
            - ITL
            - JMD
            - JPY
            - JOD
            - KZT
            - KES
            - KWD
            - KGS
            - LAK
            - LVL
            - LVR
            - LBP
            - LSL
            - LRD
            - LYD
            - LTL
            - LTT
            - LUL
            - LUC
            - LUF
            - MOP
            - MKD
            - MKN
            - MGA
            - MGF
            - MWK
            - MYR
            - MVR
            - MVP
            - MLF
            - MTL
            - MTP
            - MRO
            - MUR
            - MXV
            - MXN
            - MXP
            - MDC
            - MDL
            - MCF
            - MNT
            - MAD
            - MAF
            - MZE
            - MZN
            - MZM
            - MMK
            - NAD
            - NPR
            - ANG
            - TWD
            - NZD
            - NIO
            - NIC
            - NGN
            - KPW
            - NOK
            - OMR
            - PKR
            - PAB
            - PGK
            - PYG
            - PEI
            - PEN
            - PES
            - PHP
            - PLN
            - PLZ
            - PTE
            - GWE
            - QAR
            - XRE
            - RHD
            - RON
            - ROL
            - RUB
            - RUR
            - RWF
            - SVC
            - WST
            - SAR
            - RSD
            - CSD
            - SCR
            - SLL
            - SGD
            - SKK
            - SIT
            - SBD
            - SOS
            - ZAR
            - ZAL
            - KRH
            - KRW
            - KRO
            - SSP
            - SUR
            - ESP
            - ESA
            - ESB
            - LKR
            - SHP
            - SDD
            - SDG
            - SDP
            - SRD
            - SRG
            - SZL
            - SEK
            - CHF
            - SYP
            - STD
            - TJR
            - TJS
            - TZS
            - THB
            - TPE
            - TOP
            - TTD
            - TND
            - TRY
            - TRL
            - TMT
            - TMM
            - USD
            - USN
            - USS
            - UGX
            - UGS
            - UAH
            - UAK
            - AED
            - UYU
            - UYP
            - UYI
            - UZS
            - VUV
            - VEF
            - VEB
            - VND
            - VNN
            - CHE
            - CHW
            - XOF
            - YDD
            - YER
            - YUN
            - YUD
            - YUM
            - YUR
            - ZRN
            - ZRZ
            - ZMW
            - ZMK
            - ZWD
            - ZWR
            - ZWL
        reWeeklyLimit:
          type: number
        offerDate:
          format: date-time
          type: string
        acceptDate:
          format: date-time
          type: string
        rejectDate:
          format: date-time
          type: string
        employeeLevel:
          type: string
          maxLength: 500
        anonymousBonus:
          type: boolean
        averageIncome:
          type: number
        averageBonus:
          type: number
        totalWorkHours:
          type: number
        averageExpenses:
          type: number
        show_anonymous_bonus:
          type: boolean
        show_average_bonus:
          type: boolean
        show_average_expenses:
          type: boolean
        show_average_income:
          type: boolean
        show_billrate:
          type: boolean
        show_payperiod:
          type: boolean
        show_start_work_on:
          type: boolean
        isJobSearchActive:
          type: boolean
        linkedInUrl:
          type: string
        facebookUrl:
          type: string
        instagramUrl:
          type: string
        twitterUrl:
          type: string
        githubUrl:
          type: string
        gitlabUrl:
          type: string
        upworkUrl:
          type: string
        isVerified:
          type: boolean
        isVetted:
          type: boolean
        totalJobs:
          type: number
        jobSuccess:
          type: number
        user:
          $ref: '#/components/schemas/User'
        userId:
          type: string
          readOnly: true
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - payPeriod
        - billRateValue
        - billRateCurrency
        - reWeeklyLimit
        - averageIncome
        - averageBonus
        - totalWorkHours
        - averageExpenses
        - show_anonymous_bonus
        - show_average_bonus
        - show_average_expenses
        - show_average_income
        - show_billrate
        - show_payperiod
        - show_start_work_on
        - isJobSearchActive
        - isVerified
        - isVetted
        - totalJobs
        - jobSuccess
        - user
        - userId
    OrganizationLanguage:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        language:
          $ref: '#/components/schemas/Language'
        languageCode:
          type: string
          readOnly: true
        name:
          type: string
        level:
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - language
        - languageCode
        - name
        - level
    Tag:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        name:
          type: string
        category:
          type: string
          enum:
            - indicator
            - story
            - toolset
            - xpert
        label:
          type: object
        description:
          type: string
        color:
          type: string
        icon:
          type: string
        isSystem:
          type: boolean
          default: false
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - name
        - category
        - description
        - color
        - icon
        - isSystem
    XpertWorkspace:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        status:
          type: string
        settings:
          type: object
        owner:
          $ref: '#/components/schemas/User'
        ownerId:
          type: string
        environments:
          type: array
          items:
            $ref: '#/components/schemas/Environment'
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - owner
        - ownerId
    KnowledgebaseTypeEnum:
      type: string
      enum:
        - standard
        - external
    KnowledgeStructureEnum:
      type: string
      enum:
        - general
        - parent-child
        - qa
    CopilotModel:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        modelType:
          type: string
          enum:
            - llm
            - text-embedding
            - rerank
            - speech2text
            - moderation
            - tts
            - text2img
        model:
          type: string
        options:
          type: object
        copilot:
          $ref: '#/components/schemas/Copilot'
        copilotId:
          type: string
        referencedModel:
          $ref: '#/components/schemas/CopilotModel'
        referencedId:
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - copilot
        - copilotId
        - referencedModel
        - referencedId
    Feature:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        name:
          type: string
        code:
          type: string
        isPaid:
          type: boolean
          default: false
        description:
          type: string
          readOnly: true
        image:
          type: string
          readOnly: true
        link:
          type: string
          readOnly: true
        status:
          type: string
        icon:
          type: string
        parent:
          $ref: '#/components/schemas/Feature'
        parentId:
          type: string
        featureOrganizations:
          $ref: '#/components/schemas/FeatureOrganization'
        children:
          $ref: '#/components/schemas/Feature'
      required:
        - createdAt
        - updatedAt
        - name
        - code
        - isPaid
        - description
        - image
        - link
        - status
        - icon
        - parent
        - parentId
        - featureOrganizations
        - children
    OrganizationContact:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        name:
          type: string
        primaryEmail:
          type: string
        emailAddresses:
          type: array
          items:
            type: string
        primaryPhone:
          type: string
        phones:
          type: array
          items:
            type: string
        inviteStatus:
          type: string
          enum:
            - NOT_INVITED
            - INVITED
            - ACCEPTED
        notes:
          type: string
        contactType:
          type: string
          enum:
            - CLIENT
            - CUSTOMER
            - LEAD
        imageUrl:
          type: string
          maxLength: 500
        budget:
          type: string
        budgetType:
          type: string
        contact:
          $ref: '#/components/schemas/Contact'
        contactId:
          type: string
          readOnly: true
        tags:
          type: array
          items:
            type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - name
        - primaryEmail
        - primaryPhone
        - inviteStatus
        - contactType
        - contact
        - contactId
        - tags
    User:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        thirdPartyId:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
          minLength: 3
          maxLength: 100
        mobile:
          type: string
          minLength: 3
          maxLength: 20
        username:
          type: string
          minLength: 3
          maxLength: 20
        timeZone:
          type: string
        hash:
          type: string
        imageUrl:
          type: string
          maxLength: 500
        preferredLanguage:
          type: string
          enum:
            - zh-CN
            - zh-Hans
            - zh-Hant
            - en
        emailVerified:
          type: boolean
        deletedAt:
          format: date-time
          type: string
        role:
          $ref: '#/components/schemas/Role'
        roleId:
          type: string
          readOnly: true
        organizations:
          type: array
          items:
            $ref: '#/components/schemas/UserOrganization'
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - email
        - mobile
        - hash
        - preferredLanguage
        - emailVerified
        - roleId
        - organizations
    Language:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        name:
          type: string
        code:
          type: string
        is_system:
          type: boolean
          default: true
        description:
          type: string
        color:
          type: string
      required:
        - createdAt
        - updatedAt
        - name
        - code
        - is_system
        - description
        - color
    Environment:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        workspace:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/XpertWorkspace'
        workspaceId:
          type: string
          readOnly: true
        publishAt:
          type: string
          format: date-time
          example: '2023-11-21T06:20:32.232Z'
        deletedAt:
          type: string
          format: date-time
          example: '2024-10-14T06:20:32.232Z'
        name:
          type: string
        variables:
          type: object
        isDefault:
          type: boolean
        isArchived:
          type: boolean
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - workspace
        - workspaceId
        - publishAt
        - name
    Copilot:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        name:
          type: string
        enabled:
          type: boolean
        role:
          type: string
        showTokenizer:
          type: boolean
        options:
          type: object
        tokenBalance:
          type: number
        modelProvider:
          $ref: '#/components/schemas/CopilotProvider'
        copilotModel:
          $ref: '#/components/schemas/CopilotModel'
        copilotModelId:
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - modelProvider
        - copilotModel
        - copilotModelId
    Role:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        name:
          type: string
          enum:
            - SUPER_ADMIN
            - ADMIN
            - DATA_ENTRY
            - EMPLOYEE
            - CANDIDATE
            - MANAGER
            - VIEWER
            - TRIAL
        isSystem:
          type: boolean
          default: false
        rolePermissions:
          type: array
          items:
            $ref: '#/components/schemas/RolePermission'
        users:
          type: array
          items:
            $ref: '#/components/schemas/User'
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - name
        - isSystem
        - rolePermissions
        - users
    UserOrganization:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        isDefault:
          type: boolean
          default: true
        isActive:
          type: boolean
          default: true
        user:
          $ref: '#/components/schemas/User'
        userId:
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - isDefault
        - isActive
        - user
        - userId
    CopilotProvider:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        providerName:
          type: string
        providerType:
          type: string
        credentials:
          type: object
        isValid:
          type: boolean
        options:
          type: object
        copilot:
          $ref: '#/components/schemas/Copilot'
        copilotId:
          type: string
        models:
          type: array
          items:
            $ref: '#/components/schemas/CopilotProviderModel'
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - copilot
        - copilotId
        - models
    CopilotProviderModel:
      type: object
      properties:
        id:
          type: string
        createdById:
          type: string
        updatedById:
          type: string
        createdAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        updatedAt:
          type: string
          format: date-time
          example: '2018-11-21T06:20:32.232Z'
        tenant:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Tenant'
        tenantId:
          type: string
          readOnly: true
        organization:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/Organization'
        organizationId:
          type: string
          readOnly: true
        providerName:
          type: string
        modelName:
          type: string
        modelType:
          type: string
        modelProperties:
          type: object
        isValid:
          type: boolean
        provider:
          $ref: '#/components/schemas/CopilotProvider'
        providerId:
          type: string
      required:
        - createdAt
        - updatedAt
        - tenant
        - tenantId
        - organization
        - organizationId
        - provider
        - providerId
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````