Update chat room info

Update time: 2022/12/13 08:35:13

Update the information about a chat room, including the name, announcement, live streaming URL, extension field, event notification extension field, chat room queue management permission, and content moderation configuration.

Request URL

httpPOST https://api.netease.im/nimserver/chatroom/update.action HTTP/1.1
Content-Type:application/x-www-form-urlencoded;charset=utf-8

Request parameters

  • For information about how to set the header in a POST request, see API Call methods.

  • The settings of the body in a POST request:

ParameterTypeRequiredDescription
roomid longYes Chat room ID
name String No The name of a chat room, up to 128 characters.
announcement String No Announcement in a chat room, up to 4,096 characters.
broadcasturl String No Live streaming URL, up to 1,024 characters long.
ext String No Extension field, up to 4,096 characters long.
needNotify String No Whether notifications are sent for update events, The default value is true.
notifyExt String No Extension field for notification events, up to 2,048 characters.
queuelevel int No Queue management permissions. 0: all users have permissions. 1: only the owner and administrators have the permissions
bid StringNo Content moderation ID in JSON, {"textbid": "", "picbid": ""}. If unspecified, the original content moderation configuration is applied.

Example

cURL request

curlcurl -X POST -H "CheckSum: 95a26060d002a473057a71cb7d949d6e91d6d167" -H "AppKey: f1234540c12345673123456847aaaaaa" -H "Nonce: 1" -H "CurTime: 1451214690" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=66&name=mynewchatroom&announcement=mynewchatroom' 'https://api.netease.im/nimserver/chatroom/update.action'

Example response

Success response example

json"Content-Type": "application/json; charset=utf-8"
{
  "chatroom": {
    "roomid": 66,
    "valid": true,
    "announcement": "This is a chat room",
    "name": "mychatroom",
    "broadcasturl": "xxxxxx",
    "ext": "",
    "creator": "zhangsan"
  },
  "code": 200
}

Status codes

The status code returned in the response body. For more information, see Status codes.

Was this page helpful?
Yes
No
  • Request URL
  • Request parameters
  • Example
  • cURL request
  • Example response
  • Status codes