Docs
Workspace Settings

Create a workspace

Provisions a new workspace in the organization - one per end-customer for a partner integration. Requires a personal (ti_pk_) key whose creator is an organization owner; a workspace-scoped key is rejected. Every organization owner, the key creator included, becomes an owner of the new workspace. The key acts as its creator and stops working if they leave or stop being an owner, so use a key owned by a service account rather than an individual. Pass dailyWarmupBudget to allocate the new workspace its daily warmup budget in the same call; that field also needs the workspace:quota scope.

POST
/v2/workspaces
namestring
Lengthlength <= 100
dailyWarmupBudget?number

Daily warmup budget to allocate to the new workspace out of the organization's total cap. Requires the workspace:quota scope in addition to workspace:provision. Omit it to create the workspace with a budget of 0 and allocate later with PATCH /v2/workspaces/quotas. Rejected with 400 quota_exceeds_org_limit if it would take the organization's allocations over its cap - nothing is created in that case.

Range0 <= value

Response Body

curl -X POST "https://lynx-api.trulyinbox.com/v2/workspaces" \  -H "Content-Type: application/json" \  -d '{    "dailyWarmupBudget": 500  }'
{
  "data": {
    "id": 0,
    "name": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "quota": {
      "dailyWarmupBudget": 0
    },
    "role": "owner"
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}