Group channel

Invite as members

Changed on

Invite as members

Invites one or more users as members to a group channel. Users can join a group channel immediately after receiving an invitation, without having to accept it. To give users an option to accept or decline an invitation, see update default channel invitation preference or update channel invitation preference. See this page to learn more about channel types.

Note: By default, blocked users are included when sending invitations. If you wish to exclude blocked users, contact our sales team.

https://sendbird.com/docs/chat/platform-api/v3/channel/inviting-a-user/invite-as-members-channel#1-invite-as-members

post/v3/group_channels/{channel_url}/invite

Request

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

Path parameters

channel_urlstring required

(Required)

Headers

api-tokenstring
Example:{{API_TOKEN}}

Request body

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
user_idsstring[] required

Response

Successful response

channel_urlstring required
count_preference'false' | 'all' | 'unread_message_count_only' | 'unread_mentioned_count_only'
cover_urlstring
created_atinteger
custom_typestring
datastring
delivery_receiptobject
freezeboolean
has_ai_botboolean
has_botboolean
hidden_state'hidden_allow_auto_unhide' | 'hidden_prevent_auto_unhide' | 'unhidden'
ignore_profanity_filterboolean
invited_atinteger
is_access_code_requiredboolean nullable
is_broadcastboolean
is_discoverableboolean
is_distinctboolean
is_ephemeralboolean
is_exclusiveboolean
is_hiddenboolean
is_mutedboolean
is_publicboolean
is_push_enabledboolean
is_superboolean
joined_member_countinteger
joined_tsinteger nullable
max_length_messageinteger
member_countinteger
member_state'invited' | 'joined' | 'none'
message_survival_secondsinteger
metadataobject nullable
my_role'' | 'none' | 'operator'
namestring
push_trigger_option'all' | 'mention_only' | 'off'
read_receiptobject
ts_message_offsetinteger
unread_mention_countinteger
unread_message_countinteger
user_last_readinteger

Example response

{
  "metadata": "{}",
  "count_preference": "false",
  "data": "data",
  "custom_type": "custom_type",
  "invited_at": 1,
  "disappearing_message": {
    "is_triggered_by_message_read": true,
    "message_survival_seconds": 6
  },
  "is_hidden": true,
  "created_at": 0,
  "is_super": true,
  "last_message": null,
  "user_last_read": 1,
  "is_discoverable": true,
  "is_muted": true,
  "joined_member_count": 5,
  "freeze": true,
  "is_distinct": true,
  "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": 2,
  "my_role": "",
  "inviter": {
    "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
  },
  "push_trigger_option": null,
  "member_count": 7,
  "message_survival_seconds": 7,
  "has_ai_bot": true,
  "cover_url": "cover_url",
  "is_ephemeral": true,
  "is_exclusive": true,
  "unread_mention_count": 6,
  "joined_ts": 5,
  "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": 7,
  "channel_url": "channel_url",
  "is_broadcast": true,
  "hidden_state": "hidden_allow_auto_unhide",
  "member_state": "invited",
  "is_push_enabled": true,
  "is_public": true,
  "name": "name",
  "read_receipt": {
    "key": 1
  },
  "sms_fallback": {
    "exclude_user_ids": [
      "exclude_user_ids",
      "exclude_user_ids"
    ],
    "wait_seconds": 1
  },
  "ignore_profanity_filter": true,
  "delivery_receipt": "{}",
  "is_access_code_required": true,
  "ts_message_offset": 1
}

Changes

    • info

      added to the response body allOf list for the response status

    • info

      removed from the response body allOf list for the response status

    • info

      added to the response body allOf list for the response status

    • info

      removed from the response body allOf list for the response status