Workspaces & 团队

Workspace 是 W-ID 的多租户隔离单元。每个开发者自动获得一个 Personal Workspace。

概念

概念说明
Personal Workspace注册后自动创建,不可删除
Team Workspace手动创建,可邀请成员
Owner创建者,拥有所有权限
Admin可管理成员和设置
Member可使用 workspace 资源

角色层级

Super Admin (平台)
  └── Owner (workspace)
       └── Admin (workspace)
            └── Member (workspace)

邀请成员

POST /api/workspaces/:id/invitations
Content-Type: application/json
Authorization: Bearer ACCESS_TOKEN

{
  "email": "colleague@example.com",
  "role": "member"
}

// 响应
{
  "id": "inv_xxx",
  "email": "colleague@example.com",
  "role": "member",
  "expiresIn": "7 days"
}

配额管理

每个 Workspace 根据套餐享有配额限制:

资源FreeEnterprise
Events10K∞
OAuth Clients1∞
API Calls1K∞
Storage100MB∞