Budgets
POST/v1/budgets

Set budget

View as .md
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.

Server URLhttps://api.52-28-238-205.sslip.io
POST/v1/budgetsBase URL: https://api.52-28-238-205.sslip.io
Authorization
  • sessionCookie: <console session cookie>
  • apiKeyAuthorization: Bearer sk_test_...
Body

application/json · required. Fields are listed under Request body below.

Requires permissionbudget:edit
Held by owner, admin, finance, operator. The caller must hold this permission, or the call is refused with 403.

Authorization

cookieuapg_session<token>

Console session cookie (HttpOnly, SameSite=Lax)

Request Body

application/json
  1. body
scope_type*Scope Type

Budget level: org, team or agent.

scope_id*Scope Id

Id of the organization, team or agent the budget belongs to.

limit_base_units*|

Budget limit in integer base units, carried as a string.

Response Body

Success.

application/json
  1. response
budget*
[key: string]?any