Skip to content
Helicarrier Developers

Set budget

Replace one account or project budget policy. Account owner only. Read the current policy first and submit every policy field. Shutdown is opt-in and requires explicit confirmation; reaching a project limit stops that project, and an account limit stops all account services.

PUT /api/account/budgets HTTPS
Request & response examples
Request example Server-side
curl --fail-with-body --request PUT \
'https://app.helicarrier.xyz/api/account/budgets' \
-H "Authorization: Bearer $HELI_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"projectId": "",
"enabled": true,
"limitCents": 10000,
"alertPercentages": [
50,
80,
100
],
"alertProjected": true,
"action": "alert",
"confirmShutdown": false
}'
Response example 200
{
"status": "saved"
}

Illustrative values · selected fields

Authorization

An account-wide write key belonging to the account owner. Project and service keys cannot change budgets. Shutdown requires explicit confirmation.

Authorization: Bearer <key> Key setup

Request body

projectId string required

Project ID, or empty string for the entire account.

enabled boolean required

Whether this policy is enabled.

limitCents integer required

Fixed monthly limit in USD cents. For local-currency input, first get_budgets with amount and currency, review budgetQuote, then submit its limitCents. Country and FX changes never rewrite this USD limit.

alertPercentages integer[] required

Up to 10 unique whole percentages, each 1–100, as an array (for example [50,80,100]).

alertProjected boolean required

Also alert when the full-month projection crosses a threshold.

action string required

alert, block, or stop. alert only sends notifications; block prevents new deployments and scaling at the limit; stop shuts down all services including databases in this scope.

confirmShutdown boolean required

Explicit user confirmation of shutdown consequences; required true when enabling action=stop.

Response 200

Replace one account or project budget policy. Account owner only. Read the current policy first and submit every policy field. Shutdown is opt-in and requires explicit confirmation; reaching a project limit stops that project, and an account limit stops all account services.

Examples show selected response fields with illustrative values. Your response can contain additional fields.

status string

Current state of the resource or operation.

Errors

400

Invalid parameters. Check the required fields, types, and resource configuration.

401

The API key is missing, invalid, or revoked.

403

The caller or key scope does not permit this operation.

404

The resource does not exist or is not visible to this caller.

500

The operation could not be completed. Check resource state before retrying a write.

Error handling and safe retries
ALSO AVAILABLE VIA MCP

set_budget

Required MCP arguments: projectId, enabled, limitCents, alertPercentages, alertProjected, action, confirmShutdown. Send path, query, and body fields together as tool arguments.

Connect your agent