API Reference
Log In
API Reference

Preview a department group-spawn's target count

BACK-2605: read-only preview for the "group by Department" UI flow — returns the direct sub-teams of parentOrgUnitId and their count, for the "this will independently cap N teams" confirmation copy. Creates nothing: the actual budget is a single POST /v2/api/ai/cost-controls write with groupBy: "ORG_UNIT", which already gives each org unit its own independent cap against the full hardLimit — mirroring how groupBy: "SUBSCRIBER" already compares each subscriber's own balance against the full threshold rather than a shared pool. Requires org-unit-budgets-enabled AND org-unit-attribution-enabled for the team; inert (422) otherwise.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Counts the direct sub-teams of an org unit, for the "group by Department" confirmation UI ("this will independently cap N teams"). Read-only — creates nothing.

string | null
required

The Revenium-generated identifier of the team

string | null
required

The org unit whose DIRECT sub-teams would each receive an independent cap, as its RAW numeric id (stringified) — see CostControlResource.orgUnitId's doc for why org-unit ids are never hashed, unlike teamId above.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*