How do I use usage alerts?

Usage alerts gives you the ability to keep tabs on the usage for individual SIMs.

HelpEach SIM in our system has a usage limit which is a limit set in bytes at which the given SIM will be blocked from using any more data for the given period. This limit is mandatory for all SIMs and defaults to "10GB per month". Optionally, an alert threshold can be set.

Hitting the alert threshold or usage limit will send out a notification via webhooks if an appropriate webhook has been set up. You can see how to set up a webhook here. Here's an example of what the event will look like:

{
"type": "usage-alert",
"reason": "alert-threshold",
"time": "2021-12-01T10:08:36.530Z",
"sim_id": "000000001",
"iccid": "89457387300000000105",
"ipv4": "100.96.0.1",
"data_limit": {
"used": 1101976,
"total": 2000000,
"type": "monthly",
"period": "202112",
"alert_threshold": 1000000,
"resets_at": "2022-01-01T00:00:00.000Z"
},
"sim_label": "foobar"
}

The "reason" field will either contain the string "blocked" or "alert-threshold" depending on if it was the usage limit that was reached or the alert threshold respectively.

The data limit parameters can be seen in the sidebar on the SIM page, and can be edited by clicking the edit/pencil-icon.

sim-page-data-limits

Need help Setting one up?

We have a walk through article on how to set up a usage Alerts webhook to receive notifications when a SIM goes over the usage limit. This example usages the free version of Integromat but can be used as inspiration for other services or developing your own end point.