转账通知回调
POST /safe/snapshots/notifications
当有链上转账产出与你的应用相关时,你可以通过这个接口来给用户发送转帐的消息通知。
API 端点 URL
https://api.mixin.one/safe/snapshots/notifications
请求体
{
"transaction_hash": "0xabc123...def",
"output_index": 0,
"receiver_id": "UUID"
}
transaction_hashstring:交易哈希output_indexinteger:交易输出序号receiver_idstring:接收用户 uuid
响应
请求成功时返回消息视图对象 MessageWithSessionView(JSON)。HTTP 状态码建议使用 200。
{
"type": "message",
"representative_id": "UUID",
"quote_message_id": "",
"conversation_id": "UUID",
"user_id": "UUID",
"session_id": "UUID",
"message_id": "UUID",
"category": "PLAIN_TEXT",
"data": "转账通知内容",
"data_base64": "",
"status": "SENT",
"source": "API",
"silent": false,
"expire_in": 0,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}