Workspaces
Find your workspace ID
List your workspaces and pick the uid that every other API call needs.
Nearly every API request carries an X-Workspace-Id header. This page is
where that value comes from: list your workspaces, pick the uid.
Only Authorization is needed — this route works before you have any
workspace ID to send:
curl "$API_BASE/v1/workspace" \
-H "Authorization: Bearer $TOKEN"from predictai import PredictAI
client = PredictAI(token="pa_live_…")
data = client.workspaces.get_workspace()
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…" });
const data = await client.workspaces.getWorkspace();
{
"data": {
"workspaces": [
{
"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",
"statistics": {
"models_count": 3,
"blueprints_count": 3,
"pipelines_count": 2,
"segments_count": 5,
"signals_count": 148,
"deployments_count": 1,
"inferences_count": 412,
"trainings_count": 27
}
},
…
]
}
}Take the uid and send it as X-Workspace-Id on every workspace-scoped
call:
export WORKSPACE_ID=7d4a9b2e-3c61-4f8a-9e27-5b0c8d1f6a42
curl "$API_BASE/v1/pipelines" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: $WORKSPACE_ID"What's in each row
| Field | Meaning |
|---|---|
uid | The workspace ID — what you send as X-Workspace-Id. |
user_role | Your relationship to the workspace: owner or collaborator. |
organization_name | Appears only on organization-owned workspaces. |
statistics | The workspace's contents at a glance. blueprints_count is a deprecated alias of models_count — use models_count. |
The list covers every workspace you can reach: ones you own, ones shared with you, and — when you belong to an organization — all of the organization's workspaces.
Errors
| Status | Why | Example message |
|---|---|---|
401 | Missing or invalid token | "authorization_required" |
Need a token first? Create one under Account → API tokens, then see Authentication for how the two headers fit together.

