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
Optional array of file URLs to send as separate file messages
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
Array of file messages that were sent, if any