POST
/
conversation
/
{id}
/
messages
curl --request POST \
  --url https://api.wapikit.com/api/conversation/{id}/messages \
  --header 'Content-Type: application/json' \
  --data '{
  "createdAt": "2023-11-07T05:31:56Z",
  "replyToMessageId": "<string>",
  "messageData": {
    "text": "<string>",
    "messageType": "<string>"
  }
}'
{
  "message": {
    "uniqueId": "<string>",
    "conversationId": "<string>",
    "direction": "InBound",
    "status": "Read",
    "messageType": "Text",
    "createdAt": "2023-11-07T05:31:56Z",
    "replyToMessageId": "<string>",
    "whatsAppMessageId": "<string>",
    "messageData": {
      "text": "<string>"
    }
  }
}

Path Parameters

id
string
required

The id value of the conversation you want to send a message to.

Body

application/json

new message info

Request payload for sending a new message. The payload includes the messageType, createdAt date, and a messageData field whose structure depends on the messageType.

createdAt
string
required
messageData
object
required

OneOf-based union for new message data, distinguished by messageType.

replyToMessageId
string

Response

200
application/json

message object

message
object
required

The message object returned from the API (or retrieved from the database) with a discriminator to determine the concrete type.

The base message object that contains common properties for all message types.