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

# Start chat



## OpenAPI

````yaml POST /v1/typebots/{publicId}/startChat
openapi: 3.0.3
info:
  title: Chat API
  version: 3.0.0
servers:
  - url: https://typebot.io/api
security: []
externalDocs:
  url: https://docs.typebot.com/api-reference
paths:
  /v1/typebots/{publicId}/startChat:
    post:
      summary: Start chat
      operationId: startChat
      parameters:
        - in: path
          name: publicId
          description: >-
            [Where to find my bot's public
            ID?](../how-to#how-to-find-my-publicid)
          schema:
            type: string
            description: >-
              [Where to find my bot's public
              ID?](../how-to#how-to-find-my-publicid)
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                resultId:
                  type: string
                  description: Provide it if you'd like to overwrite an existing result.
                message:
                  oneOf:
                    - $ref: '#/components/schemas/textMessage'
                    - $ref: '#/components/schemas/audioMessage'
                    - $ref: '#/components/schemas/commandMessage'
                  discriminator:
                    propertyName: type
                    mapping:
                      text:
                        $ref: '#/components/schemas/textMessage'
                      audio:
                        $ref: '#/components/schemas/audioMessage'
                      command:
                        $ref: '#/components/schemas/commandMessage'
                  description: >-
                    Only provide it if your flow starts with an input block and
                    you'd like to directly provide an answer to it.
                isStreamEnabled:
                  type: boolean
                  default: false
                  description: >-
                    If enabled, you will be required to stream OpenAI
                    completions on a client and send the generated response back
                    to the API.
                isOnlyRegistering:
                  type: boolean
                  default: false
                  description: >-
                    If set to `true`, it will only register the session and not
                    start the bot. This is used for 3rd party chat platforms as
                    it can require a session to be registered before sending the
                    first message.
                prefilledVariables:
                  type: object
                  additionalProperties: {}
                  description: >-
                    [More info about prefilled
                    variables.](../../editor/variables#prefilled-variables)
                  example:
                    First name: John
                    Email: john@gmail.com
                textBubbleContentFormat:
                  type: string
                  enum:
                    - richText
                    - markdown
                  default: richText
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sessionId:
                    type: string
                    description: To save and use for /continueChat requests.
                  resultId:
                    type: string
                  typebot:
                    type: object
                    properties:
                      id:
                        type: string
                      version:
                        anyOf:
                          - type: string
                            enum:
                              - '3'
                              - '4'
                              - '5'
                          - type: string
                            enum:
                              - '6'
                              - '6.1'
                      theme:
                        $ref: '#/components/schemas/theme'
                      settings:
                        type: object
                        properties:
                          general:
                            type: object
                            properties:
                              isBrandingEnabled:
                                type: boolean
                              isTypingEmulationEnabled:
                                type: boolean
                              isInputPrefillEnabled:
                                type: boolean
                              isHideQueryParamsEnabled:
                                type: boolean
                              isNewResultOnRefreshEnabled:
                                type: boolean
                              rememberUser:
                                type: object
                                properties:
                                  isEnabled:
                                    type: boolean
                                  storage:
                                    type: string
                                    enum:
                                      - session
                                      - local
                              systemMessages:
                                type: object
                                properties:
                                  invalidMessage:
                                    type: string
                                  botClosed:
                                    type: string
                                  networkErrorTitle:
                                    type: string
                                  networkErrorMessage:
                                    type: string
                                  popupBlockedTitle:
                                    type: string
                                  popupBlockedDescription:
                                    type: string
                                  popupBlockedButtonLabel:
                                    type: string
                                  fileUploadError:
                                    type: string
                                  fileUploadSizeError:
                                    type: string
                                  whatsAppPictureChoiceSelectLabel:
                                    type: string
                          typingEmulation:
                            type: object
                            properties:
                              enabled:
                                type: boolean
                              speed:
                                type: number
                              maxDelay:
                                type: number
                              delayBetweenBubbles:
                                type: number
                                minimum: 0
                                maximum: 5
                              isDisabledOnFirstMessage:
                                type: boolean
                      publishedAt:
                        type: string
                    required:
                      - id
                      - version
                      - theme
                      - settings
                  lastMessageNewFormat:
                    type: string
                    description: >-
                      The sent message is validated and formatted on the
                      backend. For example, if for a date input you replied
                      something like `tomorrow`, the backend will convert it to
                      a date string. This field returns the formatted message.
                  messages:
                    type: array
                    items:
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                          required:
                            - id
                        - oneOf:
                            - $ref: '#/components/schemas/textBubble'
                            - $ref: '#/components/schemas/imageBubble'
                            - $ref: '#/components/schemas/videoBubble'
                            - $ref: '#/components/schemas/audioBubble'
                            - $ref: '#/components/schemas/embedBubble'
                            - $ref: '#/components/schemas/customEmbedBubble'
                          discriminator:
                            propertyName: type
                            mapping:
                              text:
                                $ref: '#/components/schemas/textBubble'
                              image:
                                $ref: '#/components/schemas/imageBubble'
                              video:
                                $ref: '#/components/schemas/videoBubble'
                              audio:
                                $ref: '#/components/schemas/audioBubble'
                              embed:
                                $ref: '#/components/schemas/embedBubble'
                              custom-embed:
                                $ref: '#/components/schemas/customEmbedBubble'
                  input:
                    allOf:
                      - anyOf:
                          - oneOf:
                              - $ref: '#/components/schemas/textInput'
                              - $ref: '#/components/schemas/buttonsInput'
                              - $ref: '#/components/schemas/email'
                              - $ref: '#/components/schemas/numberInput'
                              - $ref: '#/components/schemas/url'
                              - $ref: '#/components/schemas/phoneNumberInput'
                              - $ref: '#/components/schemas/dateInput'
                              - $ref: '#/components/schemas/time'
                              - $ref: '#/components/schemas/paymentInput'
                              - $ref: '#/components/schemas/rating'
                              - $ref: '#/components/schemas/fileInput'
                              - $ref: '#/components/schemas/pictureChoice'
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  outgoingEdgeId:
                                    type: string
                                  type:
                                    type: string
                                    enum:
                                      - cards
                                  items:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                        outgoingEdgeId:
                                          type: string
                                        options:
                                          type: object
                                          properties:
                                            displayCondition:
                                              type: object
                                              properties:
                                                isEnabled:
                                                  type: boolean
                                                condition:
                                                  type: object
                                                  properties:
                                                    logicalOperator:
                                                      type: string
                                                      enum:
                                                        - OR
                                                        - AND
                                                    comparisons:
                                                      type: array
                                                      items:
                                                        type: object
                                                        properties:
                                                          id:
                                                            type: string
                                                          variableId:
                                                            type: string
                                                          comparisonOperator:
                                                            type: string
                                                            enum:
                                                              - Equal to
                                                              - Not equal
                                                              - Contains
                                                              - Does not contain
                                                              - Greater than
                                                              - Greater or equal to
                                                              - Less than
                                                              - Less or equal to
                                                              - Is set
                                                              - Is empty
                                                              - Starts with
                                                              - Ends with
                                                              - Matches regex
                                                              - Does not match regex
                                                          value:
                                                            type: string
                                                        required:
                                                          - id
                                            internalValue:
                                              type: string
                                              nullable: true
                                        imageUrl:
                                          type: string
                                          nullable: true
                                        title:
                                          type: string
                                          nullable: true
                                        description:
                                          type: string
                                          nullable: true
                                        paths:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              id:
                                                type: string
                                              text:
                                                type: string
                                              outgoingEdgeId:
                                                type: string
                                            required:
                                              - id
                                      required:
                                        - id
                                  options:
                                    type: object
                                    properties:
                                      variableId:
                                        type: string
                                      saveResponseMapping:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            field:
                                              type: string
                                              enum:
                                                - Image URL
                                                - Title
                                                - Description
                                                - Button
                                                - Internal Value
                                            variableId:
                                              type: string
                                required:
                                  - id
                                  - type
                                  - items
                          - oneOf:
                              - $ref: '#/components/schemas/buttonsInputV5'
                              - $ref: '#/components/schemas/fileInputV5'
                              - $ref: '#/components/schemas/pictureChoiceV5'
                            discriminator:
                              propertyName: type
                              mapping:
                                choice input:
                                  $ref: '#/components/schemas/buttonsInputV5'
                                file input:
                                  $ref: '#/components/schemas/fileInputV5'
                                picture choice input:
                                  $ref: '#/components/schemas/pictureChoiceV5'
                      - type: object
                        properties:
                          prefilledValue:
                            type: string
                          runtimeOptions:
                            type: object
                            properties:
                              paymentIntentSecret:
                                type: string
                              amountLabel:
                                type: string
                              publicKey:
                                type: string
                            required:
                              - paymentIntentSecret
                              - amountLabel
                              - publicKey
                  clientSideActions:
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/csaScriptToExecute'
                        - $ref: '#/components/schemas/csaRedirect'
                        - $ref: '#/components/schemas/csaChatwoot'
                        - $ref: '#/components/schemas/csaGa'
                        - $ref: '#/components/schemas/csaWait'
                        - $ref: '#/components/schemas/csaSetVariable'
                        - $ref: '#/components/schemas/csaStreamOpenAiChatCompletion'
                        - $ref: '#/components/schemas/csaHttpRequestToExecute'
                        - $ref: '#/components/schemas/csaInjectStartProps'
                        - $ref: '#/components/schemas/csaPixel'
                        - $ref: '#/components/schemas/csaStream'
                        - $ref: '#/components/schemas/csaCodeToExecute'
                        - $ref: '#/components/schemas/csaListenForWebhook'
                      discriminator:
                        propertyName: type
                        mapping:
                          scriptToExecute:
                            $ref: '#/components/schemas/csaScriptToExecute'
                          redirect:
                            $ref: '#/components/schemas/csaRedirect'
                          chatwoot:
                            $ref: '#/components/schemas/csaChatwoot'
                          googleAnalytics:
                            $ref: '#/components/schemas/csaGa'
                          wait:
                            $ref: '#/components/schemas/csaWait'
                          setVariable:
                            $ref: '#/components/schemas/csaSetVariable'
                          streamOpenAiChatCompletion:
                            $ref: '#/components/schemas/csaStreamOpenAiChatCompletion'
                          httpRequestToExecute:
                            $ref: '#/components/schemas/csaHttpRequestToExecute'
                          startPropsToInject:
                            $ref: '#/components/schemas/csaInjectStartProps'
                          pixel:
                            $ref: '#/components/schemas/csaPixel'
                          stream:
                            $ref: '#/components/schemas/csaStream'
                          codeToExecute:
                            $ref: '#/components/schemas/csaCodeToExecute'
                          listenForWebhook:
                            $ref: '#/components/schemas/csaListenForWebhook'
                    description: Actions to execute on the client side
                  logs:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: string
                        description:
                          type: string
                        details:
                          type: string
                        context:
                          type: string
                      required:
                        - description
                    description: Logs that were saved during the last execution
                  dynamicTheme:
                    type: object
                    properties:
                      hostAvatarUrl:
                        type: string
                      guestAvatarUrl:
                        type: string
                      backgroundUrl:
                        type: string
                    description: >-
                      If the typebot contains dynamic avatars, dynamicTheme
                      returns the new avatar URLs whenever their variables are
                      updated.
                  progress:
                    type: number
                    description: >-
                      If progress bar is enabled, this field will return a
                      number between 0 and 100 indicating the current progress
                      based on the longest remaining path of the flow.
                required:
                  - sessionId
                  - typebot
                  - messages
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
      security:
        - Authorization: []
components:
  schemas:
    textMessage:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
        metadata:
          type: object
          properties:
            replyId:
              type: string
        attachedFileUrls:
          type: array
          items:
            type: string
          description: >-
            Can only be provided if current input block is a text input block
            that allows attachments
      required:
        - type
        - text
      title: Text
    audioMessage:
      type: object
      properties:
        type:
          type: string
          enum:
            - audio
        url:
          type: string
      required:
        - type
        - url
      description: >-
        Can only be provided if current input block is a text input block that
        allows audio clips
      title: Audio
    commandMessage:
      type: object
      properties:
        type:
          type: string
          enum:
            - command
        command:
          type: string
      required:
        - type
        - command
      title: Command
    theme:
      type: object
      properties:
        general:
          type: object
          properties:
            font:
              anyOf:
                - type: string
                - oneOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - Google
                        family:
                          type: string
                      required:
                        - type
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - Custom
                        family:
                          type: string
                        css:
                          type: string
                        url:
                          type: string
                          description: Deprecated, use `css` instead
                      required:
                        - type
            background:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - Color
                    - Image
                    - None
                content:
                  type: string
            progressBar:
              type: object
              properties:
                isEnabled:
                  type: boolean
                color:
                  type: string
                backgroundColor:
                  type: string
                placement:
                  type: string
                  enum:
                    - Top
                    - Bottom
                thickness:
                  type: number
                position:
                  type: string
                  enum:
                    - fixed
                    - absolute
        chat:
          type: object
          properties:
            container:
              type: object
              properties:
                maxWidth:
                  type: string
                maxHeight:
                  type: string
                backgroundColor:
                  type: string
                color:
                  type: string
                blur:
                  type: number
                opacity:
                  type: number
                  minimum: 0
                  maximum: 1
                shadow:
                  type: string
                  enum:
                    - none
                    - sm
                    - md
                    - lg
                    - xl
                    - 2xl
                border:
                  type: object
                  properties:
                    thickness:
                      type: number
                    color:
                      type: string
                    roundeness:
                      type: string
                      enum:
                        - none
                        - medium
                        - large
                        - custom
                    customRoundeness:
                      type: number
                    opacity:
                      type: number
                      minimum: 0
                      maximum: 1
            hostAvatar:
              type: object
              properties:
                isEnabled:
                  type: boolean
                url:
                  type: string
            guestAvatar:
              type: object
              properties:
                isEnabled:
                  type: boolean
                url:
                  type: string
            hostBubbles:
              type: object
              properties:
                backgroundColor:
                  type: string
                color:
                  type: string
                blur:
                  type: number
                opacity:
                  type: number
                  minimum: 0
                  maximum: 1
                shadow:
                  type: string
                  enum:
                    - none
                    - sm
                    - md
                    - lg
                    - xl
                    - 2xl
                border:
                  type: object
                  properties:
                    thickness:
                      type: number
                    color:
                      type: string
                    roundeness:
                      type: string
                      enum:
                        - none
                        - medium
                        - large
                        - custom
                    customRoundeness:
                      type: number
                    opacity:
                      type: number
                      minimum: 0
                      maximum: 1
            guestBubbles:
              type: object
              properties:
                backgroundColor:
                  type: string
                color:
                  type: string
                blur:
                  type: number
                opacity:
                  type: number
                  minimum: 0
                  maximum: 1
                shadow:
                  type: string
                  enum:
                    - none
                    - sm
                    - md
                    - lg
                    - xl
                    - 2xl
                border:
                  type: object
                  properties:
                    thickness:
                      type: number
                    color:
                      type: string
                    roundeness:
                      type: string
                      enum:
                        - none
                        - medium
                        - large
                        - custom
                    customRoundeness:
                      type: number
                    opacity:
                      type: number
                      minimum: 0
                      maximum: 1
            buttons:
              type: object
              properties:
                backgroundColor:
                  type: string
                color:
                  type: string
                blur:
                  type: number
                opacity:
                  type: number
                  minimum: 0
                  maximum: 1
                shadow:
                  type: string
                  enum:
                    - none
                    - sm
                    - md
                    - lg
                    - xl
                    - 2xl
                border:
                  type: object
                  properties:
                    thickness:
                      type: number
                    color:
                      type: string
                    roundeness:
                      type: string
                      enum:
                        - none
                        - medium
                        - large
                        - custom
                    customRoundeness:
                      type: number
                    opacity:
                      type: number
                      minimum: 0
                      maximum: 1
            inputs:
              type: object
              properties:
                backgroundColor:
                  type: string
                color:
                  type: string
                blur:
                  type: number
                opacity:
                  type: number
                  minimum: 0
                  maximum: 1
                shadow:
                  type: string
                  enum:
                    - none
                    - sm
                    - md
                    - lg
                    - xl
                    - 2xl
                border:
                  type: object
                  properties:
                    thickness:
                      type: number
                    color:
                      type: string
                    roundeness:
                      type: string
                      enum:
                        - none
                        - medium
                        - large
                        - custom
                    customRoundeness:
                      type: number
                    opacity:
                      type: number
                      minimum: 0
                      maximum: 1
                placeholderColor:
                  type: string
            roundness:
              type: string
              enum:
                - none
                - medium
                - large
              description: Deprecated, use `container.border.roundeness` instead
            buttonsInput:
              type: object
              properties:
                layout:
                  type: string
                  enum:
                    - wrap
                    - vertical
        customCss:
          type: string
      title: Theme
    textBubble:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        content:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - richText
                richText: {}
              required:
                - type
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - markdown
                markdown:
                  type: string
              required:
                - type
                - markdown
      required:
        - type
        - content
      title: Text
    imageBubble:
      type: object
      properties:
        type:
          type: string
          enum:
            - image
        content:
          type: object
          properties:
            url:
              type: string
            clickLink:
              type: object
              properties:
                url:
                  type: string
                alt:
                  type: string
      required:
        - type
        - content
      title: Image
    videoBubble:
      type: object
      properties:
        type:
          type: string
          enum:
            - video
        content:
          type: object
          properties:
            url:
              type: string
            id:
              type: string
            type:
              type: string
              enum:
                - url
                - youtube
                - vimeo
                - tiktok
                - gumlet
            height:
              anyOf:
                - type: string
                - type: number
            aspectRatio:
              type: string
            maxWidth:
              type: string
            queryParamsStr:
              type: string
            areControlsDisplayed:
              type: boolean
            isAutoplayEnabled:
              type: boolean
      required:
        - type
        - content
      title: Video
    audioBubble:
      type: object
      properties:
        type:
          type: string
          enum:
            - audio
        content:
          type: object
          properties:
            url:
              type: string
            isAutoplayEnabled:
              type: boolean
      required:
        - type
        - content
      title: Audio
    embedBubble:
      type: object
      properties:
        type:
          type: string
          enum:
            - embed
        content:
          type: object
          properties:
            url:
              type: string
            height:
              anyOf:
                - type: string
                - type: number
            waitForEvent:
              type: object
              properties:
                isEnabled:
                  type: boolean
                name:
                  type: string
                saveDataInVariableId:
                  type: string
      required:
        - type
        - content
      title: Embed
    customEmbedBubble:
      type: object
      properties:
        type:
          type: string
          enum:
            - custom-embed
        content:
          type: object
          properties:
            url:
              type: string
            waitForEventFunction:
              type: object
              properties:
                args:
                  type: object
                  additionalProperties: {}
                content:
                  type: string
              required:
                - args
                - content
            initFunction:
              type: object
              properties:
                args:
                  type: object
                  additionalProperties: {}
                content:
                  type: string
              required:
                - args
                - content
          required:
            - initFunction
      required:
        - type
        - content
      title: Custom embed
    textInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - text input
        options:
          type: object
          properties:
            labels:
              type: object
              properties:
                placeholder:
                  type: string
                button:
                  type: string
            variableId:
              type: string
            isLong:
              type: boolean
            inputMode:
              type: string
              enum:
                - text
                - decimal
                - numeric
                - tel
                - search
                - email
                - url
            audioClip:
              type: object
              properties:
                isEnabled:
                  type: boolean
                saveVariableId:
                  type: string
                visibility:
                  type: string
                  enum:
                    - Auto
                    - Public
                    - Private
            attachments:
              type: object
              properties:
                isEnabled:
                  type: boolean
                saveVariableId:
                  type: string
                visibility:
                  type: string
                  enum:
                    - Auto
                    - Public
                    - Private
      required:
        - id
        - type
      title: Text
    buttonsInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - choice input
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              outgoingEdgeId:
                type: string
              content:
                type: string
              value:
                type: string
              displayCondition:
                type: object
                properties:
                  isEnabled:
                    type: boolean
                  condition:
                    type: object
                    properties:
                      logicalOperator:
                        type: string
                        enum:
                          - OR
                          - AND
                      comparisons:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            variableId:
                              type: string
                            comparisonOperator:
                              type: string
                              enum:
                                - Equal to
                                - Not equal
                                - Contains
                                - Does not contain
                                - Greater than
                                - Greater or equal to
                                - Less than
                                - Less or equal to
                                - Is set
                                - Is empty
                                - Starts with
                                - Ends with
                                - Matches regex
                                - Does not match regex
                            value:
                              type: string
                          required:
                            - id
            required:
              - id
        options:
          type: object
          properties:
            variableId:
              type: string
            isMultipleChoice:
              type: boolean
            buttonLabel:
              type: string
            dynamicVariableId:
              type: string
            isSearchable:
              type: boolean
            searchInputPlaceholder:
              type: string
            areInitialSearchButtonsVisible:
              type: boolean
      required:
        - id
        - type
        - items
      title: Buttons
    email:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - email input
        options:
          type: object
          properties:
            variableId:
              type: string
            labels:
              type: object
              properties:
                placeholder:
                  type: string
                button:
                  type: string
            retryMessageContent:
              type: string
      required:
        - id
        - type
      title: Email
    numberInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - number input
        options:
          type: object
          properties:
            variableId:
              type: string
            labels:
              type: object
              properties:
                placeholder:
                  type: string
                button:
                  type: string
            min:
              anyOf:
                - type: string
                - type: number
            max:
              anyOf:
                - type: string
                - type: number
            step:
              anyOf:
                - type: string
                - type: number
            locale:
              type: string
              pattern: ^[a-z]{2}(-[A-Z]{2})?$
            style:
              type: string
              enum:
                - decimal
                - currency
                - percent
                - unit
            currency:
              type: string
            unit:
              type: string
              enum:
                - acre
                - bit
                - byte
                - celsius
                - centimeter
                - day
                - degree
                - fahrenheit
                - fluid-ounce
                - foot
                - gallon
                - gigabit
                - gigabyte
                - gram
                - hectare
                - hour
                - inch
                - kilobit
                - kilobyte
                - kilogram
                - kilometer
                - liter
                - megabit
                - megabyte
                - meter
                - microsecond
                - mile
                - mile-scandinavian
                - milliliter
                - millimeter
                - millisecond
                - minute
                - month
                - nanosecond
                - ounce
                - percent
                - petabyte
                - pound
                - second
                - stone
                - terabit
                - terabyte
                - week
                - yard
                - year
      required:
        - id
        - type
      title: Number
    url:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - url input
        options:
          type: object
          properties:
            variableId:
              type: string
            labels:
              type: object
              properties:
                placeholder:
                  type: string
                button:
                  type: string
            retryMessageContent:
              type: string
      required:
        - id
        - type
      title: URL
    phoneNumberInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - phone number input
        options:
          type: object
          properties:
            variableId:
              type: string
            labels:
              type: object
              properties:
                placeholder:
                  type: string
                button:
                  type: string
            retryMessageContent:
              type: string
            defaultCountryCode:
              type: string
      required:
        - id
        - type
      title: Phone number
    dateInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - date input
        options:
          type: object
          properties:
            variableId:
              type: string
            labels:
              type: object
              properties:
                button:
                  type: string
                from:
                  type: string
                to:
                  type: string
            hasTime:
              type: boolean
            isRange:
              type: boolean
            format:
              type: string
              description: 'Format of the string is based on Unicode Technical Standard #35'
            min:
              type: string
            max:
              type: string
      required:
        - id
        - type
      title: Date
    time:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - time input
        options:
          type: object
          properties:
            variableId:
              type: string
            labels:
              type: object
              properties:
                button:
                  type: string
            format:
              type: string
              description: 'Format of the string is based on Unicode Technical Standard #35'
      required:
        - id
        - type
      title: Time
    paymentInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - payment input
        options:
          type: object
          properties:
            variableId:
              type: string
            provider:
              type: string
              enum:
                - Stripe
            labels:
              type: object
              properties:
                button:
                  type: string
                success:
                  type: string
            additionalInformation:
              type: object
              properties:
                description:
                  type: string
                name:
                  type: string
                email:
                  type: string
                phoneNumber:
                  type: string
                address:
                  type: object
                  properties:
                    country:
                      type: string
                    line1:
                      type: string
                    line2:
                      type: string
                    state:
                      type: string
                    city:
                      type: string
                    postalCode:
                      type: string
            credentialsId:
              type: string
            currency:
              type: string
            amount:
              type: string
            retryMessageContent:
              type: string
      required:
        - id
        - type
      title: Payment
    rating:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - rating input
        options:
          type: object
          properties:
            variableId:
              type: string
            buttonType:
              anyOf:
                - type: string
                  enum:
                    - Icons
                - type: string
                  enum:
                    - Numbers
            length:
              type: number
            startsAt:
              anyOf:
                - type: string
                - type: number
            labels:
              type: object
              properties:
                left:
                  type: string
                right:
                  type: string
                button:
                  type: string
            customIcon:
              type: object
              properties:
                isEnabled:
                  type: boolean
                svg:
                  type: string
            isOneClickSubmitEnabled:
              type: boolean
      required:
        - id
        - type
      title: Rating
    fileInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - file input
        options:
          type: object
          properties:
            variableId:
              type: string
            isRequired:
              type: boolean
            isMultipleAllowed:
              type: boolean
            labels:
              type: object
              properties:
                placeholder:
                  type: string
                button:
                  type: string
                clear:
                  type: string
                skip:
                  type: string
                success:
                  type: object
                  properties:
                    single:
                      type: string
                    multiple:
                      type: string
            allowedFileTypes:
              type: object
              properties:
                isEnabled:
                  type: boolean
                types:
                  type: array
                  items:
                    type: string
            visibility:
              type: string
              enum:
                - Auto
                - Public
                - Private
      required:
        - id
        - type
      title: File
    pictureChoice:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - picture choice input
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              outgoingEdgeId:
                type: string
              pictureSrc:
                type: string
              title:
                type: string
              description:
                type: string
              value:
                type: string
              displayCondition:
                type: object
                properties:
                  isEnabled:
                    type: boolean
                  condition:
                    type: object
                    properties:
                      logicalOperator:
                        type: string
                        enum:
                          - OR
                          - AND
                      comparisons:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            variableId:
                              type: string
                            comparisonOperator:
                              type: string
                              enum:
                                - Equal to
                                - Not equal
                                - Contains
                                - Does not contain
                                - Greater than
                                - Greater or equal to
                                - Less than
                                - Less or equal to
                                - Is set
                                - Is empty
                                - Starts with
                                - Ends with
                                - Matches regex
                                - Does not match regex
                            value:
                              type: string
                          required:
                            - id
            required:
              - id
        options:
          type: object
          properties:
            variableId:
              type: string
            isMultipleChoice:
              type: boolean
            isSearchable:
              type: boolean
            buttonLabel:
              type: string
            searchInputPlaceholder:
              type: string
            dynamicItems:
              type: object
              properties:
                isEnabled:
                  type: boolean
                titlesVariableId:
                  type: string
                descriptionsVariableId:
                  type: string
                pictureSrcsVariableId:
                  type: string
      required:
        - id
        - type
        - items
      title: Picture choice
    buttonsInputV5:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - choice input
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              blockId:
                type: string
              outgoingEdgeId:
                type: string
              content:
                type: string
              value:
                type: string
              displayCondition:
                type: object
                properties:
                  isEnabled:
                    type: boolean
                  condition:
                    type: object
                    properties:
                      logicalOperator:
                        type: string
                        enum:
                          - OR
                          - AND
                      comparisons:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            variableId:
                              type: string
                            comparisonOperator:
                              type: string
                              enum:
                                - Equal to
                                - Not equal
                                - Contains
                                - Does not contain
                                - Greater than
                                - Greater or equal to
                                - Less than
                                - Less or equal to
                                - Is set
                                - Is empty
                                - Starts with
                                - Ends with
                                - Matches regex
                                - Does not match regex
                            value:
                              type: string
                          required:
                            - id
            required:
              - id
        options:
          type: object
          properties:
            variableId:
              type: string
            isMultipleChoice:
              type: boolean
            buttonLabel:
              type: string
            dynamicVariableId:
              type: string
            isSearchable:
              type: boolean
            searchInputPlaceholder:
              type: string
            areInitialSearchButtonsVisible:
              type: boolean
      required:
        - id
        - type
        - items
      title: Buttons v5
    fileInputV5:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - file input
        options:
          type: object
          properties:
            variableId:
              type: string
            isRequired:
              type: boolean
            isMultipleAllowed:
              type: boolean
            labels:
              type: object
              properties:
                placeholder:
                  type: string
                button:
                  type: string
                clear:
                  type: string
                skip:
                  type: string
                success:
                  type: object
                  properties:
                    single:
                      type: string
                    multiple:
                      type: string
            allowedFileTypes:
              type: object
              properties:
                isEnabled:
                  type: boolean
                types:
                  type: array
                  items:
                    type: string
            sizeLimit:
              type: number
            visibility:
              type: string
              enum:
                - Auto
                - Public
                - Private
      required:
        - id
        - type
      title: File input v5
    pictureChoiceV5:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - picture choice input
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              blockId:
                type: string
              outgoingEdgeId:
                type: string
              pictureSrc:
                type: string
              title:
                type: string
              description:
                type: string
              value:
                type: string
              displayCondition:
                type: object
                properties:
                  isEnabled:
                    type: boolean
                  condition:
                    type: object
                    properties:
                      logicalOperator:
                        type: string
                        enum:
                          - OR
                          - AND
                      comparisons:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            variableId:
                              type: string
                            comparisonOperator:
                              type: string
                              enum:
                                - Equal to
                                - Not equal
                                - Contains
                                - Does not contain
                                - Greater than
                                - Greater or equal to
                                - Less than
                                - Less or equal to
                                - Is set
                                - Is empty
                                - Starts with
                                - Ends with
                                - Matches regex
                                - Does not match regex
                            value:
                              type: string
                          required:
                            - id
            required:
              - id
        options:
          type: object
          properties:
            variableId:
              type: string
            isMultipleChoice:
              type: boolean
            isSearchable:
              type: boolean
            buttonLabel:
              type: string
            searchInputPlaceholder:
              type: string
            dynamicItems:
              type: object
              properties:
                isEnabled:
                  type: boolean
                titlesVariableId:
                  type: string
                descriptionsVariableId:
                  type: string
                pictureSrcsVariableId:
                  type: string
      required:
        - id
        - type
        - items
      title: Picture choice v5
    csaScriptToExecute:
      type: object
      properties:
        type:
          type: string
          enum:
            - scriptToExecute
        scriptToExecute:
          type: object
          properties:
            content:
              type: string
            isUnsafe:
              type: boolean
            isCode:
              type: boolean
            args:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  value:
                    nullable: true
                    anyOf:
                      - anyOf:
                          - anyOf:
                              - type: string
                              - type: number
                          - type: boolean
                      - type: array
                        items:
                          type: string
                          nullable: true
                required:
                  - id
          required:
            - content
            - args
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - scriptToExecute
      title: Script to execute
    csaRedirect:
      type: object
      properties:
        type:
          type: string
          enum:
            - redirect
        redirect:
          type: object
          properties:
            url:
              type: string
            isNewTab:
              type: boolean
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - redirect
      title: Redirect
    csaChatwoot:
      type: object
      properties:
        type:
          type: string
          enum:
            - chatwoot
        chatwoot:
          type: object
          properties:
            scriptToExecute:
              type: object
              properties:
                content:
                  type: string
                isUnsafe:
                  type: boolean
                isCode:
                  type: boolean
                args:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      value:
                        nullable: true
                        anyOf:
                          - anyOf:
                              - anyOf:
                                  - type: string
                                  - type: number
                              - type: boolean
                          - type: array
                            items:
                              type: string
                              nullable: true
                    required:
                      - id
              required:
                - content
                - args
          required:
            - scriptToExecute
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - chatwoot
      title: Chatwoot
    csaGa:
      type: object
      properties:
        type:
          type: string
          enum:
            - googleAnalytics
        googleAnalytics:
          type: object
          properties:
            trackingId:
              type: string
            category:
              type: string
            action:
              type: string
            label:
              type: string
            value:
              anyOf:
                - type: string
                - type: number
            sendTo:
              type: string
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - googleAnalytics
      title: Google Analytics
    csaWait:
      type: object
      properties:
        type:
          type: string
          enum:
            - wait
        wait:
          type: object
          properties:
            secondsToWaitFor:
              type: number
          required:
            - secondsToWaitFor
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - wait
      title: Wait
    csaSetVariable:
      type: object
      properties:
        type:
          type: string
          enum:
            - setVariable
        setVariable:
          type: object
          properties:
            scriptToExecute:
              type: object
              properties:
                content:
                  type: string
                isUnsafe:
                  type: boolean
                isCode:
                  type: boolean
                args:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      value:
                        nullable: true
                        anyOf:
                          - anyOf:
                              - anyOf:
                                  - type: string
                                  - type: number
                              - type: boolean
                          - type: array
                            items:
                              type: string
                              nullable: true
                    required:
                      - id
              required:
                - content
                - args
          required:
            - scriptToExecute
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - setVariable
      title: Set variable
    csaStreamOpenAiChatCompletion:
      type: object
      properties:
        type:
          type: string
          enum:
            - streamOpenAiChatCompletion
        streamOpenAiChatCompletion:
          type: object
          properties:
            messages:
              type: array
              items:
                type: object
                properties:
                  content:
                    type: string
                  role:
                    type: string
                    enum:
                      - system
                      - user
                      - assistant
          required:
            - messages
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - streamOpenAiChatCompletion
      title: Stream OpenAI
    csaHttpRequestToExecute:
      type: object
      properties:
        type:
          type: string
          enum:
            - httpRequestToExecute
        httpRequestToExecute:
          type: object
          properties:
            url:
              type: string
            headers:
              type: object
              additionalProperties:
                type: string
            body: {}
            method:
              type: string
              enum:
                - POST
                - GET
                - PUT
                - DELETE
                - PATCH
                - HEAD
                - CONNECT
                - OPTIONS
                - TRACE
          required:
            - url
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - httpRequestToExecute
      title: Execute HTTP request
    csaInjectStartProps:
      type: object
      properties:
        type:
          type: string
          enum:
            - startPropsToInject
        startPropsToInject:
          type: object
          properties:
            googleAnalyticsId:
              type: string
            pixelIds:
              type: array
              items:
                type: string
            gtmId:
              type: string
            customHeadCode:
              type: string
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - startPropsToInject
      title: Inject start props
    csaPixel:
      type: object
      properties:
        type:
          type: string
          enum:
            - pixel
        pixel:
          oneOf:
            - type: object
              properties:
                pixelId:
                  type: string
                isInitSkip:
                  type: boolean
                params:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      key:
                        type: string
                      value: {}
                    required:
                      - id
            - type: object
              properties:
                pixelId:
                  type: string
                isInitSkip:
                  type: boolean
                params:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      key:
                        type: string
                      value: {}
                    required:
                      - id
                eventType:
                  type: string
                  enum:
                    - Lead
                    - Contact
                    - CompleteRegistration
                    - Schedule
                    - SubmitApplication
                    - ViewContent
                    - AddPaymentInfo
                    - AddToCart
                    - AddToWishlist
                    - CustomizeProduct
                    - Donate
                    - FindLocation
                    - InitiateCheckout
                    - Purchase
                    - Search
                    - StartTrial
                    - Subscribe
              required:
                - eventType
            - type: object
              properties:
                pixelId:
                  type: string
                isInitSkip:
                  type: boolean
                params:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                      key:
                        type: string
                      value: {}
                    required:
                      - id
                eventType:
                  type: string
                  enum:
                    - Custom
                name:
                  type: string
              required:
                - eventType
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - pixel
      title: Init Pixel
    csaStream:
      type: object
      properties:
        type:
          type: string
          enum:
            - stream
        stream:
          type: boolean
          enum:
            - true
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - stream
      title: Exec stream
    csaCodeToExecute:
      type: object
      properties:
        type:
          type: string
          enum:
            - codeToExecute
        codeToExecute:
          type: object
          properties:
            args:
              type: object
              additionalProperties: {}
            content:
              type: string
          required:
            - args
            - content
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - codeToExecute
      title: Execute code
    csaListenForWebhook:
      type: object
      properties:
        type:
          type: string
          enum:
            - listenForWebhook
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
      title: Listen to webhook
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````