Update budget
import requests
url = "https://app.langwatch.ai/api/gateway/v1/budgets/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"limit_usd": 1,
"timezone": "<string>",
"external_id": "<string>",
"metadata": {}
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
limit_usd: 1,
timezone: '<string>',
external_id: '<string>',
metadata: {}
})
};
fetch('https://app.langwatch.ai/api/gateway/v1/budgets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/gateway/v1/budgets/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"limit_usd": 1,
"timezone": "<string>",
"external_id": "<string>",
"metadata": {}
}
'{
"budget": {
"id": "<string>",
"organization_id": "<string>",
"scope_type": "organization",
"scope_id": "<string>",
"name": "<string>",
"description": "<string>",
"window": "minute",
"on_breach": "block",
"limit_usd": "<string>",
"limit_nano_usd": 123,
"spent_usd": "<string>",
"spent_nano_usd": 123,
"timezone": "<string>",
"provider_key": "<string>",
"external_id": "<string>",
"metadata": {},
"current_period_started_at": "<string>",
"resets_at": "<string>",
"cycle_anchor_at": "<string>",
"last_reset_at": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"member_count": 123,
"end_users_seen": 123,
"end_users_over": 123,
"scope_reach": "reachable"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}Gateway: Budgets
Update budget
Partial update. Scope, window and cycle_anchor_at are immutable after create. Use explicit null to clear timezone / description.
PATCH
/
api
/
gateway
/
v1
/
budgets
/
{id}
Update budget
import requests
url = "https://app.langwatch.ai/api/gateway/v1/budgets/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"limit_usd": 1,
"timezone": "<string>",
"external_id": "<string>",
"metadata": {}
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
limit_usd: 1,
timezone: '<string>',
external_id: '<string>',
metadata: {}
})
};
fetch('https://app.langwatch.ai/api/gateway/v1/budgets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://app.langwatch.ai/api/gateway/v1/budgets/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"limit_usd": 1,
"timezone": "<string>",
"external_id": "<string>",
"metadata": {}
}
'{
"budget": {
"id": "<string>",
"organization_id": "<string>",
"scope_type": "organization",
"scope_id": "<string>",
"name": "<string>",
"description": "<string>",
"window": "minute",
"on_breach": "block",
"limit_usd": "<string>",
"limit_nano_usd": 123,
"spent_usd": "<string>",
"spent_nano_usd": 123,
"timezone": "<string>",
"provider_key": "<string>",
"external_id": "<string>",
"metadata": {},
"current_period_started_at": "<string>",
"resets_at": "<string>",
"cycle_anchor_at": "<string>",
"last_reset_at": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"member_count": 123,
"end_users_seen": 123,
"end_users_over": 123,
"scope_reach": "reachable"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}Authorizations
Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.
Path Parameters
Body
application/json
Response
Updated
Show child attributes
Show child attributes
Last modified on May 19, 2026
Was this page helpful?
⌘I