Sends a new message in a chat.
cURL
curl --request POST \ --url https://api.roostedhr.com/api/1_12/workers/{id}/chats/{chat_id}/messages \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <api-key>' \ --data ' { "message": "Hello there" } '
201
Success
{ "id": "rxsVGOYHC9u", "message": "Hello there", "sender_id": "3158", "sender_name": "Chris Davis", "date_created": "2024-01-05T17:10:00.000Z", "read": "1" }
Worker ID
Chat ID
Message content to send.
Created
Message ID.
Message content.
ID of the message sender.
Name of the message sender.
Timestamp when the message was sent.
Whether the message has been read.