Chief Tools Logo
Bill.DO API v1

Billing alerts email the members of the team that have access to an account when its spend exceeds a limit, and again once it drops below the limit.


List alerts

GET
https://bill.do/api/v1
/accounts/{account}/alerts
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

List the billing alerts of the account with their current value.

List alerts › path Parameters

account
​integer · required

List alerts › query Parameters

per_page
​integer · min: 1 · max: 100

Number of results per page.

Default: 50
page
​integer · min: 1

Page number to return.

Default: 1

List alerts › Responses

Paginated set of Alert

​Alert[] · required
​object · required
​object · required

Create an alert

POST
https://bill.do/api/v1
/accounts/{account}/alerts
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Create a billing alert on the account. It is checked right away and then every hour.

Create an alert › path Parameters

account
​integer · required

Create an alert › Request Body

type
​string · enum · required

What the alert compares to its limit: hourly (current spend per hour), daily_actual (spend so far today), daily_predicted (predicted spend today), monthly_actual (spend so far this month) or monthly_predicted (predicted spend this month).

Enum values:
hourly
daily_actual
daily_predicted
monthly_actual
monthly_predicted
Example: monthly_predicted
limit
​number · min: 0.0001 · max: 100000000 · required

The limit in USD, the alert triggers once the current value exceeds it.

Example: 250
resources
​string[] · minItems: 1 · unique · required

The resource types whose spend counts towards the alert: app, database, droplet, load_balancer, snapshot or volume.

Enum values:
app
volume
droplet
database
snapshot
load_balancer
Example: ["droplet","database"]

Create an alert › Responses

Alert

​Alert · required

Get an alert

GET
https://bill.do/api/v1
/accounts/{account}/alerts/{alert}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Get one of the billing alerts of the account with its current value.

Get an alert › path Parameters

account
​integer · required
alert
​integer · required

Get an alert › Responses

Alert

​Alert · required

Update an alert

PATCH
https://bill.do/api/v1
/accounts/{account}/alerts/{alert}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Change the type, limit or resource types of a billing alert. Fields left out keep their value. A changed alert is checked again right away.

Update an alert › path Parameters

account
​integer · required
alert
​integer · required

Update an alert › Request Body

The fields of an alert to change, fields left out keep their value.
type
​string · enum

What the alert compares to its limit: hourly (current spend per hour), daily_actual (spend so far today), daily_predicted (predicted spend today), monthly_actual (spend so far this month) or monthly_predicted (predicted spend this month).

Enum values:
hourly
daily_actual
daily_predicted
monthly_actual
monthly_predicted
Example: monthly_predicted
limit
​number · min: 0.0001 · max: 100000000

The limit in USD, the alert triggers once the current value exceeds it.

Example: 250
resources
​string[] · minItems: 1 · unique

The resource types whose spend counts towards the alert: app, database, droplet, load_balancer, snapshot or volume.

Enum values:
app
volume
droplet
database
snapshot
load_balancer
Example: ["droplet","database"]

Update an alert › Responses

Alert

​Alert · required

Delete an alert

DELETE
https://bill.do/api/v1
/accounts/{account}/alerts/{alert}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Delete a billing alert. No emails are sent for it anymore.

Delete an alert › path Parameters

account
​integer · required
alert
​integer · required

Delete an alert › Responses

The alert was deleted.

string