🔔 Notification
This endpoint is used to create a new notification for a user in our platform.
POST /notification
Request
Body Structure
*Required
walletAddress*
type: String
description: User's wallet address
signBytesResult*
type: String
description: User's signature of the bytes generated by Hermes Protocol
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.
originalBytes*
type: String
description: Bytes generated by Hermes Protocol
notificationTypeId*
type: String
description: Id of the notification type
chainId*
type: String
description: Id of the blockchain
categoryId*
type: String
description: Id of the category
projectId*
type: String
description: Id of the project
notificationParams*
type: Object
description: Params of the notification
Example Request
{
"walletAddress": "terra194wmtg08x0t2qd2822hul6aj7gthhw4agx8ja4",
"signBytesResult": {
"recid": 0,
"signature": {
"0": 227, "1": 173, "2": 11, "3": 53, "4": 26, "5": 176, "6": 229, "7": 167, "8": 169, "9": 125, "10": 26, "11": 240, "12": 253, "13": 127, "14": 41, "15": 35, "16": 247, "17": 108, "18": 204, "19": 200, "20": 104, "21": 205, "22": 55, "23": 78, "24": 150, "25": 4, "26": 46, "27": 216, "28": 105, "29": 41, "30": 178, "31": 128, "32": 80, "33": 47, "34": 53, "35": 2, "36": 6, "37": 92, "38": 251, "39": 80, "40": 39, "41": 24, "42": 176, "43": 137, "44": 184, "45": 109, "46": 216, "47": 121, "48": 72, "49": 191, "50": 202, "51": 242, "52": 110, "53": 218, "54": 236, "55": 100, "56": 156, "57": 10, "58": 237, "59": 73, "60": 202, "61": 188, "62": 180, "63": 186
},
"public_key": "{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AzuuYWlruwHstULnhIFC8cBGC227rVBjlmLwPz/S5MNg\"}"
},
"originalBytes": "d0ee4a2d-9bef-4308-9cea-dd1b3309b3f9",
"chainId": "zb1_002",
"categoryId": "zb3_0008",
"projectId": "zb2_0034",
"notificationTypeId": "002_0029",
"notificationParams": {
"contract": "terra1l2nd99yze5fszmhl5svyh5fky9wm4nz4etlgnztfu4e8809gd52q04n3ea",
"tokenContract": "terra17aj4ty4sz4yhgm08na8drc0v03v2jwr3waxcqrwhajj729zhl7zqnpc0ml",
"stakes": {
"flag": true,
"value": 10,
"type": "="
},
"queueUnbond": {
"flag": true,
"value": 25,
"type": "<"
},
"submitBatch": {
"flag": true,
"value": 12,
"type": "<="
},
"finishUnbond": {
"flag": true,
"value": 100,
"type": ">"
},
"scope": "zc5_0001"
}
}
info
See here a list of supported notifications, their parameters and their types.
Response
Status Codes
Code | Description |
---|---|
200 | Notification successfully created and activated |
202 | Notification successfully created, but disabled (no alert destination available) |
400 | Invalid request |
401 | Unauthorized |
Example Response
{
"walletAddress": "terra194wmtg08x0t2qd2822hul6aj7gthhw4agx8ja4",
"bytes": "fa133948-4aa6-4e7c-a54b-0117ed9b4efe",
"status": 200
}