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

> Send a message within an existing conversation. The message is delivered to all participants in the conversation.

# Create a message



## OpenAPI

````yaml post /v1/messaging/conversations/{conversationUid}/messages
openapi: 3.0.0
info:
  title: Partner API
  description: Public API for partner integrations
  version: '1.0'
  contact: {}
servers:
  - url: https://api-staging.respondent.io
security: []
tags: []
paths:
  /v1/messaging/conversations/{conversationUid}/messages:
    post:
      tags:
        - messaging
      summary: Create a message
      description: Create a message in a conversation.
      operationId: MessagesController_createMessage
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
        - name: x-api-secret
          in: header
          required: true
          schema:
            type: string
        - name: conversationUid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversationMessageDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
components:
  schemas:
    CreateConversationMessageDto:
      type: object
      properties:
        body:
          type: string
          description: Body of message.
      required:
        - body
    Message:
      type: object
      properties:
        createdAt:
          type: string
        updatedAt:
          type: string
        uid:
          type: string
          description: Unique identifier of message.
        body:
          type: string
          description: Body of message.
        conversation:
          description: Conversation message belongs to.
          allOf:
            - $ref: '#/components/schemas/MinimalConversation'
        sender:
          description: >-
            Sender of message.

            Either a participant or the api team owner/admin.

            To find the external researcher, use
            `conversation.metadata.externalResearcherId`.
          allOf:
            - $ref: '#/components/schemas/MessagingUser'
      required:
        - createdAt
        - uid
        - body
        - conversation
        - sender
    MinimalConversation:
      type: object
      properties:
        createdAt:
          type: string
        updatedAt:
          type: string
        uid:
          type: string
          description: Unique identifier of conversation.
        name:
          type: string
          description: Name of conversation.
        deleted:
          type: boolean
          description: If conversation is marked as deleted.
        locked:
          type: boolean
          description: If conversation is locked.
        read:
          type: boolean
          deprecated: true
        metadata:
          description: Metadata of conversation.
          allOf:
            - $ref: '#/components/schemas/ConversationMetadata'
        participants:
          description: |-
            All participants of conversation including the researcher.
            The researcher will be the API owner/admin account for the api team.
          type: array
          items:
            $ref: '#/components/schemas/ConversationParticipant'
      required:
        - createdAt
        - uid
        - name
        - deleted
        - locked
        - read
        - participants
    MessagingUser:
      type: object
      properties:
        uid:
          type: string
          description: Unique identifier for messaging user.
        foreignId:
          type: string
          description: UserId of messaging user.
        firstName:
          type: string
          description: First name of user.
        lastName:
          type: string
          description: Last name initial of user.
      required:
        - uid
        - firstName
        - lastName
    ConversationMetadata:
      type: object
      properties:
        projectId:
          type: string
          description: ProjectId of the project the coversation belongs to.
          format: ObjectId
        surveyResponseId:
          type: string
          description: ScreenerResponseId for the project, if exists.
          format: ObjectId
        externalResearcherId:
          type: string
          description: ExternalResearcherId for the project, if exists.
        externalTeamId:
          type: string
          description: ExternalTeamId for the project, if exists.
        externalCompanyId:
          type: string
          description: ExternalCompanyId for the project, if exists.
    ConversationParticipant:
      type: object
      properties:
        uid:
          type: string
          description: Unique identifier for messaging user.
        foreignId:
          type: string
          description: UserId of messaging user.
        firstName:
          type: string
          description: First name of user.
        lastName:
          type: string
          description: Last name initial of user.
        read:
          type: boolean
          description: Whether the participant has read the conversation.
        deleted:
          type: boolean
          description: Whether the participant has muted the conversation.
      required:
        - uid
        - firstName
        - lastName
        - read
        - deleted

````