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

# Send Message

> Use this endpoint to send queries or prompts to your trained agent and receive immediate, accurate responses.



## OpenAPI

````yaml POST /{bot_id}
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.public.chatnode.ai/v1
security:
  - bearerAuth: []
paths:
  /{bot_id}:
    post:
      description: >-
        Use this endpoint to send queries or prompts to your trained agent and
        receive immediate, accurate responses.
      parameters:
        - name: bot_id
          in: path
          description: The agent id associated with the trained agent model.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewMessage'
        required: true
      responses:
        '200':
          description: Message response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
components:
  schemas:
    NewMessage:
      required:
        - message
      type: object
      properties:
        message:
          type: string
          description: The message to send to your agent.
        chat_session_id:
          type: string
          description: >-
            The chat session id to keep track of a unique conversation. If not
            provided, it will default to generate a new one each time.
        streaming:
          type: boolean
          default: false
          description: Whether to enable streaming response. Defaults to false.
    Message:
      required:
        - chat_session_id
        - message
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the message.
          example: d0135d64-2f4b-4a79-9b29-af76e4ea93a7
        message:
          description: The reply message from your agent.
          type: string
          example: Hello there! 😄 How can I assist you today?
        chat_session_id:
          type: string
          description: The chat session id to keep track of a unique conversation.
          example: aki56d7-1719768767426
        urls:
          type: array
          items:
            type: string
          description: URLs related to the message.
          example: []
        docs:
          type: array
          items:
            type: string
          description: document links related to the message.
          example: []
    Error:
      required:
        - detail
      type: object
      properties:
        message:
          type: array
          items:
            type: string
          example:
            - body
        chat_session_id:
          type: array
          items:
            type: string
        streaming:
          type: array
          items:
            type: string
    Unauthorized:
      required:
        - message
      type: object
      properties:
        message:
          type: string
          example: Bearer token missing or unknown
    Forbidden:
      required:
        - message
      type: object
      properties:
        message:
          type: string
          example: Bot access not allowed
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````