Sends a message in a conversation between users
cURL
curl --request POST \ --url http://localhost:3000/api/conversations/send-message \ --header 'Content-Type: application/json' \ --data ' { "conversationId": "<string>", "messageData": { "type": "TEXT", "text": "<string>" }, "fileUrls": [ { "url": "<string>", "name": "<string>", "type": "<string>" } ], "messageId": "<string>" } '
{ "success": true, "message": { "id": "<string>", "senderId": "<string>", "content": "<string>", "timestamp": 123, "readBy": [ "<string>" ], "type": "<string>" }, "fileMessages": [ { "id": "<string>", "senderId": "<string>", "content": "<string>", "timestamp": 123, "readBy": [ "<string>" ], "type": "<string>" } ] }
ID of the conversation to send the message to
Data for the message to send
Show child attributes
Type of message
TEXT
Content of the text message
Optional array of file URLs to send as separate file messages
URL where the file is stored
Name of the file
MIME type of the file
Optional frontend-generated unique ID for message correlation
Message sent successfully
Whether the message was sent successfully
The text message that was sent, if any
Message ID
ID of the user who sent the message
Message content
Timestamp when the message was sent
Array of user IDs who have read this message
Message type (text, system, etc.)
Array of file messages that were sent, if any