Skip to main content

Delete message metadata

Delete metadata from a sent message in a direct or group channel.

By default, metadata operations via the server API are not synced to the operator's client, which may cause inconsistency. Set syncToSender to 1 if needed.

Request

POST: https://[Base URL](/platform-chat-api/base-url)/v4/channel-type/message/metadata/delete

Rate limit: 100 requests per second. Of these, group channel metadata deletions are limited to 20 per second. See also known issues.

Authentication: All server API requests require signature verification. See API request signing.

Request body

Content type: application/json

ParameterTypeRequiredDescription
messageUIDStringYesUnique message ID. Obtainable via message routing.
userIdStringYesOperator's user ID — the user deleting the metadata.
channelTypeNumberYesChannel type. 1 (direct) or 3 (group).
channelIdStringYesTarget channel ID (user ID for direct channels, group ID for group channels).
keysString[]YesKeys of the metadata entries to delete. Up to 100 keys per request.
syncToSenderNumberNoWhether to sync the metadata deletion to the operator's client. 1: sync. 0 (default): do not sync. See How to sync sent messages to the sender's client.

Request example

HTTP
POST /v4/channel-type/message/metadata/delete HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Timestamp: 1585127132438
Nonce: 14314
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"messageUID": "BRGM-DEN2-01E4-BN66",
"userId": "tjw3zbMrU",
"channelType": 1,
"channelId": "WNYZbMqpH",
"keys": ["11111"],
"syncToSender": 1
}

Response

PropertyTypeDescription
codeNumberStatus code. 0 indicates success.

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"code":0}