🔔 Notification
This endpoint is used to create a new notification for a user in our platform.
All the notification types have the same general body structure
POST /notification
Request
Body Structure
Parameter | Requirement | Type | Description |
---|---|---|---|
walletAddress | mandatory | String | User's wallet address |
signBytesResult | mandatory | String | User's signature of the bytes generated by Hermes Protocol |
originalBytes | mandatory | String | Bytes generated by Hermes Protocol |
notificationTypeId | mandatory | String | Id of the notification type |
chainId | mandatory | String | Id of the blockchain |
categoryId | mandatory | String | Id of the category |
projectId | mandatory | String | Id of the project |
notificationParams | mandatory | Object | Parameters of the notification |
info
The bytes generated by us are used to verify the signature of the user. If the signature is valid, the notification will be created. If you didn't generate the bytes, see here how to do it.
Example Request
{
"walletAddress": "terra194wmtg0...ja4",
"signBytesResult": {
"recid": 0,
"signature": {
"0": 227,
"..." : "...",
"63": 186
},
"public_key": "{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"xxx\"}"
},
"originalBytes": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"chainId": "zb1_002",
"categoryId": "zb3_0008",
"projectId": "zb2_0034",
"notificationTypeId": "002_0029",
"notificationParams": {
... specific for each notification type
}
}
info
See here a list of supported notifications, their parameters and their types.
Response
Status Codes
Code | Description |
---|---|
200 | Notification successfully created |
202 | Notification successfully created but disable |
400 | Invalid request |
401 | Unauthorized |
Example Response
{
"walletAddress": "terra194wmtg0...ja4",
"bytes": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": 200
}