View the Record of Sent Messages

Request URL: http://{url}/platform/api/v1/messages/list?project_id=&project_id

Request Method: GET

Parameters: project_id, type: integer, the project ID of the sender's project

Request Example:

curl --location --request GET 'http://{url}/platform/api/v1/messages/list?project_id=10010' \
--header 'client_id: 10425'
--header 'client_secret: xxxxxxxxxxxx' \
--header 'Content-Type: application/json'

Correct Response:
{
    "code": 1,
    "data": {
        "list": [
            {
                "id": 1, // Message ID
                "read_data": {
                    "percent": "50.00%", // Read percentage
                    "read_count": 1, // Number of reads
                    "total": 2 // Total sent
                },
                "create_at": "2022-08-03 07:59:08", // Creation time
                "sender": "xxxx", // Sender's nft domain
                "recv_group": "xxx", // Receiver's group
                "receivers": ["xxx", ...], // List of receivers
                "subject": "xxxx", // Message subject
                "type": 2, // 2 represents message type
                "is_all_subscribers": bool // Whether it's sent to all subscribers
            },
            {...}
        ]
    },
    "msg": "Process success",
    "success": true
}

Error Response:
{
    "code": 0,
    "data": {},
    "msg": "Process failed",
    "success": false
}

Last updated