Skip to main content

addChannelMembers

Requires an authenticated session.

Adds people to a channel. Every person must belong to the same organization as the channel, otherwise the whole request is refused. Only an admin or manager, or an admin of that channel, can do this. 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 AddChannelMembers($channelId: String!, $memberIds: [String!]!) {
addChannelMembers(channelId: $channelId, memberIds: $memberIds) {
id
name
createdAt
createdBy
description
isDefault
conversation {
id
title
type
createdAt
channelId
isGroup
}
}
}

Variables:

{
"channelId": "string",
"memberIds": [
"string"
]
}

Response:

{
"data": {
"addChannelMembers": {
"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
}
}
}
}
addChannelMembers(
channelId: String!
memberIds: [String!]!
): ChatChannel!

Arguments​

addChannelMembers.channelId ● String! non-null scalar​

The ID of the chat channel.

addChannelMembers.memberIds ● [String!]! non-null scalar​

The IDs of the people to add.

Type​

ChatChannel object​

A chat channel that people can join.