Skip to content

Create a channel

POST
/channels
curl --request POST \
--url https://desk.example.com/api/v1/channels \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "deploys", "visibility": "public", "topic": "Release announcements" }'

Required scope: channels:write

Creates a channel in the subject’s acting team and seeds the subject as its first member. A leading # in the name is stripped; a name that slugs to an existing channel in the team is rejected with 422.

Media typeapplication/json
object
name
required

The channel name, without a leading #.

string
<= 255 characters
visibility
required

Whether the channel is open to the whole team or invite-only.

string
Allowed values: public private
topic
string | null
<= 255 characters

The channel was created.

Media typeapplication/json
object
data
required
object
id
required
string format: uuid
name
required
string
slug
required
string
visibility
required

Whether the channel is open to the whole team or invite-only.

string
Allowed values: public private
topic
required
string | null
is_general
required

Whether this is the workspace’s default channel.

boolean
is_archived
required
boolean
is_direct
required

Whether this is a direct-message conversation.

boolean
created_at
required
string | null format: date-time
Example
{
"data": {
"visibility": "public"
}
}

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.