Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Verifieddanny/BurnGuard/llms.txt

Use this file to discover all available pages before exploring further.

The budget endpoints manage the monthly spend limit stored in BurnGuard Cloud for your account. This cloud budget value is used by the usage sync pipeline to evaluate alert thresholds — when POST /v1/usage is processed, the server compares your current total spend against this limit and fires Slack or Discord webhooks if configured thresholds (50%, 80%, 100%) are crossed.
This is the cloud budget configuration used for alert evaluation and the dashboard settings view. The local proxy enforces its own hard cap through the budget.limit field in burnguard.yaml — that value is read at startup and applied in-process, without a network call.
The POST and PUT handlers both call the same underlying Upsert query (insert or update on conflict), so they are semantically equivalent. Use POST when setting a budget for the first time and PUT for subsequent updates to follow REST conventions.

GET /v1/budget

Returns the current monthly budget limit for the authenticated user. Auth: Requires session — Authorization: Bearer session_<id>. Request: No parameters or body. Response:
amount
number
Monthly spend limit in USD. Returns 0 if no budget has been set yet.
curl https://api.burnguard.run/v1/budget \
  -H "Authorization: Bearer session_abc123"
{
  "data": {
    "amount": 50.00
  }
}

POST /v1/budget

Creates a new budget record for the authenticated user. If a budget already exists it is updated in place (upsert semantics). Auth: Requires session — Authorization: Bearer session_<id>. Request body:
amount
number
required
Monthly spend limit in USD. Must be a positive number. For example, 50.00 sets a $50/month cap.
Response: 200 OK
message
string
Confirmation string: "Budget set successfully".
curl -X POST https://api.burnguard.run/v1/budget \
  -H "Authorization: Bearer session_abc123" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 50.00 }'
{
  "data": {
    "message": "Budget set successfully"
  }
}

PUT /v1/budget

Updates the existing monthly budget limit for the authenticated user. Uses the same upsert logic as POST /v1/budget. Auth: Requires session — Authorization: Bearer session_<id>. Request body:
amount
number
required
New monthly spend limit in USD. Replaces the previously stored value.
Response: 200 OK
message
string
Confirmation string: "Budget updated successfully".
curl -X PUT https://api.burnguard.run/v1/budget \
  -H "Authorization: Bearer session_abc123" \
  -H "Content-Type: application/json" \
  -d '{ "amount": 100.00 }'
{
  "data": {
    "message": "Budget updated successfully"
  }
}
After updating the cloud budget, also update budget.limit in your local burnguard.yaml so the proxy’s hard-cap enforcement stays in sync with your dashboard settings.

Build docs developers (and LLMs) love