---
title: "Add message"
method: POST
path: "/beta/conversations/{conversationId}/messages"
tags: ["Conversations", "Messages"]
---

# Add message

`POST /beta/conversations/{conversationId}/messages`

Add a message to a conversation. For inbound messages the author is assumed to be the requester of the conversation (end user). For outbound messages the author is specified using the agentId field. <br>If attachments are added to the message, they will be copied and stored in Dixa. <br> Content in outbound message is required except for Whatsapp messages. <br> Supported channels are Chat, Messenger, Contact Form, Email, Sms (outbound only), Whatsapp (outbound and Markdown only). <br><br> Supported Markdown syntax for Markdown content: bold <code>\*\*text\*\*</code>, italic <code>\*text\*</code>, bold & italic <code>\*\*\*text\*\*\*</code>, strikethrough <code>\~text\~</code>, blockquote <code> \> Quoted text. \n Message about quoted text</code>, ordered list <code>List:\n1. Item\n2. Item\n3. Item</code>, unordered list <code>List:\n\* Item\n\* Item\n\* Item</code>, inline code <code>This is \`code\`</code>. <br><br> Whatsapp channel: <br> Only one attachment is allowed per WhatsApp message. <br> Supports adding a message with attachment only (no content). <br> Supports the following file types for attachments: .jpg, .jpeg, .png, .pdf, .doc, .docx, .pptx, .xlsx

## Path parameters

- `conversationId` integer, required

## Request body

- union — Only Outbound messages are supported for Sms and Whatsapp.
  - Inbound
    - `content` union, required
      - Html
        - `value` string, required
      - Markdown
        - `value` string, required
      - Text
        - `value` string, required
    - `attachments` File[]
      - `url` string, required — url
      - `prettyName` string
    - `integrationEmail` string — Internal email address registered for the integration with format: \<email-address\>@email.dixa.io
    - `externalId` string — Client generated identifier for external reference
  - Outbound
    - `content` union
      - Html
        - `value` string, required
      - Markdown
        - `value` string, required
      - Text
        - `value` string, required
    - `agentId` string, uuid, required
    - `attachments` File[]
      - `url` string, required — url
      - `prettyName` string
    - `integrationEmail` string
    - `externalId` string
    - `cc` string[]
    - `bcc` string[]

## Response `200`

The added message

- CreateMessageOutput
  - `data` CreateMessageOutputData, required
    - `content` union
      - Html
        - `value` string, required
      - Markdown
        - `value` string, required
      - Text
        - `value` string, required
    - `direction` string, required — values: [Inbound, Internal, Outbound]
    - `authorId` string, uuid, required
    - `externalId` string
    - `messageId` string, uuid
    - `createdAt` string

## Other responses

- `400` — Invalid value for: path parameter conversationId, Invalid value extracted from request context, Invalid value for: body, Invalid input for Message, Failure to download attachment, Duplicate externalId, Unsupported ConversationChannel
- `404` — An entity in this request could not be found
- `500` — Internal failure during request processing

---

[API](https://skmtc.net/dixa/apis/dixa-api.md) · [All operations](https://skmtc.net/dixa/apis/dixa-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dixa/dixa-api/versions/041e058483f0/schema)
