System alerts

What is a system alert

A system alert is a notification generated by monitoring tools to notify your team of changes, high-risk actions, or failures in the IT environment. For example, when the account balance falls below a certain value, the system can generate an alert and send a notification via email or webhook.

How to create a system alert

  1. If you want to use a webhook to receive notification, you first need to configure a webhook url. This url will also receive other system notifications, such as account creation and order creation. Email notifications will be sent to the email address you configured when onboarding.
  2. To create a new alert, you need to call the POST /v1/alerts endpoint. You can create up to 20 alerts. For example, to create an alert when the USD account balance is less than 1000:
    • Set the type to account
    • Set the name parameter to give the alert a name. This does not have to be unique.
    • Use the methods parameter to configure whether to send email or webhook notifications, or both.
    • Set the conditions parameter: "conditions": [ { "field": "balance", "operator": "<=", "value": "1000" }, { "field": "currency", "operator": "=", "value": "USD" } ].
    • Set the message parameter to specify the content of the alert, such as "usd account balance < 1000 alert!". When the alert is successfully created, you will receive the ID of the alert rule.
  3. You can also modify or delete an existing alert.

How does a system alert work

An alert is triggered when the system detects that the conditions specified in the alert rule are met. The system monitors your configured conditions every hour and checks the corresponding resource objects according to your configuration. If the conditions are met, a webhook or email notification will be sent to notify you of the alert. This allows you to stay informed about important events and take action as needed.