Create a channel
POST {{baseUrl}}/v3/group_channels
Create a channel
Creates a new group channel.
If you are creating a 1-on-1 direct messaging channel for a user, it is recommended that you turn on the
distinct
property. If the property is turned off, a user can create a new channel even if they have had the previous chat between them, and therefore can't see previously sent messages or data in the new channel. On the other hand, if thedistinct
property is turned on, every 1-on-1 conversation between the same two users occurs within the same channel.
https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-create-a-channel
Request Body
{"user_ids"=>["<string>", "<string>"], "users"=>["<object>", "<object>"], "name"=>"<string>", "channel_url"=>"<string>", "cover_url"=>"<string>", "cover_file"=>"<binary>", "custom_type"=>"<string>", "data"=>"<string>", "is_distinct"=>"<boolean>", "is_public"=>"<boolean>", "is_super"=>"<boolean>", "is_ephemeral"=>"<boolean>", "access_code"=>"<string>", "inviter_id"=>"<string>", "strict"=>"<boolean>", "invitation_status"=>"<object>", "hidden_status"=>"<object>", "operator_ids"=>["<string>", "<string>"], "block_sdk_user_channel_join"=>"<boolean>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Api-Token | string | (Required) | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"channel_url":"\u003cstring\u003e","cover_url":"\u003cstring\u003e","created_at":"\u003cnumber\u003e","created_by":{"require_auth_for_profile_image":"\u003cboolean\u003e","nickname":"\u003cstring\u003e","user_id":"\u003cstring\u003e","profile_url":"\u003cstring\u003e"},"creator":{"require_auth_for_profile_image":"\u003cboolean\u003e","is_online":"\u003cboolean\u003e","user_id":"\u003cstring\u003e","access_token":"\u003cstring\u003e","has_ever_logged_in":"\u003cboolean\u003e","is_active":"\u003cboolean\u003e","last_seen_at":"\u003cinteger\u003e","nickname":"\u003cstring\u003e","discovery_keys":["\u003cstring\u003e","\u003cstring\u003e"],"session_tokens":["\u003cstring\u003e","\u003cstring\u003e"],"preferred_languages":["\u003cstring\u003e","\u003cstring\u003e"],"profile_url":"\u003cstring\u003e","created_at":"\u003cinteger\u003e","phone_number":"\u003cstring\u003e","local":"\u003cstring\u003e","locale":"\u003cstring\u003e","is_hide_me_from_friends":"\u003cboolean\u003e","is_shadow_blocked":"\u003cboolean\u003e","is_created":"\u003cboolean\u003e","metadata":{"constructor":{"arguments":{},"caller":{"value":"\u003cCircular reference to #/components/schemas/Function detected\u003e"},"length":"\u003cnumber\u003e","prototype":{}}},"description":"\u003cstring\u003e","end_at":"\u003cnumber\u003e","start_at":"\u003cnumber\u003e"},"custom_type":"\u003cstring\u003e","data":"\u003cstring\u003e","disappearing_message":{"message_survival_seconds":"\u003cnumber\u003e","is_triggered_by_message_read":"\u003cboolean\u003e"},"freeze":"\u003cboolean\u003e","ignore_profanity_filter":"\u003cboolean\u003e","hidden_state":"\u003cstring\u003e","invited_at":"\u003cnumber\u003e","inviter":{"require_auth_for_profile_image":"\u003cboolean\u003e","is_online":"\u003cboolean\u003e","user_id":"\u003cstring\u003e","access_token":"\u003cstring\u003e","has_ever_logged_in":"\u003cboolean\u003e","is_active":"\u003cboolean\u003e","last_seen_at":"\u003cinteger\u003e","nickname":"\u003cstring\u003e","discovery_keys":["\u003cstring\u003e","\u003cstring\u003e"],"session_tokens":["\u003cstring\u003e","\u003cstring\u003e"],"preferred_languages":["\u003cstring\u003e","\u003cstring\u003e"],"profile_url":"\u003cstring\u003e","created_at":"\u003cinteger\u003e","phone_number":"\u003cstring\u003e","local":"\u003cstring\u003e","locale":"\u003cstring\u003e","is_hide_me_from_friends":"\u003cboolean\u003e","is_shadow_blocked":"\u003cboolean\u003e","is_created":"\u003cboolean\u003e","metadata":{"constructor":{"arguments":{},"caller":{"value":"\u003cCircular reference to #/components/schemas/Function detected\u003e"},"length":"\u003cnumber\u003e","prototype":{}}},"description":"\u003cstring\u003e","end_at":"\u003cnumber\u003e","start_at":"\u003cnumber\u003e"},"is_access_code_required":"\u003cboolean\u003e","is_broadcast":"\u003cboolean\u003e","is_created":"\u003cboolean\u003e","is_discoverable":"\u003cboolean\u003e","is_distinct":"\u003cboolean\u003e","is_ephemeral":"\u003cboolean\u003e","is_frozen":"\u003cboolean\u003e","is_hidden":"\u003cboolean\u003e","is_public":"\u003cboolean\u003e","is_push_enabled":"\u003cboolean\u003e","is_super":"\u003cboolean\u003e","joined_at":"\u003cnumber\u003e","joined_member_count":"\u003cnumber\u003e","last_message":{"require_auth":"\u003cboolean\u003e","message_survival_seconds":"\u003cnumber\u003e","custom_type":"\u003cstring\u003e","mentioned_users":[{"user_id":"\u003cstring\u003e","nickname":"\u003cstring\u003e","profile_url":"\u003cstring\u003e","metadata":{"anyOf":"\u003cstring\u003e"}},{"user_id":"\u003cstring\u003e","nickname":"\u003cstring\u003e","profile_url":"\u003cstring\u003e","metadata":{"anyOf":"\u003cstring\u003e"}}],"translations":"\u003cobject\u003e","updated_at":"\u003cnumber\u003e","is_op_msg":"\u003cboolean\u003e","is_removed":"\u003cboolean\u003e","user":{"require_auth_for_profile_image":"\u003cboolean\u003e","is_active":"\u003cboolean\u003e","role":"\u003cstring\u003e","user_id":"\u003cstring\u003e","nickname":"\u003cstring\u003e","profile_url":"\u003cstring\u003e","metadata":{"anyOf":"\u003cstring\u003e"}},"file":"\u003cobject\u003e","message":"\u003cstring\u003e","data":"\u003cstring\u003e","message_retention_hour":"\u003cnumber\u003e","silent":"\u003cboolean\u003e","type":"\u003cstring\u003e","created_at":"\u003cnumber\u003e","channel_type":"\u003cstring\u003e","req_id":"\u003cstring\u003e","mention_type":"\u003cstring\u003e","channel_url":"\u003cstring\u003e","message_id":"\u003cnumber\u003e","size":"\u003cnumber\u003e","sorted_metaarray":["\u003cobject\u003e","\u003cobject\u003e"],"thread_info":"\u003cobject\u003e","parent_message_id":"\u003cnumber\u003e","parent_message_info":"\u003cobject\u003e","is_reply_to_channel":"\u003cboolean\u003e"},"max_length_message":"\u003cnumber\u003e","member_count":"\u003cnumber\u003e","members":[{"connection_status":"\u003cstring\u003e","friend_discovery_key":"\u003cstring\u003e","friend_name":"\u003cstring\u003e","is_active":"\u003cboolean\u003e","is_blocked_by_me":"\u003cboolean\u003e","is_blocking_me":"\u003cboolean\u003e","is_muted":"\u003cboolean\u003e","last_seen_at":"\u003cinteger\u003e","meta_data":{"constructor":{"arguments":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"caller":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"length":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"prototype":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}},"nickname":"\u003cstring\u003e","plain_profile_url":"\u003cstring\u003e","preferred_languages":["\u003cstring\u003e","\u003cstring\u003e"],"profile_url":"\u003cstring\u003e","require_auth":"\u003cboolean\u003e","restriction_info":{"description":"\u003cstring\u003e","end_at":"\u003cnumber\u003e","restriction_type":"\u003cstring\u003e"},"role":"\u003cstring\u003e","state":"\u003cstring\u003e","user_id":"\u003cstring\u003e"},{"connection_status":"\u003cstring\u003e","friend_discovery_key":"\u003cstring\u003e","friend_name":"\u003cstring\u003e","is_active":"\u003cboolean\u003e","is_blocked_by_me":"\u003cboolean\u003e","is_blocking_me":"\u003cboolean\u003e","is_muted":"\u003cboolean\u003e","last_seen_at":"\u003cinteger\u003e","meta_data":{"constructor":{"arguments":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"caller":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"length":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"},"prototype":{"value":"\u003cError: Too many levels of nesting to fake this schema\u003e"}}},"nickname":"\u003cstring\u003e","plain_profile_url":"\u003cstring\u003e","preferred_languages":["\u003cstring\u003e","\u003cstring\u003e"],"profile_url":"\u003cstring\u003e","require_auth":"\u003cboolean\u003e","restriction_info":{"description":"\u003cstring\u003e","end_at":"\u003cnumber\u003e","restriction_type":"\u003cstring\u003e"},"role":"\u003cstring\u003e","state":"\u003cstring\u003e","user_id":"\u003cstring\u003e"}],"message_offset_timestamp":"\u003cnumber\u003e","message_survival_seconds":"\u003cnumber\u003e","my_count_preference":"\u003cstring\u003e","my_last_read":"\u003cnumber\u003e","my_member_state":"\u003cstring\u003e","my_muted_state":"\u003cstring\u003e","my_push_trigger_option":"\u003cstring\u003e","my_role":"\u003cstring\u003e","name":"\u003cstring\u003e","operators":["\u003cstring\u003e","\u003cstring\u003e"],"sms_fallback":{"wait_seconds":"\u003cnumber\u003e","exclude_user_ids":["\u003cstring\u003e","\u003cstring\u003e"]},"unread_mention_count":"\u003cnumber\u003e","unread_message_count":"\u003cnumber\u003e"}