Predict.aiDocs
Workspaces

Manage workspaces

Create, inspect, edit, and delete workspaces; list the regions you can create in.

Create a workspace

Only name is required. Authorization is the only required header — send X-Workspace-Id too if you're working inside an organization workspace and want the new workspace attached to the same organization:

curl -X POST "$API_BASE/v1/workspace" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Demand forecasting",
    "description": "Daily demand across EU markets",
    "goal": "Forecast SKU-level demand 14 days out",
    "keywords": ["demand", "retail", "sku"],
    "sectors": ["retail"],
    "data_granularity": "day",
    "region": "eu-1"
  }'
{
  "data": {
    "uid": "7d4a9b2e-3c61-4f8a-9e27-5b0c8d1f6a42",
    "message": "Workspace created successfully"
  }
}

A 201 means the workspace exists — the uid is the value you'll send as X-Workspace-Id from now on.

FieldWhat it is
name requiredDisplay name.
description optionalFree text.
goal optionalWhat you want to forecast (stored as purpose; either key is accepted).
keywords optionalArray of lowercase strings.
sectors optionalArray of lowercase strings.
data_granularity optionalThe cadence your data arrives at; defaults to day.
region optionalRegion ID from available regions. Defaults to your account's home region. Set once — a workspace never changes region.

Errors

StatusWhyExample message
400Empty body or missing name"Missing required field: name"
400region isn't a selectable region"Region 'ap-9' is not available for selection."
403Plan workspace quota reached"Workspace limit exceeded. Your plan allows 5 workspaces."

The invalid-region error comes back structured, with the valid choices inline:

{
  "error": {
    "code": "invalid_region",
    "message": "Region 'ap-9' is not available for selection.",
    "details": { "available_regions": [ { "id": "eu-1",  } ] }
  },
  "status": "Region 'ap-9' is not available for selection."
}

Get one workspace

curl "$API_BASE/v1/workspace/$WORKSPACE_ID" \
  -H "Authorization: Bearer $TOKEN"
{
  "data": {
    "uid": "7d4a9b2e-3c61-4f8a-9e27-5b0c8d1f6a42",
    "name": "Demand forecasting",
    "description": "Daily demand across EU markets",
    "owner": "e1c62b7a-9f04-4d3b-8a15-2c7d90e4b638",
    "created_at": "2026-06-02T09:14:00+00:00",
    "updated_at": "2026-07-10T16:45:00+00:00",
    "collaborators": ["e1c62b7a-9f04-4d3b-8a15-2c7d90e4b638"],
    "user_role": "owner",
    "organization_name": "Acme Analytics",
    "organization_owner": "e1c62b7a-9f04-4d3b-8a15-2c7d90e4b638"
  }
}

organization_name and organization_owner appear only when the workspace belongs to an organization. Unlike the list route, the detail view carries no statistics block.

Errors

StatusWhyExample message
403You can't access this workspace"Access denied to this workspace"
404No such workspace"Workspace with ID … not found"

Edit a workspace

Send only the fields you're changing. The workspace owner or any collaborator can edit:

curl -X PUT "$API_BASE/v1/workspace/$WORKSPACE_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Demand forecasting (EU)" }'
{ "data": { "message": "Workspace updated successfully" } }
FieldMeaning
name optionalRename the workspace.
description / purpose optionalFree-text metadata.
keywords / sectors optionalArrays of lowercase strings.
data_granularity optionalThe cadence your data arrives at.
collaborators optionalThe array of user IDs with direct access.

Anything else in the body is ignored. If nothing actually changed, you get 200 with "No changes were made to the workspace".

Errors

StatusWhyExample message
400Empty body"Request body is empty"
403Not the owner or a collaborator"You don't have permission to edit this workspace"
404No such workspace"Workspace with ID … not found"

Delete a workspace

Only the workspace owner can delete:

curl -X DELETE "$API_BASE/v1/workspace/$WORKSPACE_ID" \
  -H "Authorization: Bearer $TOKEN"
{ "data": { "message": "Workspace and all related data deleted successfully" } }

Deletion is immediate and irreversible, and it takes everything in the workspace with it: in-flight trainings, inferences, and imports are cancelled; live deployments are taken out of serving; then all models, pipelines, segments, signals, trainings, deployments, inference history, and member grants are permanently deleted.

Errors

StatusWhyExample message
403Not the workspace owner"You don't have permission to delete this workspace"
404No such workspace"Workspace with ID … not found"

List available regions

The regions you may create a workspace in, plus the default the platform would pick for you:

curl "$API_BASE/v1/workspace/available-regions" \
  -H "Authorization: Bearer $TOKEN"
{
  "data": {
    "regions": [
      {
        "id": "eu-1",
        "region": "eu-north-1",
        "subdomain": "eu.api.predict.ai",
        "countries": ["*EU"]
      },

    ],
    "default_region": "eu-1"
  }
}

Pass a region's id as the region field when creating a workspace. subdomain is the API host serving that region — your base URL for workspaces created there. default_region is what you get when you don't choose; it's derived from your account's (or organization's) stored country and home region. When only one region is listed, there's nothing to decide.

On this page