Create budget alert
curl --request POST \
--url https://api.nops.io/v1/budgets/{id}/alerts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"thresholdType": "PERCENTAGE_OVER",
"thresholdValue": 90,
"emailRecipients": [
"finops@example.com"
],
"isActive": true
}
'import requests
url = "https://api.nops.io/v1/budgets/{id}/alerts"
payload = {
"thresholdType": "PERCENTAGE_OVER",
"thresholdValue": 90,
"emailRecipients": ["finops@example.com"],
"isActive": True
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
thresholdType: 'PERCENTAGE_OVER',
thresholdValue: 90,
emailRecipients: ['finops@example.com'],
isActive: true
})
};
fetch('https://api.nops.io/v1/budgets/{id}/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nops.io/v1/budgets/{id}/alerts"
payload := strings.NewReader("{\n \"thresholdType\": \"PERCENTAGE_OVER\",\n \"thresholdValue\": 90,\n \"emailRecipients\": [\n \"finops@example.com\"\n ],\n \"isActive\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"alert": {
"id": "alert-1",
"budgetId": "budget-1",
"thresholdType": "PERCENTAGE_OVER",
"thresholdValue": 90,
"triggerThresholdValue": null,
"alertFrequency": "MONTHLY",
"aggregation": "SINGLE",
"emailRecipients": [
"finops@example.com"
],
"chatChannels": [],
"slackWebhooks": [],
"slackMentions": null,
"planningIds": [],
"isActive": true,
"createdAt": "2026-07-17T12:00:00.000Z",
"updatedAt": "2026-07-17T12:00:00.000Z"
}
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Budgets
Create budget alert
POST
https://api.nops.io
/
v1
/
budgets
/
{id}
/
alerts
Create budget alert
curl --request POST \
--url https://api.nops.io/v1/budgets/{id}/alerts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"thresholdType": "PERCENTAGE_OVER",
"thresholdValue": 90,
"emailRecipients": [
"finops@example.com"
],
"isActive": true
}
'import requests
url = "https://api.nops.io/v1/budgets/{id}/alerts"
payload = {
"thresholdType": "PERCENTAGE_OVER",
"thresholdValue": 90,
"emailRecipients": ["finops@example.com"],
"isActive": True
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
thresholdType: 'PERCENTAGE_OVER',
thresholdValue: 90,
emailRecipients: ['finops@example.com'],
isActive: true
})
};
fetch('https://api.nops.io/v1/budgets/{id}/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nops.io/v1/budgets/{id}/alerts"
payload := strings.NewReader("{\n \"thresholdType\": \"PERCENTAGE_OVER\",\n \"thresholdValue\": 90,\n \"emailRecipients\": [\n \"finops@example.com\"\n ],\n \"isActive\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {
"alert": {
"id": "alert-1",
"budgetId": "budget-1",
"thresholdType": "PERCENTAGE_OVER",
"thresholdValue": 90,
"triggerThresholdValue": null,
"alertFrequency": "MONTHLY",
"aggregation": "SINGLE",
"emailRecipients": [
"finops@example.com"
],
"chatChannels": [],
"slackWebhooks": [],
"slackMentions": null,
"planningIds": [],
"isActive": true,
"createdAt": "2026-07-17T12:00:00.000Z",
"updatedAt": "2026-07-17T12:00:00.000Z"
}
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "forbidden_scope",
"message": "API key is missing required scope: budgets:write",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Authorizations
API key from Settings → Security → API Keys. Pass as Authorization: Bearer YOUR_API_KEY.
Headers
Unique key for safe retries on write requests (required, max 64 characters).
Maximum string length:
64Path Parameters
Budget ID
Body
application/json
JSON request body
Response
Create budget alert
JSON object
Was this page helpful?
⌘I