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

# Send message

> Sends a message to an existing conversation and receives the bot response.



## OpenAPI

````yaml POST /v1/conversations/{sessionId}/messages
openapi: 3.0.3
info:
  title: Viewer API
  version: 3.0.0
servers:
  - url: https://quick.bot/api
security: []
externalDocs:
  url: https://docs.quick.bot/api
paths:
  /v1/conversations/{sessionId}/messages:
    post:
      tags:
        - Conversations
      summary: Send message
      description: >-
        Sends a message to an existing conversation and receives the bot
        response.
      operationId: web-sendMessage
      parameters:
        - in: path
          name: sessionId
          description: The session ID you got from the POST /v1/conversations response.
          schema:
            type: string
            description: The session ID you got from the POST /v1/conversations response.
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  oneOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - text
                        text:
                          type: string
                        value:
                          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
                        createdAt:
                          type: number
                      required:
                        - type
                        - text
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - audio
                        url:
                          type: string
                        createdAt:
                          type: number
                      required:
                        - type
                        - url
                      description: >-
                        Can only be provided if current input block is a text
                        input that allows audio clips
                messageMetadata:
                  type: object
                  properties:
                    inputBlockId:
                      type: string
                    inputType:
                      type: string
                clientLogs:
                  type: array
                  items:
                    type: object
                    properties:
                      status:
                        type: string
                      description:
                        type: string
                      details: {}
                    required:
                      - status
                      - description
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  actor:
                    type: object
                    properties:
                      role:
                        type: string
                        enum:
                          - host
                      actor:
                        type: string
                        enum:
                          - bot
                          - member
                      name:
                        type: string
                      avatarUrl:
                        type: string
                    required:
                      - role
                      - actor
                  messages:
                    type: array
                    items:
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                          required:
                            - id
                        - oneOf:
                            - $ref: '#/components/schemas/textMessage'
                            - $ref: '#/components/schemas/imageMessage'
                            - $ref: '#/components/schemas/videoMessage'
                            - $ref: '#/components/schemas/audioMessage'
                            - $ref: '#/components/schemas/embedMessage'
                          discriminator:
                            propertyName: type
                            mapping:
                              text:
                                $ref: '#/components/schemas/textMessage'
                              image:
                                $ref: '#/components/schemas/imageMessage'
                              video:
                                $ref: '#/components/schemas/videoMessage'
                              audio:
                                $ref: '#/components/schemas/audioMessage'
                              embed:
                                $ref: '#/components/schemas/embedMessage'
                  input:
                    allOf:
                      - 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/paymentInput'
                          - $ref: '#/components/schemas/mercadoPagoPaymentInput'
                          - $ref: '#/components/schemas/rating'
                          - $ref: '#/components/schemas/fileInput'
                        discriminator:
                          propertyName: type
                          mapping:
                            text input:
                              $ref: '#/components/schemas/textInput'
                            buttons input:
                              $ref: '#/components/schemas/buttonsInput'
                            email input:
                              $ref: '#/components/schemas/email'
                            number input:
                              $ref: '#/components/schemas/numberInput'
                            url input:
                              $ref: '#/components/schemas/url'
                            phone number input:
                              $ref: '#/components/schemas/phoneNumberInput'
                            date input:
                              $ref: '#/components/schemas/dateInput'
                            stripe:
                              $ref: '#/components/schemas/paymentInput'
                            mercadopago payment:
                              $ref: '#/components/schemas/mercadoPagoPaymentInput'
                            rating input:
                              $ref: '#/components/schemas/rating'
                            file input:
                              $ref: '#/components/schemas/fileInput'
                      - type: object
                        properties:
                          prefilledValue:
                            type: string
                          runtimeOptions:
                            anyOf:
                              - type: object
                                properties:
                                  paymentIntentSecret:
                                    type: string
                                  amountLabel:
                                    type: string
                                  publicKey:
                                    type: string
                                required:
                                  - paymentIntentSecret
                                  - amountLabel
                                  - publicKey
                              - type: object
                                properties:
                                  preferenceId:
                                    type: string
                                  publicKey:
                                    type: string
                                  amount:
                                    type: number
                                  amountLabel:
                                    type: string
                                  currency:
                                    type: string
                                  initPoint:
                                    type: string
                                  locale:
                                    type: string
                                required:
                                  - preferenceId
                                  - publicKey
                                  - amount
                                  - amountLabel
                                  - currency
                  clientSideActions:
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/csaScriptToExecute'
                        - $ref: '#/components/schemas/csaRedirect'
                        - $ref: '#/components/schemas/csaWait'
                        - $ref: '#/components/schemas/csaSetVariable'
                        - $ref: '#/components/schemas/csaInjectStartProps'
                        - $ref: '#/components/schemas/csaCodeToExecute'
                      discriminator:
                        propertyName: type
                        mapping:
                          scriptToExecute:
                            $ref: '#/components/schemas/csaScriptToExecute'
                          redirect:
                            $ref: '#/components/schemas/csaRedirect'
                          wait:
                            $ref: '#/components/schemas/csaWait'
                          setVariable:
                            $ref: '#/components/schemas/csaSetVariable'
                          startPropsToInject:
                            $ref: '#/components/schemas/csaInjectStartProps'
                          codeToExecute:
                            $ref: '#/components/schemas/csaCodeToExecute'
                    description: Actions to execute on the client side
                  logs:
                    type: array
                    items:
                      type: object
                      properties:
                        status:
                          type: string
                        description:
                          type: string
                        details: {}
                      required:
                        - status
                        - description
                    description: Logs that were saved during the last execution
                  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.
                  guestDisplayText:
                    type: string
                required:
                  - actor
                  - messages
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
components:
  schemas:
    textMessage:
      type: object
      properties:
        type:
          type: string
          enum:
            - text
        content:
          type: object
          properties:
            type:
              type: string
              enum:
                - markdown
            markdown:
              type: string
          required:
            - type
            - markdown
      required:
        - type
        - content
      title: Text
    imageMessage:
      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
    videoMessage:
      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: number
                - {}
            aspectRatio:
              type: string
            maxWidth:
              type: string
            queryParamsStr:
              type: string
            areControlsDisplayed:
              type: boolean
            isAutoplayEnabled:
              type: boolean
      required:
        - type
        - content
      title: Video
    audioMessage:
      type: object
      properties:
        type:
          type: string
          enum:
            - audio
        content:
          type: object
          properties:
            url:
              type: string
            isAutoplayEnabled:
              type: boolean
      required:
        - type
        - content
      title: Audio
    embedMessage:
      type: object
      properties:
        type:
          type: string
          enum:
            - embed
        content:
          type: object
          properties:
            url:
              type: string
            waitForEvent:
              type: object
              properties:
                isEnabled:
                  type: boolean
                name:
                  type: string
                saveDataInVariableId:
                  type: string
            initFunction:
              type: object
              properties:
                args:
                  type: object
                  additionalProperties: {}
                content:
                  type: string
              required:
                - args
                - content
            waitForEventFunction:
              type: object
              properties:
                args:
                  type: object
                  additionalProperties: {}
                content:
                  type: string
              required:
                - args
                - content
            height:
              type: number
      required:
        - type
        - content
      title: 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
            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:
            - buttons input
        items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              outgoingEdgeId:
                type: string
              pictureSrc:
                type: string
              content:
                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
                                - Greater than
                                - Less than
                                - Is set
                                - Is empty
                                - Is not empty
                                - Contains
                                - Does not contain
                                - Starts with
                                - Ends with
                                - Matches regex
                                - Does not match regex
                            value:
                              type: string
                          required:
                            - id
            required:
              - id
              - content
        options:
          type: object
          properties:
            variableId:
              type: string
            isMultipleChoice:
              type: boolean
            buttonLabel:
              type: string
            dynamicVariableId:
              type: string
            isSearchable:
              type: boolean
            searchInputPlaceholder:
              type: string
            otherOption:
              type: boolean
            whatsappFlowHeader:
              type: string
            whatsappFlowBody:
              type: string
            whatsappFlowButtonText:
              type: string
            whatsappFlowQuestionLabel:
              type: string
      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
      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: number
                - {}
            max:
              anyOf:
                - type: number
                - {}
            step:
              anyOf:
                - type: number
                - {}
      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
      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
            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
            min:
              type: string
            max:
              type: string
      required:
        - id
        - type
      title: Date
    paymentInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - stripe
        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
      required:
        - id
        - type
      title: Payment
    mercadoPagoPaymentInput:
      type: object
      properties:
        id:
          type: string
        outgoingEdgeId:
          type: string
        type:
          type: string
          enum:
            - mercadopago payment
        options:
          type: object
          properties:
            variableId:
              type: string
            credentialsId:
              type: string
            currency:
              type: string
            amount:
              type: string
            labels:
              type: object
              properties:
                button:
                  type: string
                success:
                  type: string
            additionalInformation:
              type: object
              properties:
                description:
                  type: string
                name:
                  type: string
                email:
                  type: string
            retryMessageContent:
              type: string
            pendingMessageContent:
              type: string
            loadingMessage:
              type: string
      required:
        - id
        - type
      title: MercadoPago 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: 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
            whatsappMessage:
              type: string
      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
            visibility:
              type: string
              enum:
                - Auto
                - Public
                - Private
      required:
        - id
        - type
      title: File
    csaScriptToExecute:
      type: object
      properties:
        type:
          type: string
          enum:
            - scriptToExecute
        scriptToExecute:
          type: object
          properties:
            content:
              type: string
            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
    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
                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
    csaInjectStartProps:
      type: object
      properties:
        type:
          type: string
          enum:
            - startPropsToInject
        startPropsToInject:
          type: object
          properties:
            gtmId:
              type: string
            customHeadCode:
              type: string
        lastBubbleBlockId:
          type: string
        expectsDedicatedReply:
          type: boolean
      required:
        - type
        - startPropsToInject
      title: Inject start props
    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
    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: Error
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        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: Error
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []

````