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

# Create message

> Creates a new chat message.



## OpenAPI

````yaml post /v2/threads/{thread_id}/messages
openapi: 3.0.0
info:
  title: Campsite API
  version: 2.0.0
  contact:
    email: support@campsite.com
  description: >
    This is the internal documentation for our public REST API. Use this as a
    starting point for hacking on projects. We'll build a proper documentation
    site later.


    ⚠️  This API is a work in progress! Field and endpoint names are subject to
    change, and not all endpoints have been added yet.
servers:
  - url: https://api.campsite.com
security:
  - bearerAuth: []
paths:
  /v2/threads/{thread_id}/messages:
    post:
      summary: Create message
      description: Creates a new chat message.
      operationId: _v2_threads_thread_id_messages_post
      parameters:
        - in: path
          name: thread_id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_v2_threads_thread_id_messages_post_request'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2Message'
components:
  schemas:
    _v2_threads_thread_id_messages_post_request:
      type: object
      required:
        - content_markdown
      properties:
        content_markdown:
          type: string
          description: The message content in Markdown format.
          properties: {}
        parent_id:
          type: string
          description: The ID of the parent message.
          properties: {}
    V2Message:
      type: object
      required:
        - id
        - content
        - created_at
        - updated_at
        - parent_id
        - thread_id
        - author
      properties:
        id:
          type: string
          properties: {}
        content:
          type: string
          properties: {}
        created_at:
          type: string
          properties: {}
        updated_at:
          type: string
          properties: {}
        parent_id:
          type: string
          properties: {}
          nullable: true
        thread_id:
          type: string
          properties: {}
        author:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/V2Author'
    V2Author:
      type: object
      required:
        - avatar_urls
        - name
        - id
        - type
      properties:
        avatar_urls:
          $ref: '#/components/schemas/AvatarUrls'
        name:
          type: string
          properties: {}
        id:
          type: string
          properties: {}
        type:
          type: string
          enum:
            - app
            - member
          properties: {}
    AvatarUrls:
      type: object
      required:
        - xs
        - sm
        - base
        - lg
        - xl
        - xxl
      properties:
        xs:
          type: string
          properties: {}
        sm:
          type: string
          properties: {}
        base:
          type: string
          properties: {}
        lg:
          type: string
          properties: {}
        xl:
          type: string
          properties: {}
        xxl:
          type: string
          properties: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.