CoWork

The CoWork Web API is an interface to access teams, channels, and messages from CoWork. It allows administration of teams and channels for users with either the Team Admin or CoWork Administration permissions.

Requests have to be sent as HTTP requests with the scheme https://[HOST]:[PORT]/api/cowork/[Command]. To access the CoWork Web API a user has to have the required permissions - which have to be set in the Users and Groups manager. All clients have to be authenticated in order to use the API.

Note: The CoWork Web API can be used only by users who have the Web API and CoWork permission set.

Features

The CoWork Web API exposes the following features:

  • Listing teams, channels, and messages a user has access to
  • Create teams if the user is a CoWork admin
  • Create channels if the user is a team admin
  • Update teams and channel information
  • Send messages and attachments to channels
  • Delete messages

Commands

The following commands are available for the CoWork Web API:

Command Description
Administrative Commands
/admin Access administrative context
/admin/teams List of teams the admin can manage
/admin/teams/<teamID> Team details
/admin/teams/<teamID>/channels List of available channels in a team that the admin can manage
/admin/teams/<teamID>/channels/<channelID> Channel details
/admin/teams/<teamID>/channels/<channelID>/botmessage Send a bot message into the channel
User Commands
/user Show and update current user's status
/teams List of available teams
/teams/directmessages List of users's direct message channels
/teams/directmessages/<userID> Details of a direct message channel
/teams/directmessages/<userID>/leave Leave a direct message channel
/teams/<teamID> Team details
/teams/<teamID>/channels List of available channels in a team
/teams/<teamID>/channels/<channelID> Channel details
/teams/<teamID>/channels/<channelID>/leave Alternative handler to leave a direct message channel
/teams/<teamID>/channels/<channelID>/members List of member users and their status
/teams/<teamID>/channels/<channelID>/messages List messages in a channel
/teams/<teamID>/channels/<channelID>/messages/<messageID> Message Details
/teams/<teamID>/channels/<channelID>/messages/<messageID>/attachments List of attachments in a message
/teams/<teamID>/channels/<channelID>/messages/<messageID>/attachments/<attachmentsID> Download an attachment along with its details