Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .speakeasy/in.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9555,6 +9555,28 @@ components:
required:
- 'data'
type: 'object'
GetWorkspaceBudgetResponse:
example:
data:
created_at: '2025-08-24T10:30:00Z'
id: '770e8400-e29b-41d4-a716-446655440000'
limit_usd: 100
reset_interval: 'monthly'
updated_at: '2025-08-24T15:45:00Z'
workspace_id: '550e8400-e29b-41d4-a716-446655440000'
include_byok_in_budgets: true
properties:
data:
allOf:
- $ref: '#/components/schemas/WorkspaceBudget'
- description: 'The budget for the requested interval'
include_byok_in_budgets:
description: 'Whether BYOK (bring-your-own-key) spend is included when enforcing the workspace''s budgets. This is a workspace-wide setting that applies to all budget intervals (daily, weekly, monthly, and lifetime).'
example: true
type: 'boolean'
required:
- 'data'
type: 'object'
GetWorkspaceResponse:
example:
data:
Expand Down Expand Up @@ -36978,6 +37000,16 @@ paths:
schema:
$ref: '#/components/schemas/DeleteWorkspaceBudgetResponse'
description: 'Budget deleted successfully'
'400':
content:
application/json:
example:
error:
code: 400
message: 'Invalid request parameters'
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: 'Bad Request - Invalid request parameters or malformed input'
'401':
content:
application/json:
Expand Down Expand Up @@ -37012,6 +37044,86 @@ paths:
tags:
- 'Workspaces'
x-speakeasy-name-override: 'deleteBudget'
get:
description: 'Retrieve the budget for a given interval. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
operationId: 'getWorkspaceBudget'
parameters:
- description: 'The workspace ID (UUID) or slug'
in: 'path'
name: 'id'
required: true
schema:
description: 'The workspace ID (UUID) or slug'
example: 'production'
minLength: 1
type: 'string'
- description: 'Budget reset interval. Use "lifetime" for a one-time budget that never resets.'
example: 'monthly'
in: 'path'
name: 'interval'
required: true
schema:
$ref: '#/components/schemas/WorkspaceBudgetInterval'
responses:
'200':
content:
application/json:
example:
data:
created_at: '2025-08-24T10:30:00Z'
id: '770e8400-e29b-41d4-a716-446655440000'
limit_usd: 100
reset_interval: 'monthly'
updated_at: '2025-08-24T15:45:00Z'
workspace_id: '550e8400-e29b-41d4-a716-446655440000'
include_byok_in_budgets: true
schema:
$ref: '#/components/schemas/GetWorkspaceBudgetResponse'
description: 'Budget retrieved successfully'
'400':
content:
application/json:
example:
error:
code: 400
message: 'Invalid request parameters'
schema:
$ref: '#/components/schemas/BadRequestResponse'
description: 'Bad Request - Invalid request parameters or malformed input'
'401':
content:
application/json:
example:
error:
code: 401
message: 'Missing Authentication header'
schema:
$ref: '#/components/schemas/UnauthorizedResponse'
description: 'Unauthorized - Authentication required or invalid credentials'
'404':
content:
application/json:
example:
error:
code: 404
message: 'Resource not found'
schema:
$ref: '#/components/schemas/NotFoundResponse'
description: 'Not Found - Resource does not exist'
'500':
content:
application/json:
example:
error:
code: 500
message: 'Internal Server Error'
schema:
$ref: '#/components/schemas/InternalServerResponse'
description: 'Internal Server Error - Unexpected server error'
summary: 'Get a workspace budget'
tags:
- 'Workspaces'
x-speakeasy-name-override: 'getBudget'
put:
description: 'Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). The optional `include_byok_in_budgets` flag is a workspace-wide setting: when provided it applies to every budget interval for the workspace, not just the interval in this request. Note that a change made here is applied to budget enforcement immediately, but an already-open workspace settings page in the web dashboard may keep showing the previous value until it is reloaded. [Management key](/docs/guides/overview/auth/management-api-keys) required.'
operationId: 'upsertWorkspaceBudget'
Expand Down
Loading