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:
| Parameter | Type | Required | Description |
|---|---|---|---|
messageId | String | Yes | The message ID. Obtainable via the message routing service. See Message routing. |
channelId | String | Yes | The community channel ID. |
subchannelId | String | No | The 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. |
page | Number | No | Page 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:
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
result.metadata | Array | Message metadata as key-value pairs. Each metadata key maps to an object that contains the metadata value and updatedAt timestamp. |
result.metadata[].key | String | key |
result.metadata[].value | String | value |
result.metadata[].updatedAt | Number | Timestamp (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
}
]
}
}