Send Message: /message/ (POST)
Purpose:
Send a message to a channel/user.
Input:
- Headers:
- Content-Type: application/json
- Authorization: The JWT token of the user.
- JSON Body:
- message_type: (String) The type of message. For now this should be "MESSAGE".
- recipient_type: (String) The type of the recipient. Set to “CHANNEL” if sending to a channel, or “USER” if sending to a user.
- reference_id: (Uuid) This should be the user or channel id based on the recipient type.
- media_ids: (Uuid Array) The ids of the media files to attach to the message.
- content: (String) The content of the message.
Output (200):
{
"id": "3efd31fe-4fb0-431c-aa5e-e621a3c38396",
"message_type": "MESSAGE",
"recipient_type": "CHANNEL",
"reference_id": "aa09131f-bc17-4c24-8a6c-e3eb4e868b34",
"content": "Hello, world!",
"date_created": "2024-08-12T12:34:56",
"date_updated": "2024-08-12T12:34:56",
"user_id": "3a781657-7219-453e-b269-7b80454abc39",
"deleted": false
}