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

# Create a new bot field



## OpenAPI

````yaml /api-reference/platform-api.json post /v1/bot-fields
openapi: 3.1.1
info:
  title: ChatbotX
  version: 0.0.1
servers:
  - url: https://app.chatbotx.io/api
security:
  - developerAccessToken: []
  - tokenInSearchParams: []
paths:
  /v1/bot-fields:
    post:
      tags:
        - Bot Fields
      summary: Create a new bot field
      operationId: createBotFieldWorkspaceTokenAPI
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                type:
                  enum:
                    - shortText
                    - email
                    - phoneNumber
                    - number
                    - date
                    - datetime
                    - boolean
                    - longText
                  type: string
                value:
                  anyOf:
                    - type: string
                      maxLength: 1000
                    - type: 'null'
                description:
                  anyOf:
                    - type: string
                      maxLength: 1000
                    - type: 'null'
                folderId:
                  anyOf:
                    - type: string
                      pattern: \d+
                    - type: 'null'
              required:
                - name
                - type
                - value
                - description
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  type:
                    enum:
                      - shortText
                      - email
                      - phoneNumber
                      - number
                      - date
                      - datetime
                      - boolean
                      - longText
                    type: string
                  value:
                    anyOf:
                      - type: string
                      - type: 'null'
                required:
                  - id
                  - name
                  - type
                  - value
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: businessError
                      status:
                        const: 400
                      message:
                        type: string
                        default: An error occurred while processing your request
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '422':
          description: '422'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: invalidRequestData
                      status:
                        const: 422
                      message:
                        type: string
                        default: Validation error
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: rateLimitExceeded
                      status:
                        const: 429
                      message:
                        type: string
                        default: Rate limit exceeded
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - $ref: '#/components/schemas/UndefinedError'
components:
  schemas:
    UndefinedError:
      type: object
      properties:
        defined:
          const: false
        code:
          type: string
        status:
          type: number
        message:
          type: string
        data: {}
      required:
        - defined
        - code
        - status
        - message
  securitySchemes:
    developerAccessToken:
      type: http
      scheme: bearer
    tokenInSearchParams:
      type: apiKey
      in: query
      name: token

````