Skip to content

Add a channel member

POST
/channels/{channel}/members
curl --request POST \
--url https://desk.example.com/api/v1/channels/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Required scope: members:write

Adds a team member to a private channel. A bot may do this on any private channel it belongs to; a personal access token defers to the same rule the app applies — an existing member of the private channel, or a team admin or above.

channel
required
string format: uuid

The channel’s id.

Media typeapplication/json
object
user_id
required

The id of a team member who is not already in the channel.

string format: uuid
Examplegenerated
{
"user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The member was added.

Media typeapplication/json
object
data
required

A workspace member, human or bot.

object
id
required
string format: uuid
name
required
string
type
required
string
Allowed values: human bot
Example
{
"data": {
"type": "human"
}
}

The token is missing, malformed, or revoked.

Media typeapplication/json

The shape every error response carries.

object
message
required
string
Examplegenerated
{
"message": "example"
}

The token lacks the scope this operation requires, or its subject may see the resource but not perform this action on it.

Media typeapplication/json

The shape every error response carries.

object
message
required
string
Examplegenerated
{
"message": "example"
}

The resource does not exist, is outside the token’s workspace, or the integrations platform is disabled. A channel the subject cannot see is reported here rather than as a 403, so the API never leaks its existence.

Media typeapplication/json

The shape every error response carries.

object
message
required
string
Examplegenerated
{
"message": "example"
}

The request body failed validation.

Media typeapplication/json
object
message
required
string
errors
required

The failing fields, each mapped to its messages.

object
key
additional properties
Array<string>
Examplegenerated
{
"message": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}

The per-token rate limit (INTEGRATIONS_API_RATE_LIMIT requests per minute) was exceeded. Retry after the Retry-After header.

Media typeapplication/json

The shape every error response carries.

object
message
required
string
Examplegenerated
{
"message": "example"
}
Retry-After
integer

Seconds to wait before retrying.