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

# Create message

> Create a new message in the specified thread.



## OpenAPI

````yaml POST /v1/threads/{thread_id}/messages
openapi: 3.0.0
info:
  title: ZeroBot API
  version: 1.0.0
  description: API reference for ZeroBot
servers:
  - url: https://api.zerobot.ai
security: []
paths:
  /v1/threads/{thread_id}/messages:
    post:
      summary: Create a message
      description: Create a new message in the specified thread.
      parameters:
        - name: thread_id
          description: The id of the thread to create a message for.
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                assistant_id:
                  type: string
                  description: The ID of the assistant to use to execute this run.
                content:
                  type: string
                  description: >-
                    The prompt(s) to generate completions for, encoded as a
                    string, array of strings, array of tokens, or array of token
                    arrays.


                    Note that <|endoftext|> is the document separator that the
                    model sees during training, so if a prompt is not specified
                    the model will generate as if from the beginning of a new
                    document.
                role:
                  type: string
                  description: The role of the entity that is creating the message.
                  enum:
                    - user
                    - assistant
                  default: user
              required:
                - content
                - role
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: object
                    description: A message object.

````