Delete metadata
Delete a single custom key-value pair from a specific open channel. You must provide the owner user ID of the entry.
Request
POST: https://[Base URL](/platform-chat-api/base-url)/chatroom/entry/remove.json
Rate limit: 100 metadata operations per second, shared with the batch delete endpoint (/chatroom/entry/batch/remove.json). If you only use this single-delete endpoint, you can call it 100 times per second.
Signature: Required. See API request signature.
Request body
Content type: application/x-www-form-urlencoded
| Parameter | Type | Required | Description |
|---|---|---|---|
chatroomId | String | Yes | The open channel ID. |
userId | String | Yes | The user ID performing the operation. The user does not need to be in the open channel when using the server API. |
key | String | Yes | Metadata key to delete. Supports letters, numbers, and +, =, -, _. Case-sensitive. Max 128 characters. |
objectName | String | No | Message type for the metadata change notification. Typically RC:chrmKVNotiMsg, or a custom type. When provided, a notification message is sent. Note: The SDK syncs metadata changes from the server by default, independent of this notification. |
content | String | No | Content of the notification message, as a JSON string. When objectName is RC:chrmKVNotiMsg, the content must include type, key, and value fields. |
Request example
HTTP
POST /chatroom/entry/remove.json HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/x-www-form-urlencoded
chatroomId=kvchatroom2&userId=jrT1igbKr
Response
| Field | Type | Description |
|---|---|---|
code | Number | Return code. 200 indicates success. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"code":200}