Skip to main content

createChatChannel

Requires an authenticated session.

Creates a team chat channel, public or private. The creator is added as the channel's admin. Only admins and managers can create channels. Needs a signed-in user.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CreateChatChannel($input: CreateChannelInput!) {
createChatChannel(input: $input) {
id
name
createdAt
createdBy
description
isDefault
conversation {
id
title
type
createdAt
channelId
isGroup
}
}
}

Variables:

{
"input": {
"name": "string"
}
}

Response:

{
"data": {
"createChatChannel": {
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"createdBy": "string",
"description": "string",
"isDefault": true,
"conversation": {
"id": "id",
"title": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"channelId": "string",
"isGroup": true
}
}
}
}
createChatChannel(
input: CreateChannelInput!
): ChatChannel!

Arguments​

createChatChannel.input ● CreateChannelInput! non-null input​

The channel's name and optional description, and whether it is private or the default channel.

Type​

ChatChannel object​

A chat channel that people can join.