Skip to main content

Get message metadata

Retrieve the metadata (key-value pairs) for a specified message by its message ID.

Request method

POST: https://Base URL/v4/community-channel/message/metadata/list

Rate limit: 100 requests per second

Signature required: All server API requests require signature verification. See API request signature.

Request body

The request body is in application/json format and supports the following parameters:

ParameterTypeRequiredDescription
messageIdStringYesThe message ID. Obtainable via the message routing service. See Message routing.
channelIdStringYesThe community channel ID.
subchannelIdStringNoThe subchannel ID. Required if the message was sent with a subchannel ID; must be omitted if the message was sent without one. On the client side, this corresponds to channelId.
pageNumberNoPage number. By default, the API returns up to 300 metadata entries.

Request example

HTTP
POST /v4/community-channel/message/metadata/list HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1585127132438
Signature: 890b422b75c1c5cb706e4f7921df1d94e69c17f4
Content-Type: application/json

{
"messageId": "MSG-001",
"channelId": "community-001",
"subchannelId": "sub-001",
"page": 1
}

Response

The response body contains a JSON object with the following structure:

FieldTypeDescription
codeNumberStatus code. 0 indicates success.
result.metadataArrayMessage metadata as key-value pairs. Each metadata key maps to an object that contains the metadata value and updatedAt timestamp.
result.metadata[].keyStringkey
result.metadata[].valueStringvalue
result.metadata[].updatedAtNumberTimestamp (milliseconds) when this metadata entry was last updated.

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json
{
"code": 0,
"result": {
"metadata": [
{
"key": "key1",
"value": "delivered",
"updatedAt": 1742457600000
}
]
}
}