Organizations API
ดู organizations ของ user
GET /organizations
Authorization: Bearer <token>ดู organization
GET /organizations/:slug
Authorization: Bearer <token>สร้าง organization
POST /organizations
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "string",
"slug": "string"
}แก้ไข organization
PATCH /organizations/:slug
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "string"
}Permission ที่ต้องการ: console.orgs.write
Members
ดูสมาชิกทั้งหมด
GET /organizations/:slug/members
Authorization: Bearer <token>เชิญสมาชิก
POST /organizations/:slug/invitations
Authorization: Bearer <token>
Content-Type: application/json
{
"email": "string",
"role": "owner | admin | member"
}แก้ไข role ของสมาชิก
PATCH /organizations/:slug/members/:userId
Authorization: Bearer <token>
Content-Type: application/json
{ "role": "admin" }Permission ที่ต้องการ: console.orgs.write
ลบสมาชิก
DELETE /organizations/:slug/members/:userId
Authorization: Bearer <token>Permission ที่ต้องการ: console.orgs.write