curl --request PATCH \
--url https://api.select.dev/v2/budgets/{budget_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"name": "<string>",
"amount": 123,
"team_id": "<string>",
"period": {
"schedule_type": "fixed_range",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"started_at": "2023-11-07T05:31:56Z",
"filter_expression": {
"filters": [
{
"field": {
"path": [
"<string>"
]
},
"value": 123,
"not": false
}
],
"component_type": "Resource Filter"
},
"filter_expression_json": "<string>"
}
'import requests
url = "https://api.select.dev/v2/budgets/{budget_id}"
payload = {
"name": "<string>",
"amount": 123,
"team_id": "<string>",
"period": {
"schedule_type": "fixed_range",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"started_at": "2023-11-07T05:31:56Z",
"filter_expression": {
"filters": [
{
"field": { "path": ["<string>"] },
"value": 123,
"not": False
}
],
"component_type": "Resource Filter"
},
"filter_expression_json": "<string>"
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
amount: 123,
team_id: '<string>',
period: {schedule_type: 'fixed_range', start_date: '2023-12-25', end_date: '2023-12-25'},
started_at: '2023-11-07T05:31:56Z',
filter_expression: {
filters: [{field: {path: ['<string>']}, value: 123, not: false}],
component_type: 'Resource Filter'
},
filter_expression_json: '<string>'
})
};
fetch('https://api.select.dev/v2/budgets/{budget_id}', 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.select.dev/v2/budgets/{budget_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'amount' => 123,
'team_id' => '<string>',
'period' => [
'schedule_type' => 'fixed_range',
'start_date' => '2023-12-25',
'end_date' => '2023-12-25'
],
'started_at' => '2023-11-07T05:31:56Z',
'filter_expression' => [
'filters' => [
[
'field' => [
'path' => [
'<string>'
]
],
'value' => 123,
'not' => false
]
],
'component_type' => 'Resource Filter'
],
'filter_expression_json' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/budgets/{budget_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"amount\": 123,\n \"team_id\": \"<string>\",\n \"period\": {\n \"schedule_type\": \"fixed_range\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"filter_expression_json\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.patch("https://api.select.dev/v2/budgets/{budget_id}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"amount\": 123,\n \"team_id\": \"<string>\",\n \"period\": {\n \"schedule_type\": \"fixed_range\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"filter_expression_json\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/budgets/{budget_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"amount\": 123,\n \"team_id\": \"<string>\",\n \"period\": {\n \"schedule_type\": \"fixed_range\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"filter_expression_json\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"amount": 123,
"period": {
"schedule_type": "fixed_range",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"started_at": "<string>",
"current_period_start": "2023-12-25",
"current_period_end": "2023-12-25",
"created_by": "<string>",
"create_time": "<string>",
"update_time": "<string>",
"etag": "<string>",
"status": "on_track",
"team_id": "<string>",
"filter_expression": {
"operator": "and",
"filters": [
{
"field": {
"field": "snowflake_account_name",
"path": [
"<string>"
]
},
"value": 123,
"operator": ">",
"not": false
}
],
"component_type": "Resource Filter"
},
"filter_expression_json": "<string>",
"budget_end_date": "2023-12-25",
"updated_by": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Update a budget
Applies a merge patch: a field the request omits is left unchanged, and an explicit null clears team_id or filter_expression. Changing amount, period or filter_expression clears the budget’s evaluated status, spend and forecast — they measured the old definition — and lets a monitor watching it alert again on thresholds it has already reported. Evaluate the budget to refresh them without waiting for the next daily run.
curl --request PATCH \
--url https://api.select.dev/v2/budgets/{budget_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"name": "<string>",
"amount": 123,
"team_id": "<string>",
"period": {
"schedule_type": "fixed_range",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"started_at": "2023-11-07T05:31:56Z",
"filter_expression": {
"filters": [
{
"field": {
"path": [
"<string>"
]
},
"value": 123,
"not": false
}
],
"component_type": "Resource Filter"
},
"filter_expression_json": "<string>"
}
'import requests
url = "https://api.select.dev/v2/budgets/{budget_id}"
payload = {
"name": "<string>",
"amount": 123,
"team_id": "<string>",
"period": {
"schedule_type": "fixed_range",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"started_at": "2023-11-07T05:31:56Z",
"filter_expression": {
"filters": [
{
"field": { "path": ["<string>"] },
"value": 123,
"not": False
}
],
"component_type": "Resource Filter"
},
"filter_expression_json": "<string>"
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
amount: 123,
team_id: '<string>',
period: {schedule_type: 'fixed_range', start_date: '2023-12-25', end_date: '2023-12-25'},
started_at: '2023-11-07T05:31:56Z',
filter_expression: {
filters: [{field: {path: ['<string>']}, value: 123, not: false}],
component_type: 'Resource Filter'
},
filter_expression_json: '<string>'
})
};
fetch('https://api.select.dev/v2/budgets/{budget_id}', 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.select.dev/v2/budgets/{budget_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'amount' => 123,
'team_id' => '<string>',
'period' => [
'schedule_type' => 'fixed_range',
'start_date' => '2023-12-25',
'end_date' => '2023-12-25'
],
'started_at' => '2023-11-07T05:31:56Z',
'filter_expression' => [
'filters' => [
[
'field' => [
'path' => [
'<string>'
]
],
'value' => 123,
'not' => false
]
],
'component_type' => 'Resource Filter'
],
'filter_expression_json' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/budgets/{budget_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"amount\": 123,\n \"team_id\": \"<string>\",\n \"period\": {\n \"schedule_type\": \"fixed_range\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"filter_expression_json\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.patch("https://api.select.dev/v2/budgets/{budget_id}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"amount\": 123,\n \"team_id\": \"<string>\",\n \"period\": {\n \"schedule_type\": \"fixed_range\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"filter_expression_json\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/budgets/{budget_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"amount\": 123,\n \"team_id\": \"<string>\",\n \"period\": {\n \"schedule_type\": \"fixed_range\",\n \"start_date\": \"2023-12-25\",\n \"end_date\": \"2023-12-25\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"filter_expression_json\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"amount": 123,
"period": {
"schedule_type": "fixed_range",
"start_date": "2023-12-25",
"end_date": "2023-12-25"
},
"started_at": "<string>",
"current_period_start": "2023-12-25",
"current_period_end": "2023-12-25",
"created_by": "<string>",
"create_time": "<string>",
"update_time": "<string>",
"etag": "<string>",
"status": "on_track",
"team_id": "<string>",
"filter_expression": {
"operator": "and",
"filters": [
{
"field": {
"field": "snowflake_account_name",
"path": [
"<string>"
]
},
"value": 123,
"operator": ">",
"not": false
}
],
"component_type": "Resource Filter"
},
"filter_expression_json": "<string>",
"budget_end_date": "2023-12-25",
"updated_by": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Authorizations
Organization API key (sl_…).
Headers
The budget's current ETag, from a prior read. Required: the request is rejected if the budget has changed since.
The organization ID the request is scoped to.
Path Parameters
Body
Changes to apply to a budget.
An omitted field is left unchanged; an explicit null clears team_id or
filter_expression. Moving a budget between scopes requires permission to
write budgets in the scope it leaves and the one it joins.
The spend threshold for one period.
The team this budget is scoped to. Null scopes it to the whole organization.
The recurrence or date range the budget's threshold applies over.
- FixedRangeSchedule
- RecurringSchedule
- CustomSchedule
Show child attributes
Show child attributes
When the budget takes effect.
Narrows which spend counts toward the budget. Null counts all spend. Use exactly one of filter_expression or filter_expression_json.
Show child attributes
Show child attributes
A JSON string representation of the filter expression. This is primarily used for Terraform provider support. Use exactly one of filter_expression or filter_expression_json. This value is validated in the same manner as filter_expression.
Response
Successful Response
A spend threshold over a recurring or fixed period.
A budget compares actual and forecasted spend against amount for its
current period, optionally narrowed to a team and to a slice of spend via
filter_expression. The period dates are derived from period as the budget
is read, so they always describe the period it is in now. status is measured
against spend instead, on the cadence its own description gives.
The unique identifier of the budget.
The spend threshold for one period.
The recurrence or date range the budget's threshold applies over.
- FixedRangeSchedule
- RecurringSchedule
- CustomSchedule
Show child attributes
Show child attributes
The start date of the period the budget is currently in.
The end date of the period the budget is currently in.
Who created the budget.
RFC 3339 UTC creation timestamp.
RFC 3339 UTC last-update timestamp.
Opaque strong ETag.
The budget's current standing against its spend threshold. Measured by a daily refresh, or on demand by evaluating the budget. Null until one of those has run: creating or changing a budget does not measure it, and changing what it measures clears it again.
on_track, at_risk, overspending, expired The team this budget is scoped to. Null scopes it to the whole organization.
Narrows which spend counts toward the budget. Null counts all spend.
Show child attributes
Show child attributes
The JSON string representation of the filter expression, used by the Terraform provider. Null when the budget has no filter.
When the budget itself expires. Null if it never does.
Who last changed the budget. Null if no one has since it was created.

