Workspace member budget policies
List the budget defaults attached to a workspace. Any member may read it.
Enter your API key here (sent as Otari-Key header).
Number of records to skip
0Maximum number of records to return
100Successful Response
Validation Error
GET /api/v1/workspaces/{workspace_id}/member-budget-policies HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"count": 1,
"data": [
{
"budget_duration_sec": 1,
"budget_id": "text",
"created_at": "text",
"id": "text",
"max_budget": 1,
"name": "text",
"provider_key_id": "text",
"request_limit": 1,
"reset_alignment": "text",
"token_limit": 1,
"updated_at": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}
]
}Create a budget default.
Materializes it into a per-member scoped_budgets row for every existing active member of the workspace; a member who joins afterwards is materialized when they join.
Enter your API key here (sent as Otari-Key header).
Request body for creating a default.
The budget this workspace hands to every member
Narrow the default to one provider instance; omit or null to apply to every provider. A blank value would materialize ceilings that never bind, so it is refused; this does not check that the value names a configured provider instance
^\S+$Successful Response
One default and its template values.
Validation Error
POST /api/v1/workspaces/{workspace_id}/member-budget-policies HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"budget_id": "text",
"provider_key_id": "text"
}{
"budget_duration_sec": 1,
"budget_id": "text",
"created_at": "text",
"id": "text",
"max_budget": 1,
"name": "text",
"provider_key_id": "text",
"request_limit": 1,
"reset_alignment": "text",
"token_limit": 1,
"updated_at": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}Update a budget default's label or limit.
Not retroactive: members already materialized from this default keep their existing ceiling; only a member materialized afterwards sees the new one.
Enter your API key here (sent as Otari-Key header).
Request body for pointing a default at a different budget.
Members already materialized from this default keep the budget they were given: their ceiling names it directly, and this only changes what a member joining afterwards is handed. Editing the budget is the retroactive act, and it moves everyone naming it, in this workspace and outside it.
Successful Response
One default and its template values.
Validation Error
PATCH /api/v1/workspaces/{workspace_id}/member-budget-policies/{default_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"budget_id": "text"
}{
"budget_duration_sec": 1,
"budget_id": "text",
"created_at": "text",
"id": "text",
"max_budget": 1,
"name": "text",
"provider_key_id": "text",
"request_limit": 1,
"reset_alignment": "text",
"token_limit": 1,
"updated_at": "text",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}Delete a budget default.
The per-member scoped_budgets rows it already materialized are kept; a member joining afterwards no longer gets one from it.
Enter your API key here (sent as Otari-Key header).
Successful Response
A human-readable acknowledgment for an operation with nothing to return.
What happened.
Validation Error
DELETE /api/v1/workspaces/{workspace_id}/member-budget-policies/{default_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
"message": "text"
}Last updated
Was this helpful?
