Workspace members
Share a single workspace — list, add, and remove members without organization-wide access.
A workspace member is a per-workspace access grant: it gives one user access to one workspace, nothing else. For organization-owned workspaces the grantee must already be a member of that organization (they accepted their invitation) — invite people to the organization first, then share workspaces with them. See Organizations and Invitations.
List members
Anyone who can access the workspace can see its member list:
curl "$API_BASE/v1/workspace/$WORKSPACE_ID/members" \
-H "Authorization: Bearer $TOKEN"from predictai import PredictAI
client = PredictAI(token="pa_live_…")
data = client.workspaces.get_workspace_by_workspace_id_members(WORKSPACE_ID)
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…" });
const data = await client.workspaces.getWorkspaceByWorkspaceIdMembers(WORKSPACE_ID);
{
"data": {
"members": [
{
"user_id": "e1c62b7a-9f04-4d3b-8a15-2c7d90e4b638",
"email": "[email protected]",
"name": "Ada Norberg",
"role": "owner",
"is_owner": true,
"granted_at": null,
"granted_by": null
},
{
"user_id": "4b8f2a90-6d17-4c3e-b5a2-9e01d7c84f53",
"email": "[email protected]",
"name": "Sam Okafor",
"role": "editor",
"is_owner": false,
"granted_at": "2026-07-08T11:20:00+00:00",
"granted_by": "e1c62b7a-9f04-4d3b-8a15-2c7d90e4b638"
}
]
}
}The owner always appears first with role: "owner"; explicit grants
follow with when and by whom they were added.
Errors
| Status | Why | Example message |
|---|---|---|
404 | No such workspace, or you can't access it | "Workspace not found in this account" |
Add a member
Only the workspace owner can manage members, and adding them requires a
Team plan or above. Identify the person by user_id or email — they
must already have a predictAI account:
curl -X POST "$API_BASE/v1/workspace/$WORKSPACE_ID/members" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "email": "[email protected]", "role": "editor" }'from predictai import PredictAI
client = PredictAI(token="pa_live_…")
data = client.workspaces.post_workspace_by_workspace_id_members(WORKSPACE_ID, json={"email": "[email protected]", "role": "editor"})
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…" });
const data = await client.workspaces.postWorkspaceByWorkspaceIdMembers(WORKSPACE_ID, { json: { email: "[email protected]", role: "editor" } });
{
"data": {
"member": {
"user_id": "4b8f2a90-6d17-4c3e-b5a2-9e01d7c84f53",
"email": "[email protected]",
"name": "Sam Okafor",
"role": "editor",
"is_owner": false,
"granted_at": null,
"granted_by": null
}
}
}| Field | Meaning |
|---|---|
email required | Who to add — or send user_id instead. They must already have a predictAI account. |
user_id optional | The alternative identifier to email. |
role optional | viewer, editor (default), or admin. |
Adding someone who's already a member updates their role in place.
For organization-owned workspaces, the organization's
allowed_email_domains policy applies: emails outside the allowed domains
are rejected.
Errors
| Status | Why | Example message |
|---|---|---|
400 | Neither user_id nor email given | "Provide user_id or email" |
400 | Unknown role | "Invalid role. Allowed: ['admin', 'editor', 'viewer']" |
403 | Not the workspace owner | "Only the workspace owner or an org admin can manage members" |
403 | Plan doesn't include member invites | "Inviting members requires a Team plan or above." |
403 | Email outside the organization's allowed domains | "This organization only allows members from: acme.dev" |
403 | Target hasn't joined the workspace's organization | "That user is not a member of this workspace's organization yet. …" |
404 | No account matches | "No user found for that user_id/email" |
409 | Target is the workspace owner | "That user already owns this workspace" |
The plan and domain-policy errors come back structured:
{
"error": {
"code": "upgrade_required",
"message": "Inviting members requires a Team plan or above.",
"details": { }
},
"status": "Inviting members requires a Team plan or above."
}Remove a member
curl -X DELETE "$API_BASE/v1/workspace/$WORKSPACE_ID/members/$MEMBER_USER_ID" \
-H "Authorization: Bearer $TOKEN"from predictai import PredictAI
client = PredictAI(token="pa_live_…")
data = client.workspaces.delete_workspace_by_workspace_id_members_by_user_id(WORKSPACE_ID, MEMBER_USER_ID)
import { PredictAI } from "@predictai/sdk";
const client = new PredictAI({ token: "pa_live_…" });
const data = await client.workspaces.deleteWorkspaceByWorkspaceIdMembersByUserId(WORKSPACE_ID, MEMBER_USER_ID);
{ "data": { "message": "Member removed" } }Removal is idempotent — removing someone who isn't a member still returns
200.
Errors
| Status | Why | Example message |
|---|---|---|
400 | Target is the workspace owner | "Cannot remove the workspace owner" |
403 | Not the workspace owner | "Only the workspace owner or an org admin can manage members" |
404 | No such workspace | "Workspace not found" |

