0. Set up a payment method
As described in the Billing article, you must have a valid payment method on file before you can send alerts. Set up a payment method using the steps described in the article.1. Create an asset
To create an asset, use thePOST /v1/accounts/{accountId}/assets endpoint. The following JSON request body can be used to create an asset.
2. Create an alert rule
To receive alerts, set at least one alert rule for the asset by calling thePOST /v1/accounts/{accountId}/assets/{assetId}/alertRules/{eventType} endpoint. Use the asset ID you received in the previous API call for the assetId placeholder. For the eventType placeholder, use one of the values in the EventType enumeration. The following JSON will create an alert rule that uses the phone call channel. Don’t forget to put in your own phone number.
3. Create an event
Now we can create an event for this asset using thePOST /v1/accounts/{accountId}/assets/{assetId}/events endpoint. When the event is created, you will receive a phone call alerting you about the event. The following JSON assumes you used event type 1 in the previous API call. Replace the value of the startedAt property with a more recent date and time.