Request a list of channels of a team. The response contains the channel ID and display name. The channel ID can be used for subsequent requests to fetch details and messages from the channel. The admin user can also create new channels using this context.
Returns a list of channels available to the user in the following form:
[ { "channelId": "<ID of the channel>", "teamId": "<ID of the team>", "displayName": "<Name of the channel>", "description": "<Description of the channel>" }, ... ]
RESPONSE Fields | Value Type | Description |
---|---|---|
channelId | String | The GUID of the channel, used for details and further operations |
teamId | String | The GUID of the team, in which this channel was created |
displayName | String | The display name value of the channel, as displayed in the interface |
description | String | The description of the channel, as displayed in the interface |
# Request # Use user:password for authorization GET /api/cowork/admin/teams/3n1ytbwme7ngfyn9g9guwwurt/channels HTTP/1.1 Accept: */* Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u # Response HTTP/1.1 200 OK Content-Type: application/json [ { "channelId": "epmlsh7trr535mrs9z7xcfn1w", "teamId": "3n1ytbwme7ngfyn9g9guwwurt", "displayName": "First Level", "description": null, }, { "channelId": "7x9brvwhsm3gi3xnl0otdk8y3", "teamId": "3n1ytbwme7ngfyn9g9guwwurt", "displayName": "Second Level", "description": null, } ]
Creates a new channel using the following JSON. The response is a channel entry, being the newly created channel.
{ "displayName": "<Name of the channel>", "description": "<A description>", "memberGroupIDs": [ "<GUID>", ... ], "memberUserIDs": [ "<GUID>", ... ], "membersInherited": TRUE|FALSE }
REQUEST Fields | Value Type | Description |
---|---|---|
displayName | String | The display name value of the channel, as displayed in the interface |
description | String | Optional description of a team |
memberGroupIDs | List of Strings | Optional list of group IDs derived from the Users and Groups manager to allow access to the channel for. Only user in these groups will be able to join this channel. |
memberUserIDs | List of Strings | Optional list of user IDs derived from the Users and Groups manager to allow access to the channel for. Only these user will be able to join this channel. |
membersInherited | Boolean | Optional TRUE, if the channel should inherit the members of the team. Setting the memberGroupIDs and memberUserIDs has no effect. FALSE if the channel should be set up with specific memberships. |
Note: Creating a channel requires the /api/cowork/admin
context and administrative access to the team.
# Request # Use user:password for authorization POST /api/cowork/admin/teams/3n1ytbwme7ngfyn9g9guwwurt/channels HTTP/1.1 Accept: */* Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u {"displayName":"Third Channel","memberUserIDs":["truwwug9g9nyfgn7emwbty1n3"]} # Response HTTP/1.1 200 OK Content-Type: application/json { "channelId": "3y8kdto0lnx3ig3mshwvrb9x7", "teamId": "3n1ytbwme7ngfyn9g9guwwurt", "displayName": "Third Channel", "description": null, }