Set budget
curl -X POST "https://api.52-28-238-205.sslip.io/v1/budgets" \ -H "Cookie: <console session cookie>" \ -H "Content-Type: application/json" \ -d '{"scope_type":"string","scope_id":"sco_01jd2x3k4m5n6p7q8r9s0t1v2w","limit_base_units":"50000"}'Creates or sets the limit of an organization, team or agent budget. Console session or API key with budget:edit; a team or agent limit must fit under its parent.
https://api.52-28-238-205.sslip.ioAuthorization
sessionCookie: <console session cookie>apiKeyAuthorization: Bearer sk_test_...
Body
application/json · required. Fields are listed under Request body below.
owner, admin, finance, operator. The caller must hold this permission, or the call is refused with 403.uapg_session<token>Console session cookie (HttpOnly, SameSite=Lax)
application/json- body
scope_type*Scope TypeBudget level: org, team or agent.
scope_id*Scope IdId of the organization, team or agent the budget belongs to.
limit_base_units*|Budget limit in integer base units, carried as a string.
Success.
application/json- response
budget*[key: string]?anyGETGet budget tree
Returns the organization, team and agent budgets as a tree with limit, reserved, spent and available amounts, plus confirmed spend per day for 30 days. Console session or API key with payment:read; team-scoped roles see their team only.
PATCHUpdate budget
Changes a budget's limit or turns its 80% alert on or off. Console session or API key with budget:edit; raising a team or agent limit must fit under its parent.