Group channel

Create a group channel

Changed on

Create a group channel

You can create a group channel for 1-to-1 and 1-to-N conversations. By default, group channels are used for conversations between up to 100 members. This number can stretch up to tens of thousands in Supergroup channels. Group channels can either be private and invite only, or public. They support typing indicators, unread count and read receipts, allowing for an interactive chat experience. A user can join up to 2000 group channels, and higher numbers would negatively impact the performance for the end user. The Chat history is turned off by default and its settings can be changed on Sendbird Dashboard by going to Settings > Chat > Channels > Group channels > Chat history. To learn more about group channels, see Channel Overview.

If you are seeing the error message Maximum "channel join" count reached., then consider deleting channels that are no longer used. For situations where an agent connects with many customers such as support, delivery logistics or sales, we recommend using Sendbird Desk.

https://sendbird.com/docs/chat/platform-api/v3/channel/creating-a-channel/create-a-group-channel#1-create-a-group-channel

post/v3/group_channels

Request

  • Base URL
    https://api-APP_ID.sendbird.com
  • Auth
    none declared

Headers

api-tokenstring
Example:{{API_TOKEN}}

Request body

access_codestring nullable
block_sdk_user_channel_joinboolean nullable
channel_urlstring
cover_filestring binary

Uploads a file for the channel cover image.

cover_urlstring
custom_typestring
datastring
hidden_statusobject

Specifies one or more key-value pair items which set the channel's hidden status for each user. The key should be a user_id and the value should be their hidden status. Acceptable values are limited to the following:<br />- unhidden (default): the channel is included in when retrieving a list of group channels.<br />- hidden_allow_auto_unhide: the channel automatically gets unhidden when receiving a new message.<br />- hidden_prevent_auto_unhide: the channel keeps hidden though receiving a new message.

invitation_statusobject

Specifies one or more key-value pair items which set the invitation status of each user invited to the channel. The key should be a user_id and the value should be their joining status. Acceptable values are joined, invited_by_friend, and invited_by_non_friend. (Default: joined)

inviter_idstring
is_distinctboolean
is_ephemeralboolean
is_publicboolean
is_superboolean
namestring
operator_idsstring[]
strictboolean
user_idsstring[]

Example request

{
  "users": [
    {
      "metadata": "{}",
      "is_active": true,
      "preferred_languages": [
        "preferred_languages",
        "preferred_languages"
      ],
      "require_auth_for_profile_image": true,
      "unread_channel_count": 6,
      "discovery_keys": [
        "discovery_keys",
        "discovery_keys"
      ],
      "profile_url": "profile_url",
      "is_created": true,
      "created_at": 9,
      "has_ever_logged_in": true,
      "locale": "locale",
      "unread_message_count": 8,
      "access_token": "access_token",
      "is_shadow_blocked": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "phone_number": "phone_number",
      "is_online": true,
      "state": "",
      "is_hide_me_from_friends": true,
      "last_seen_at": 9
    }
  ]
}

Response

Successful response

channel_urlstring required
cover_urlstring
created_atinteger
custom_typestring
datastring
delivery_receiptobject
freezeboolean
has_ai_botboolean
has_botboolean
idinteger
ignore_profanity_filterboolean
is_access_code_requiredboolean
is_broadcastboolean
is_discoverableboolean
is_distinctboolean
is_ephemeralboolean
is_publicboolean
is_superboolean
joined_member_countinteger
max_length_messageinteger
member_countinteger
message_survival_secondsinteger
namestring
read_receiptobject
unread_mention_countinteger
unread_message_countinteger

Example response

{
  "data": "data",
  "custom_type": "custom_type",
  "channel": {
    "cover_url": "cover_url",
    "data": "data",
    "custom_type": "custom_type",
    "max_length_message": 6,
    "name": "name",
    "created_at": 0,
    "member_count": 1,
    "channel_url": "channel_url"
  },
  "disappearing_message": {
    "is_triggered_by_message_read": true,
    "message_survival_seconds": 6
  },
  "created_at": 5,
  "is_super": true,
  "last_message": {
    "data": "data",
    "message_events": {
      "update_last_message": true,
      "update_mention_count": true,
      "send_push_notification": "send_push_notification",
      "update_unread_count": true
    },
    "custom_type": "custom_type",
    "is_reply_to_channel": true,
    "created_at": 7,
    "is_removed": true,
    "type": "type",
    "req_id": "req_id",
    "file": "{}",
    "updated_at": 3,
    "translations": "{}",
    "thread_info": "{}",
    "mentioned_users": [
      {
        "metadata": "{}",
        "require_auth_for_profile_image": true,
        "is_active": true,
        "role": "",
        "user_id": "user_id",
        "profile_url": "profile_url",
        "nickname": "nickname",
        "is_blocked_by_me": true
      },
      {
        "metadata": "{}",
        "require_auth_for_profile_image": true,
        "is_active": true,
        "role": "",
        "user_id": "user_id",
        "profile_url": "profile_url",
        "nickname": "nickname",
        "is_blocked_by_me": true
      }
    ],
    "channel_type": "channel_type",
    "message_survival_seconds": 9,
    "silent": true,
    "parent_message_id": 4,
    "parent_message_info": {
      "file": {
        "file_name": "file_name",
        "file_type": "file_type",
        "require_auth": true,
        "thumbnails": [
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          },
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          }
        ],
        "url": "url",
        "file_size": 4
      },
      "custom_type": "custom_type",
      "files": [
        {
          "file_name": "file_name",
          "file_type": "file_type",
          "require_auth": true,
          "thumbnails": [
            {
              "real_width": 1,
              "width": 1,
              "plain_url": "plain_url",
              "real_height": 1,
              "url": "url",
              "height": 7
            },
            {
              "real_width": 1,
              "width": 1,
              "plain_url": "plain_url",
              "real_height": 1,
              "url": "url",
              "height": 7
            }
          ],
          "url": "url",
          "file_size": 4
        },
        {
          "file_name": "file_name",
          "file_type": "file_type",
          "require_auth": true,
          "thumbnails": [
            {
              "real_width": 1,
              "width": 1,
              "plain_url": "plain_url",
              "real_height": 1,
              "url": "url",
              "height": 7
            },
            {
              "real_width": 1,
              "width": 1,
              "plain_url": "plain_url",
              "real_height": 1,
              "url": "url",
              "height": 7
            }
          ],
          "url": "url",
          "file_size": 4
        }
      ],
      "message": "message",
      "type": "type",
      "user": {
        "metadata": "{}",
        "is_active": true,
        "preferred_languages": [
          "preferred_languages",
          "preferred_languages"
        ],
        "require_auth_for_profile_image": true,
        "unread_channel_count": 6,
        "discovery_keys": [
          "discovery_keys",
          "discovery_keys"
        ],
        "profile_url": "profile_url",
        "is_created": true,
        "created_at": 9,
        "has_ever_logged_in": true,
        "locale": "locale",
        "unread_message_count": 8,
        "access_token": "access_token",
        "is_shadow_blocked": true,
        "user_id": "user_id",
        "nickname": "nickname",
        "phone_number": "phone_number",
        "is_online": true,
        "state": "",
        "is_hide_me_from_friends": true,
        "last_seen_at": 9
      },
      "ts": 5
    },
    "require_auth": true,
    "message_id": 1,
    "sorted_metaarray": [
      {
        "value": [
          "value",
          "value"
        ],
        "key": "key"
      },
      {
        "value": [
          "value",
          "value"
        ],
        "key": "key"
      }
    ],
    "mention_type": "mention_type",
    "message": "message",
    "channel_url": "channel_url",
    "is_op_msg": true,
    "message_retention_hour": 6,
    "extended_message_payload": null,
    "files": [
      {
        "file_name": "file_name",
        "file_type": "file_type",
        "require_auth": true,
        "thumbnails": [
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          },
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          }
        ],
        "url": "url",
        "file_size": 4
      },
      {
        "file_name": "file_name",
        "file_type": "file_type",
        "require_auth": true,
        "thumbnails": [
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          },
          {
            "real_width": 1,
            "width": 1,
            "plain_url": "plain_url",
            "real_height": 1,
            "url": "url",
            "height": 7
          }
        ],
        "url": "url",
        "file_size": 4
      }
    ],
    "reactions": [
      {
        "updated_at": 2,
        "user_ids": [
          "user_ids",
          "user_ids"
        ],
        "key": "key"
      },
      {
        "updated_at": 2,
        "user_ids": [
          "user_ids",
          "user_ids"
        ],
        "key": "key"
      }
    ],
    "user": {
      "metadata": "{}",
      "require_auth_for_profile_image": true,
      "is_active": true,
      "role": "",
      "user_id": "user_id",
      "profile_url": "profile_url",
      "nickname": "nickname",
      "is_blocked_by_me": true
    }
  },
  "is_discoverable": true,
  "joined_member_count": 7,
  "freeze": true,
  "is_distinct": true,
  "operators": [
    {
      "metadata": "{}",
      "is_active": true,
      "preferred_languages": [
        "preferred_languages",
        "preferred_languages"
      ],
      "require_auth_for_profile_image": true,
      "unread_channel_count": 6,
      "discovery_keys": [
        "discovery_keys",
        "discovery_keys"
      ],
      "profile_url": "profile_url",
      "is_created": true,
      "created_at": 9,
      "has_ever_logged_in": true,
      "locale": "locale",
      "unread_message_count": 8,
      "access_token": "access_token",
      "is_shadow_blocked": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "phone_number": "phone_number",
      "is_online": true,
      "state": "",
      "is_hide_me_from_friends": true,
      "last_seen_at": 9
    },
    {
      "metadata": "{}",
      "is_active": true,
      "preferred_languages": [
        "preferred_languages",
        "preferred_languages"
      ],
      "require_auth_for_profile_image": true,
      "unread_channel_count": 6,
      "discovery_keys": [
        "discovery_keys",
        "discovery_keys"
      ],
      "profile_url": "profile_url",
      "is_created": true,
      "created_at": 9,
      "has_ever_logged_in": true,
      "locale": "locale",
      "unread_message_count": 8,
      "access_token": "access_token",
      "is_shadow_blocked": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "phone_number": "phone_number",
      "is_online": true,
      "state": "",
      "is_hide_me_from_friends": true,
      "last_seen_at": 9
    }
  ],
  "members": [
    {
      "metadata": "{}",
      "is_active": true,
      "is_blocking_me": true,
      "require_auth_for_profile_image": true,
      "role": "",
      "profile_url": "profile_url",
      "muted_end_at": 2,
      "delivered_ts": 9,
      "do_not_disturb": true,
      "is_muted": true,
      "read_ts": 4,
      "is_blocked_by_me": true,
      "friend_name": "friend_name",
      "friend_discovery_key": [
        "friend_discovery_key",
        "friend_discovery_key"
      ],
      "muted_description": "muted_description",
      "push_enabled": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "is_online": true,
      "push_trigger_option": null,
      "state": "",
      "last_seen_at": 3
    },
    {
      "metadata": "{}",
      "is_active": true,
      "is_blocking_me": true,
      "require_auth_for_profile_image": true,
      "role": "",
      "profile_url": "profile_url",
      "muted_end_at": 2,
      "delivered_ts": 9,
      "do_not_disturb": true,
      "is_muted": true,
      "read_ts": 4,
      "is_blocked_by_me": true,
      "friend_name": "friend_name",
      "friend_discovery_key": [
        "friend_discovery_key",
        "friend_discovery_key"
      ],
      "muted_description": "muted_description",
      "push_enabled": true,
      "user_id": "user_id",
      "nickname": "nickname",
      "is_online": true,
      "push_trigger_option": null,
      "state": "",
      "last_seen_at": 3
    }
  ],
  "max_length_message": 9,
  "id": 2,
  "member_count": 6,
  "message_survival_seconds": 3,
  "has_ai_bot": true,
  "cover_url": "cover_url",
  "is_ephemeral": true,
  "unread_mention_count": 1,
  "created_by": {
    "metadata": "{}",
    "require_auth_for_profile_image": true,
    "is_active": true,
    "role": "",
    "user_id": "user_id",
    "profile_url": "profile_url",
    "nickname": "nickname",
    "is_blocked_by_me": true
  },
  "has_bot": true,
  "unread_message_count": 2,
  "channel_url": "channel_url",
  "is_broadcast": true,
  "is_public": true,
  "name": "name",
  "read_receipt": {
    "key": 6
  },
  "sms_fallback": {
    "exclude_user_ids": [
      "exclude_user_ids",
      "exclude_user_ids"
    ],
    "wait_seconds": 1
  },
  "ignore_profanity_filter": true,
  "delivery_receipt": {
    "key": 5
  },
  "is_access_code_required": true
}

Changes

    • breaking

      the request property / became not nullable

    • warning

      removed the request property //

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property default value was added

    • breaking

      the request property became required

    • breaking

      the request property // became required

    • breaking

      the // request property format changed from no format to int64

    • breaking

      the /// request property type changed from object to string

    • warning

      deleted the header request parameter Api-Token

    • warning

      removed the request property //

    • warning

      removed the request property //

    • warning

      removed the request property //

    • warning

      removed the request property //

    • info

      api operation id gcCreateChannel removed and replaced with createAGroupChannel

    • info

      added the new optional header request parameter api-token

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      the request property became optional