POST/v1/bots

Create Monitor

Create a new monitoring bot with specified rules and actions. The bot will monitor blockchain transactions based on the provided expressions and trigger configured actions when conditions are met.

Endpoint Details

POST

https://api.monitor.getfailsafe.com/server

https://api.monitor.getfailsafe.com/server/v1/bots

Request Body Schema

Monitor configuration including name, watch rules, and trigger actions

{
  "botName": "string",
  "botDescription": "string (optional)",
  "chainId": 1,
  "active": true,
  "severity": "High|Medium|Low|Critical",
  "watchRule": {
    "watchRuleType": "simple|advanced",
    "expressions": [
      "system.emitted(tx1.itx1.CorkHook.E.AddedLiquidity) && system.uintCompare(tx1.itx1.CorkHook.E.AddedLiquidity.mintedLp, >, 0)"
    ]
  },
  "notifications": [
    "notification_id_1",
    "notification_id_2"
  ],
  "botVersion": "string (optional)",
  "options": {
    "topLevelTxBlockRange": 100
  }
}