Company

Create a workspace in a company

Creates a new workspace in one of the company's billing accounts. Endpoint authorized with a company-scoped API key, or by a company admin user.

post/companies/{id}/workspaces

Path parameters

idstring required

Company ID

Request body

namestring required

The display name for the new workspace

account_idstring

The billing account that will own the new workspace. Required when the company owns more than one account. When omitted and the company owns exactly one account, that account is used.

owner_user_idsstring[]

Users to grant the owner role in the new workspace. Each must already be a member of the company, holding either a role in one of its workspaces or a company role; naming a user outside the company, or one that does not exist, is rejected. If any grant fails the whole creation is rolled back, so keep the list to the users who genuinely need to own the workspace.

credit_allocationinteger

Credits reserved for the new workspace in each billing period. When omitted the workspace draws on the account's unallocated credits alongside its siblings.

enforce_credit_limitboolean

When true, cloud runs in the new workspace are blocked once its credit allocation is exhausted for the billing period. Requires credit_allocation.

Response

The workspace that was created

idstring

The id of the workspace

namestring

The display name of the workspace

account_idstring

The id of the billing account that owns the workspace

created_timeinteger

Time at which the workspace was created, in epoch milliseconds

Changes

Changed in 1 of the 12 revisions of this API.1