Create a billing alert
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/billing/alerts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "80% of monthly budget",
"threshold_type": "spend_percent",
"threshold_value": 80,
"currency": "USD",
"notify_emails": [
"billing@example.com"
],
"action_on_hit": "notify",
"cooldown_hours": 24,
"enabled": true
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/billing/alerts/"
payload = {
"name": "80% of monthly budget",
"threshold_type": "spend_percent",
"threshold_value": 80,
"currency": "USD",
"notify_emails": ["billing@example.com"],
"action_on_hit": "notify",
"cooldown_hours": 24,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '80% of monthly budget',
threshold_type: 'spend_percent',
threshold_value: 80,
currency: 'USD',
notify_emails: ['billing@example.com'],
action_on_hit: 'notify',
cooldown_hours: 24,
enabled: true
})
};
fetch('https://api.orbit.devotel.io/api/v1/billing/alerts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbit.devotel.io/api/v1/billing/alerts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '80% of monthly budget',
'threshold_type' => 'spend_percent',
'threshold_value' => 80,
'currency' => 'USD',
'notify_emails' => [
'billing@example.com'
],
'action_on_hit' => 'notify',
'cooldown_hours' => 24,
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/billing/alerts/"
payload := strings.NewReader("{\n \"name\": \"80% of monthly budget\",\n \"threshold_type\": \"spend_percent\",\n \"threshold_value\": 80,\n \"currency\": \"USD\",\n \"notify_emails\": [\n \"billing@example.com\"\n ],\n \"action_on_hit\": \"notify\",\n \"cooldown_hours\": 24,\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.orbit.devotel.io/api/v1/billing/alerts/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"80% of monthly budget\",\n \"threshold_type\": \"spend_percent\",\n \"threshold_value\": 80,\n \"currency\": \"USD\",\n \"notify_emails\": [\n \"billing@example.com\"\n ],\n \"action_on_hit\": \"notify\",\n \"cooldown_hours\": 24,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/billing/alerts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"80% of monthly budget\",\n \"threshold_type\": \"spend_percent\",\n \"threshold_value\": 80,\n \"currency\": \"USD\",\n \"notify_emails\": [\n \"billing@example.com\"\n ],\n \"action_on_hit\": \"notify\",\n \"cooldown_hours\": 24,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"alert": {
"id": "alert_01HZY8ALERT",
"organization_id": "org_01HZY8ORG",
"name": "80% of monthly budget",
"threshold_type": "spend_percent",
"threshold_value": 80,
"currency": "USD",
"notify_emails": [
"billing@example.com"
],
"notify_sms_numbers": [],
"action_on_hit": "notify",
"last_triggered_at": null,
"cooldown_hours": 24,
"enabled": true,
"created_by": "user_01HZY8USER",
"created_at": "2026-08-01T09:00:00.000Z",
"updated_at": "2026-08-01T09:00:00.000Z"
}
},
"meta": {
"request_id": "req_01HZY8EXAMPLE",
"timestamp": "2026-08-02T12:00:00.000Z"
}
}Billing
Create a billing alert
Creates a billing alert for the organization: a spend or balance threshold, the email and SMS recipients to notify, the action to take when it is hit, and a cooldown. Owner, admin, or billing role required.
POST
/
api
/
v1
/
billing
/
alerts
/
Create a billing alert
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/billing/alerts/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "80% of monthly budget",
"threshold_type": "spend_percent",
"threshold_value": 80,
"currency": "USD",
"notify_emails": [
"billing@example.com"
],
"action_on_hit": "notify",
"cooldown_hours": 24,
"enabled": true
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/billing/alerts/"
payload = {
"name": "80% of monthly budget",
"threshold_type": "spend_percent",
"threshold_value": 80,
"currency": "USD",
"notify_emails": ["billing@example.com"],
"action_on_hit": "notify",
"cooldown_hours": 24,
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '80% of monthly budget',
threshold_type: 'spend_percent',
threshold_value: 80,
currency: 'USD',
notify_emails: ['billing@example.com'],
action_on_hit: 'notify',
cooldown_hours: 24,
enabled: true
})
};
fetch('https://api.orbit.devotel.io/api/v1/billing/alerts/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orbit.devotel.io/api/v1/billing/alerts/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '80% of monthly budget',
'threshold_type' => 'spend_percent',
'threshold_value' => 80,
'currency' => 'USD',
'notify_emails' => [
'billing@example.com'
],
'action_on_hit' => 'notify',
'cooldown_hours' => 24,
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orbit.devotel.io/api/v1/billing/alerts/"
payload := strings.NewReader("{\n \"name\": \"80% of monthly budget\",\n \"threshold_type\": \"spend_percent\",\n \"threshold_value\": 80,\n \"currency\": \"USD\",\n \"notify_emails\": [\n \"billing@example.com\"\n ],\n \"action_on_hit\": \"notify\",\n \"cooldown_hours\": 24,\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://api.orbit.devotel.io/api/v1/billing/alerts/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"80% of monthly budget\",\n \"threshold_type\": \"spend_percent\",\n \"threshold_value\": 80,\n \"currency\": \"USD\",\n \"notify_emails\": [\n \"billing@example.com\"\n ],\n \"action_on_hit\": \"notify\",\n \"cooldown_hours\": 24,\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/billing/alerts/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"80% of monthly budget\",\n \"threshold_type\": \"spend_percent\",\n \"threshold_value\": 80,\n \"currency\": \"USD\",\n \"notify_emails\": [\n \"billing@example.com\"\n ],\n \"action_on_hit\": \"notify\",\n \"cooldown_hours\": 24,\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"alert": {
"id": "alert_01HZY8ALERT",
"organization_id": "org_01HZY8ORG",
"name": "80% of monthly budget",
"threshold_type": "spend_percent",
"threshold_value": 80,
"currency": "USD",
"notify_emails": [
"billing@example.com"
],
"notify_sms_numbers": [],
"action_on_hit": "notify",
"last_triggered_at": null,
"cooldown_hours": 24,
"enabled": true,
"created_by": "user_01HZY8USER",
"created_at": "2026-08-01T09:00:00.000Z",
"updated_at": "2026-08-01T09:00:00.000Z"
}
},
"meta": {
"request_id": "req_01HZY8EXAMPLE",
"timestamp": "2026-08-02T12:00:00.000Z"
}
}Authorizations
BearerApiKey
Dashboard JWT token from Clerk
Body
application/json
Maximum string length:
120Available options:
spend_percent, spend_amount, balance_remaining, daily_spend Percent (0-100) for spend_percent, otherwise an integer number of cents.
ISO-4217 currency code.
Up to 20 email recipients.
Up to 20 E.164 SMS recipients. At least one email or SMS recipient is required.
Available options:
notify, pause_outbound, block_outbound Minimum hours between re-triggers of the same alert.
⌘I