跳到主要内容

Create chatroom

POST 

/bv/chatroom/v1/chatrooms

Enables the creation of a new chatroom resource.

Request

Body

required
    custom_counters object[]

    Optional.

  • Array [
  • key stringrequired

    Required. Immutable. Indicates the key of the custom counter.

  • ]

Responses

A successful response.

Schema
    chatroom object
    id string

    Output only. The uuid of the chat.

    muted boolean

    Output only. Indicates whether the chat is muted or not.

    status string

    Possible values: [CHAT_STATUS_ACTIVE, CHAT_STATUS_INACTIVE]

    Output only. Indicates the current status of the chat.

    blocked_users object[]

    Output only. Indicates the blocked users of the chat.

  • Array [
  • id stringrequired

    Required. The uuid of the blocked user.

    device_id stringrequired

    Required. The device id of the blocked user.

    custom_name stringrequired

    Required. The custom name of the blocked user.

    blocked boolean

    Output only. Indicates whether or not the user was blocked.

    action_taker objectrequired

    Required. The user who blocked the user.

    id string

    Optional. Immutable. The id of the user. Required if in action trigger operation, otherwise will be an output only field.

    device_id string

    Output only. The device id of the user.

    custom_name stringrequired

    Required. The custom name of the user.

    is_admin boolean

    Output only. Indicates the user whether is an admin or not.

    is_guest boolean

    Output only. Indicates the user whether is a guest or not.

    blocked boolean

    Output only. Indicates the user whether is blocked or not.

  • ]
  • pinned_messages object[]

    Output only. Indicates the pinned messages of the chat.

  • Array [
  • message objectrequired

    Required. The message to pinned.

    id stringrequired

    Required. The uuid of the message to pinned.

    text stringrequired

    Required. The text of the message to pinned.

    sender objectrequired

    Required. The user who sends the message.

    id stringrequired

    Required. The uuid of the user who sends the message.

    device_id stringrequired

    Required. The device id of the user who sends the message.

    custom_name stringrequired

    Required. The custom name of the user who sends the message.

    action_taker objectrequired

    Required. The user who pinned the message.

    id string

    Optional. Immutable. The id of the user. Required if in action trigger operation, otherwise will be an output only field.

    device_id string

    Output only. The device id of the user.

    custom_name stringrequired

    Required. The custom name of the user.

    is_admin boolean

    Output only. Indicates the user whether is an admin or not.

    is_guest boolean

    Output only. Indicates the user whether is a guest or not.

    blocked boolean

    Output only. Indicates the user whether is blocked or not.

  • ]
  • active_poll object

    Output only. It'll be available when there is an active poll in the chat.

    id string

    Optional. Immutable. The uuid of the poll. Required if in update operation, otherwise will be an output only field.

    type stringrequired

    Possible values: [POLL_TYPE_SINGLE_CHOICE, POLL_TYPE_MULTI_CHOICE]

    Required. Indicates the type of the poll.

    status string

    Possible values: [POLL_STATUS_QUEUED, POLL_STATUS_ACTIVE, POLL_STATUS_CLOSED, POLL_STATUS_ARCHIVED]

    Output only. Indicates the status of the poll.

    votes_count int32

    Output only. Indicates the total votes in the poll.

    multi_choice object

    Optional. Required if type is POLL_TYPE_SINGLE_CHOICE or POLL_TYPE_MULTI_CHOICE.

    question stringrequired

    Required. The question of the poll.

    options object[]required

    Required. The options of the poll.

  • Array [
  • id string

    Optional. Immutable. The uuid of the option. Required if in update operation, otherwise will be an output only field.

    text stringrequired

    Required. The text of this option would be displayed to the viewer.

    corrected booleanrequired

    Required. Indicates this option would be highlighted to the viewer when the poll is closed.

    votes_count int32

    Output only. Indicates the total votes in the option.

  • ]
  • started_at date-time

    Output only. Indicates the time that the poll started.

    ended_at date-time

    Output only. Indicates the time that the poll ended.

    viewer_info object

    Output only. Indicates the viewer info in the chat.

    enabled booleanrequired

    Required. Indicates whether the chat will display the viewer info or not.

    count int32

    Output only. Indicates the number of the concurrent viewers.

    version_number int64

    Output only. Indicates the version of the viewer info that is useful to check the ordering with other versions.

    updated_at date-time

    Output only. Indicates the time that the viewer info was last updated.

    custom_counters object[]

    Output only. Indicates the custom counters of the chat.

  • Array [
  • key stringrequired

    Required. Immutable. Indicates the key of the custom counter.

    value int32

    Output only. Indicates the current count value of the custom counter.

    version_number int64

    Output only. Indicates the version of the counter that is useful to check the ordering with other versions.

    updated_at date-time

    Output only. Indicates the time that the counter was last updated.

    disabled boolean

    Output only. Indicates whether the custom counter is disabled or not.

  • ]
  • message_setting object

    Output only. The message setting of the chat.

    ttl string

    Output only. The time to reserve the chat messages.

    batch_window string

    Output only. The batch window for the chatroom messages.

    created_at date-time

    Output only. The time that the chat created.

    updated_at date-time

    Output only. The time that the chat last updated.

Loading...