帳戶
AM 帳戶為每位客戶提供獨立的計費與協作空間。使用者隸屬於 Application,並透過 Membership 存取帳戶。
帳戶可巢狀化,以建模有子公司的企業、服務多客戶的代理商,或採用工作區架構的平台。
帳戶層級
Your Platform
├── Acme Corp
│ ├── Engineering Team
│ └── Sales Team
└── Globex Inc
└── Product Team
每一層都是一個帳戶。存取控制透過 Membership 管理。
操作
| Endpoint | 說明 |
|---|---|
POST /api/applications/:application_id/register | 建立含初始擁有者的帳戶 |
POST /api/accounts/:account_id/accounts | 建立不含使用者的子帳戶 |
GET /api/accounts/:account_id/accounts | 列出子帳戶 |
GET /api/accounts/:account_id | 取得帳戶詳細資料 |
PATCH /api/accounts/:account_id | 修改名稱、頭像與設定 |
DELETE /api/accounts/:account_id | 永久移除帳戶 |
帳戶屬性
{
id: "acc_...", // Unique identifier
parent_id: "app_...", // Parent resource (application or account)
name: "Acme Corp", // Display name
avatar_url: "https://..."
}
邀請
將使用者加入帳戶: