Channels

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.

GET /api/cowork/admin/teams/<teamID>/channels

Returns a list of channels available to the user in the following form:

[
    {
        "id":          "<ID of the channel>",
        "displayName": "<Name of the channel>"
    },
    ...
]
RESPONSE Fields Value Type Description
id String The GUID of the channel, used for details and further operations
displayName String The display name value of the channel, as displayed in the interface

Example Request

# Request
# Use user:password for authorization
GET /api/cowork/teams/3n1ytbwme7ngfyn9g9guwwurt/channels HTTP/1.1
Accept: */*
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
[
    {
        "id": "epmlsh7trr535mrs9z7xcfn1w",
        "displayName": "First Level"
    },
    {
        "id": "7x9brvwhsm3gi3xnl0otdk8y3",
        "displayName": "Second Level"
    }
]

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

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>", ... ]
}
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.

Note: Creating a channel requires the /api/cowork/admin context and administrative access to the team.

Note: A channel without member groups or member users derives the members from the team. If the team does no declare member users or groups, the channel is available to every user with the CoWork permission.

Example Request

# Request
# Use user:password for authorization
POST /api/cowork/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
{
    "id": "3y8kdto0lnx3ig3mshwvrb9x7",
    "displayName": "Third Channel"
}