Set the team's monthly budget (owners only)
PUT
/teams/{team_id}/budget
const url = 'https://api.global.stillbox.example/v1/teams/example/budget';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"monthly_usd":1,"action":"notify"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.global.stillbox.example/v1/teams/example/budget \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "monthly_usd": 1, "action": "notify" }'Send no monthly_usd to remove the budget.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”team_id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
monthly_usd
number format: double
action
notify: tell the owners. sleep: also put the team’s sandboxes to sleep until next month.
string
Responses
Section titled “Responses”The team
Media typeapplication/json
object
id
required
string
name
required
string
member_ids
required
Array<string>
internet
required
object
mode
required
string
allowed_hosts
required
Array<string>
budget
object
monthly_usd
required
number format: double
action
required
notify: tell the owners. sleep: also put the team’s sandboxes to sleep until next month.
string
spent_usd
required
This month’s compute and model calls of the team’s sandboxes, as of checked_at.
number format: double
state
required
warning from 80%; exceeded from 100%, when sleep also keeps the sandboxes asleep.
string
checked_at
string format: date-time
stopped
object
at
required
string format: date-time
by
The owner who stopped it.
string
reason
required
string
created_at
required
string format: date-time
Example
{ "internet": { "mode": "open" }, "budget": { "action": "notify", "state": "ok" }}The request is invalid
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}The API key is missing or invalid
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}Only an owner can do this (owner_only), or the invitation is for another address (not_invited)
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}No such sandbox in your organization (or no such file)
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}