organization-budgets

Create Organization Spend Ceiling

Changed on

Cap one identity in this organization at one of its budgets.

Answers 404 when the scope names nothing in this organization, rather than creating a ceiling that can never bind, and 404 when the budget is not this organization's.

post/api/v1/organizations/me/spend-ceilings

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Request body

budget_idstring required

The budget this ceiling enforces, which must be one this organization owns

namestring nullable

Admin-facing label for this ceiling

provider_key_idstring nullable

Narrow the cap to one provider instance; omit or null to cap spend across every provider. A blank value would store a ceiling that never binds, so it is refused; this does not check that the value names a configured provider instance

scope_idstring required

Id of the capped identity: this organization, one of its workspaces, a membership in either, or an API key in one

scope_type'organization' | 'workspace' | 'workspace_member' | 'org_member' | 'api_token' required

Which kind of identity this ceiling caps

Response

Successful Response

budget_duration_secinteger nullable required
budget_idstring required
created_atstring required
current_requestsinteger required
current_spendnumber required
current_tokensinteger required
idstring required
manageableboolean required
max_budgetnumber nullable required
namestring nullable required
period_endstring nullable required
period_startstring nullable required
provider_key_idstring nullable required
request_limitinteger nullable required
reserved_requestsinteger required
reserved_spendnumber required
reserved_tokensinteger required
reset_alignmentstring nullable required
scope_idstring required
scope_typestring required
token_limitinteger nullable required
updated_atstring required

Changes

    • info

      added the optional property to the response with the status

    • info

      api operation id create_organization_spend_ceiling_api_v1_organizations_me_spend_ceilings_post removed and replaced with organization-budgets-create_organization_spend_ceiling