curl --request POST \
--url https://api.example.com/api/send_room_message \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"room_id": 123,
"message": "<string>"
}
'{
"message": "<string>"
}Send a message to a chat room
curl --request POST \
--url https://api.example.com/api/send_room_message \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"room_id": 123,
"message": "<string>"
}
'{
"message": "<string>"
}{
"error": "missing fields"
}
{
"error": "unauthorized"
}
{
"error": "you are not in this room"
}
curl -X POST https://api.mirage.com/api/send_room_message \
-H "Authorization: your-auth-token" \
-H "Content-Type: application/json" \
-d '{
"room_id": 42,
"message": "Hello everyone!"
}'
{
"message": "sent"
}
username: The sender’s usernamemessage: The message contentcreated_at: Unix timestamp of when the message was sentroom_id: The room ID the message belongs to