Skip to main content
PUT
/
cost_alerts
/
{cost_alert_token}
Update cost alert
curl --request PUT \
  --url https://api.vantage.sh/v2/cost_alerts/{cost_alert_token} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "email_recipients": [
    "<string>"
  ],
  "interval": "<string>",
  "threshold": 123,
  "slack_channels": [
    "<string>"
  ],
  "teams_channels": [
    "<string>"
  ],
  "unit_type": "<string>",
  "report_tokens": [
    "<string>"
  ]
}
'
{
  "token": "cstm_alrt_rl_65ff8613224f4469",
  "title": "Default Alert Rule",
  "email_recipients": [
    "[email protected]",
    "[email protected]"
  ],
  "slack_channels": [],
  "teams_channels": [],
  "created_at": "2024-04-21T15:19:48.503Z",
  "updated_at": "2025-04-21T15:19:48.537Z",
  "workspace_token": "wrkspc_643e0e66ee5a4611",
  "interval": "day",
  "threshold": 500,
  "unit_type": "currency",
  "report_tokens": [
    "rprt_bc47a84e3ab8a5d5"
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

cost_alert_token
string
required

The token of the Cost Alert.

Body

application/json

Update a Cost Alert

title
string

The title of the Cost Alert.

email_recipients
string[]

The email recipients for the Cost Alert.

interval
string

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

threshold
number<float>

The threshold value for the Cost Alert.

slack_channels
string[]

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[]

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

unit_type
string

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

report_tokens
string[]

The tokens of the reports to alert on.

Response

Cost Alert updated 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.