Organizations & Workspaces API
Manage multi-tenant workspaces, team members with role-based permissions (owner, admin, member), and dynamic context switching.
Base Path: /api/v1/organizations
List OrganizationsAuth
List all organization workspaces where the authenticated user is a member. Supports search and pagination.
Status Codes
- Name
200- Type
- HTTP
- Description
- List of organizations.
- Name
401- Type
- HTTP
- Description
- Unauthorized.
Request
GET/api/v1/organizations
Response 200
Create Organization WorkspaceAuth
Create a new isolated organization workspace. The creator is automatically assigned the owner role.
Payload Example
{
"name": "Platform Infrastructure Squad",
"slug": "platform-infra"
}Status Codes
- Name
201- Type
- HTTP
- Description
- Organization workspace created.
- Name
400- Type
- HTTP
- Description
- Invalid name or slug.
- Name
name- Type
- string
- Required
- Description
- Workspace display name.
- Name
slug- Type
- string
- Description
- Optional unique URL-friendly slug.
Request
POST/api/v1/organizations
Response 201
List Organization MembersAuth
Fetch workspace members with multi-role filters (e.g., roles=owner,admin) and search.
Status Codes
- Name
200- Type
- HTTP
- Description
- Members retrieved.
- Name
403- Type
- HTTP
- Description
- Forbidden.
Request
GET/api/v1/organizations/{id}/members
Response 200
Switch Active Organization ContextAuth
Switch user session context to a different organization workspace.
Status Codes
- Name
200- Type
- HTTP
- Description
- Workspace context switched.
- Name
403- Type
- HTTP
- Description
- Not a member of this organization.
Request
POST/api/v1/organizations/{id}/switch
Response 200