Skip to main content
POST
/
cost_alerts
Create cost alert
curl --request POST \
  --url https://api.vantage.sh/v2/cost_alerts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "interval": "<string>",
  "threshold": 123,
  "unit_type": "<string>",
  "workspace_token": "<string>",
  "report_tokens": [
    "<string>"
  ],
  "email_recipients": [
    "<string>"
  ],
  "slack_channels": [
    "<string>"
  ],
  "teams_channels": [
    "<string>"
  ]
}
'
{
  "token": "cstm_alrt_rl_76efd4cd0f56149a",
  "title": "New Alert",
  "email_recipients": [
    "[email protected]"
  ],
  "slack_channels": [],
  "teams_channels": [],
  "created_at": "2025-04-21T15:19:49.891Z",
  "updated_at": "2025-04-21T15:19:49.891Z",
  "workspace_token": "wrkspc_a5e36f631519f7d3",
  "interval": "month",
  "threshold": 100,
  "unit_type": "currency",
  "report_tokens": [
    "rprt_ccf0092d336de56c"
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Create a new Cost Alert

title
string
required

The title of the Cost Alert.

interval
string
required

The period of time used to compare costs. Options are 'day', 'week', 'month', 'quarter'.

threshold
number<float>
required

The threshold value for the Cost Alert.

unit_type
string
required

The unit type used to compare costs. Options are 'currency' or 'percentage'.

workspace_token
string
required

The token of the Workspace to add the Cost Alert to.

report_tokens
string[]
required

The tokens of the reports to alert on.

email_recipients
string[]

The email recipients for the Cost Alert.

slack_channels
string[]

The Slack channels that will receive the alert.

teams_channels
string[]

The Microsoft Teams channels that will receive the alert.

Response

Cost Alert created successfully.

CostAlert model

token
string
required
title
string
required
email_recipients
string[]
required

The email addresses that will receive the alert.

slack_channels
string[]
required

The Slack channels that will receive the alert. Make sure your slack integration is connected at https://console.vantage.sh/settings/slack.

teams_channels
string[]
required

The Microsoft Teams channels that will receive the alert. Make sure your teams integration is connected at https://console.vantage.sh/settings/microsoft_teams.

created_at
string
required

The date and time, in UTC, for when the alert was created. ISO 8601 Formatted.

Example:

"2023-10-01T12:00:00Z"

updated_at
string
required

The date and time, in UTC, for when the alert was last updated. ISO 8601 Formatted.

Example:

"2023-10-01T12:00:00Z"

workspace_token
string
required

The ID of the organization that owns the CostAlert.

interval
string
required

The period of time used to compare costs. Options are 'day', 'week', 'month', 'quarter'.

threshold
number
required

The cost change threshold to alert on.

unit_type
string
required

The unit type used to compare costs. Options are 'currency' or 'percentage'.

report_tokens
string[]
required

The tokens of the reports to alert on.