Bot-Message

A Bot-Message can only be send by administrative team users. They can not, however, read messages in channels due to the privacy concept. Bot-Messages can be used to inform users in all channels about important events, such as a server reboot.

POST /api/cowork/admin/admin/teams/<teamID>/channels/<channelID>/botmessage and PUT /api/cowork/admin/teams/<teamID>/channels/<channelID>/botmessage

Send a message to the given team using the Bot user and the following JSON. The response is the ID of the newly created message.

{
    "text":         "<The text to send to the channel>",
    "attachments": [ <attachment descriptions> ],
}
REQUEST Fields Value Type Description
text String The optional text message to send to the channel
attachments String Optional list of attachments to send along with the message

Note: Either the text or ''attachments' field have to filled.

Example Request

# Request
# Use user:password for authorization
POST /api/cowork/admin/teams/3n1ytbwme7ngfyn9g9guwwurt/channels/3y8kdto0lnx3ig3mshwvrb9x7/botmessage HTTP/1.1
Accept: */*
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
{"text":"Hey there."}
 
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
"00kunwfaycw5sqp8gc8kc0jms"