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

# Create a new message

> Create a new message



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /messages
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /messages:
    post:
      tags:
        - Messages
      summary: Create a new message
      description: Create a new message
      operationId: CreateMessage
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageDto'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
              examples:
                Example 1:
                  value:
                    ticket: 507f1f77bcf86cd799439011
                    comment:
                      type: paragraph
                      content:
                        - type: text
                          text: >-
                            Thank you for reporting this issue. We are looking
                            into it.
                    type: COMMENT
                    bot: false
                    attachments:
                      - name: screenshot.png
                        url: https://example.com/screenshots/screenshot.png
                        type: image/png
      security:
        - jwt: []
components:
  schemas:
    CreateMessageDto:
      properties:
        user:
          type: string
        session:
          type: string
        bot:
          type: boolean
        fallbackUser:
          $ref: '#/components/schemas/FallbackUserDto'
        messageRef:
          type: string
        ticket:
          type: string
        data: {}
        translatedData: {}
        type:
          type: string
        emailId:
          type: string
        sessionNotificationsUnread:
          type: boolean
        outbound:
          type: string
        outboundTemplate:
          type: string
        outboundSubject:
          type: string
        status: {}
        statusHistory:
          items: {}
          type: array
        comment: {}
        replyTo:
          type: string
        kaiChat:
          type: boolean
        aiData: {}
        attachments:
          items:
            $ref: '#/components/schemas/AttachmentDto'
          type: array
        actions:
          items:
            properties:
              data: {}
              type:
                type: string
            required:
              - type
            type: object
          type: array
        channel:
          $ref: '#/components/schemas/ChannelDto'
        sendToChannel:
          type: boolean
        isNote:
          type: boolean
        rating:
          type: string
      type: object
      additionalProperties: false
    FallbackUserDto:
      properties:
        username:
          type: string
        email:
          type: string
        imageUrl:
          type: string
      type: object
      additionalProperties: false
    AttachmentDto:
      properties:
        name:
          type: string
        url:
          type: string
        type:
          type: string
      required:
        - name
        - url
      type: object
      additionalProperties: false
    ChannelDto:
      properties:
        id:
          type: string
        type:
          type: string
        messageId:
          type: string
      required:
        - id
      type: object
      additionalProperties: false
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````