Skip to main content

Workspaces

Workspaces

A workspace groups your projects (and, on paid plans, team members and client accounts). Every account gets a Default Workspace on signup, but that is not the only way to get one — the platform ships a full CRUD API so you can create and manage workspaces programmatically.

Workspace = organization. In the data model a workspace maps to the "organization" concept (user_organizations, projects.organization_id). A project belongs to a workspace via its organization_id.

Base URL: https://api.ainative.studio

Authentication

All workspace endpoints require authentication. You can use either:

  • a JWT — Authorization: Bearer <access_token>, or
  • an API key — X-API-Key: <sk_...>

Tier caps

The number of workspaces you can create is capped by plan. Exceeding the cap returns 402 Payment Required.

PlanWorkspace cap
Hobbyist / Free1
Prohigher (see pricing)
Team / Enterprisehigher (see pricing)

Create a workspace

POST/api/v1/workspaces🔒

Request body (name required):

FieldTypeNotes
namestringrequired
descriptionstring | nullmax 1000 chars
tierstringfree | pro | team | enterprise
workspace_typestringpersonal | client | team
client_metadataobject | null{company_name, contact_name, contact_email, billing_email, notes} — for client workspaces
curl -X POST https://api.ainative.studio/api/v1/workspaces \
-H "Authorization: Bearer $AINATIVE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corp", "workspace_type": "client", "tier": "pro"}'
import requests

resp = requests.post(
"https://api.ainative.studio/api/v1/workspaces",
headers={"Authorization": f"Bearer {token}"},
json={"name": "Acme Corp", "workspace_type": "client", "tier": "pro"},
)
workspace = resp.json()["workspace"]
print(workspace["id"], workspace["name"])
const resp = await fetch("https://api.ainative.studio/api/v1/workspaces", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Acme Corp", workspace_type: "client", tier: "pro" }),
});
const { workspace } = await resp.json();

Response 201 Created:

{
"ok": true,
"workspace": {
"id": "b3f1...",
"name": "Acme Corp",
"description": null,
"tier": "pro",
"role": "owner",
"is_default": false,
"workspace_type": "client",
"client_metadata": null,
"member_count": 1,
"project_count": 0,
"created_at": "2026-08-02T01:23:00Z"
},
"message": "Workspace created"
}

Returns 402 if you are at your plan's workspace cap.


List workspaces

GET/api/v1/workspaces🔒
curl https://api.ainative.studio/api/v1/workspaces \
-H "Authorization: Bearer $AINATIVE_TOKEN"

Returns your workspaces (including the Default Workspace), each with member_count and project_count.


Get a workspace

GET/api/v1/workspaces/{workspace_id}🔒
curl https://api.ainative.studio/api/v1/workspaces/$WORKSPACE_ID \
-H "Authorization: Bearer $AINATIVE_TOKEN"

Returns the workspace with its members and project summaries.


Update a workspace

PATCH/api/v1/workspaces/{workspace_id}🔒

All fields optional; send only what you want to change.

FieldTypeNotes
namestring | null1–255 chars
descriptionstring | nullmax 1000 chars
workspace_typestring | nullpersonal | client | team
client_metadataobject | nullsee create
curl -X PATCH https://api.ainative.studio/api/v1/workspaces/$WORKSPACE_ID \
-H "Authorization: Bearer $AINATIVE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corporation"}'

Delete a workspace

DELETE/api/v1/workspaces/{workspace_id}🔒
curl -X DELETE https://api.ainative.studio/api/v1/workspaces/$WORKSPACE_ID \
-H "Authorization: Bearer $AINATIVE_TOKEN"

Assign a project to a workspace

Move an existing project under a workspace. A project belongs to exactly one workspace (its organization_id).

POST/api/v1/workspaces/{workspace_id}/projects🔒

Request body (project_id required):

curl -X POST https://api.ainative.studio/api/v1/workspaces/$WORKSPACE_ID/projects \
-H "Authorization: Bearer $AINATIVE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"project_id": "47539617-..."}'
requests.post(
f"https://api.ainative.studio/api/v1/workspaces/{workspace_id}/projects",
headers={"Authorization": f"Bearer {token}"},
json={"project_id": project_id},
)

Notes

  • Workspaces are not auto-provisioned only. A Default Workspace is created at signup for convenience, but the six endpoints above let you create and manage workspaces at any time.
  • The /api/v1 prefix also has a /v1 alias.
  • To create projects inside a workspace, use the Projects API and pass organization_id, or assign an existing project with the endpoint above.