> ## 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.

# Send message

> Send a message into the conversation, authored as the contact.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /s2s/conversations/{conversationId}/messages
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /s2s/conversations/{conversationId}/messages:
    post:
      tags:
        - S2S Conversations
      summary: Send message
      description: Send a message into the conversation, authored as the contact.
      operationId: SendMessage
      parameters:
        - in: path
          name: conversationId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S2SSendMessageBody'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S2SMessage'
      security:
        - s2s: []
components:
  schemas:
    S2SSendMessageBody:
      properties:
        text:
          type: string
        attachments:
          items:
            $ref: '#/components/schemas/S2SAttachmentInput'
          type: array
        replyToMessageId:
          type: string
      required:
        - text
      type: object
      additionalProperties: false
    S2SMessage:
      properties:
        id:
          type: string
        conversationId:
          type: string
        text:
          type: string
        author:
          $ref: '#/components/schemas/S2SAuthor'
        attachments:
          items:
            $ref: '#/components/schemas/S2SAttachment'
          type: array
        replyToMessageId:
          type: string
        rating:
          type: string
        unread:
          type: boolean
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - conversationId
        - author
        - attachments
        - unread
        - createdAt
      type: object
      additionalProperties: false
    S2SAttachmentInput:
      properties:
        url:
          type: string
        name:
          type: string
        contentType:
          type: string
      required:
        - url
      type: object
      additionalProperties: false
    S2SAuthor:
      properties:
        type:
          type: string
          enum:
            - contact
            - agent
            - bot
            - system
        id:
          type: string
        name:
          type: string
        avatar:
          type: string
      required:
        - type
      type: object
      additionalProperties: false
    S2SAttachment:
      properties:
        url:
          type: string
        name:
          type: string
        contentType:
          type: string
      required:
        - url
      type: object
      additionalProperties: false
  securitySchemes:
    s2s:
      type: http
      scheme: bearer
      bearerFormat: Service account token (JWT)

````