Skip to main content
POST
/
workers
/
{id}
/
chats
/
{chat_id}
/
messages
Send Message
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"
}
'
{
  "id": "rxsVGOYHC9u",
  "message": "Hello there",
  "sender_id": "3158",
  "sender_name": "Chris Davis",
  "date_created": "2024-01-05T17:10:00.000Z",
  "read": "1"
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string
required

Worker ID

chat_id
string
required

Chat ID

Body

application/json
message
string
required

Message content to send.

Response

Created

id
string

Message ID.

message
string

Message content.

sender_id
string

ID of the message sender.

sender_name
string

Name of the message sender.

date_created
string<date-time>

Timestamp when the message was sent.

read
string

Whether the message has been read.