Organizations
Team Management

Team Management

Invite team members and manage permissions.

Roles

RolePermissions
OwnerFull access, billing, delete org
AdminManage members, all database operations
DeveloperCreate and manage databases
ViewerRead-only access

List Members

GET /v1/organization/members

curl https://api.cloudheed.com/v1/organization/members \
  -H "Authorization: Bearer YOUR_TOKEN"

Response:

{
  "members": [
    {
      "id": "member-123",
      "user": {
        "id": "user-123",
        "email": "[email protected]",
        "name": "John Doe"
      },
      "role": "owner",
      "joined_at": "2026-01-01T00:00:00Z"
    },
    {
      "id": "member-456",
      "user": {
        "id": "user-456",
        "email": "[email protected]",
        "name": "Jane Smith"
      },
      "role": "developer",
      "joined_at": "2026-02-15T00:00:00Z"
    }
  ]
}

Invite Member

POST /v1/organization/members

curl -X POST https://api.cloudheed.com/v1/organization/members \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "role": "developer"
  }'

Response:

{
  "id": "invite-123",
  "email": "[email protected]",
  "role": "developer",
  "status": "pending",
  "expires_at": "2026-03-24T00:00:00Z",
  "created_at": "2026-03-17T00:00:00Z"
}

The invitee will receive an email with a link to accept the invitation.

Update Member Role

PATCH /v1/organization/members/{id}

curl -X PATCH https://api.cloudheed.com/v1/organization/members/member-456 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "admin"
  }'

Remove Member

DELETE /v1/organization/members/{id}

curl -X DELETE https://api.cloudheed.com/v1/organization/members/member-456 \
  -H "Authorization: Bearer YOUR_TOKEN"
⚠️

Removing a member revokes their access immediately. Any API keys they created remain active until explicitly revoked.

Pending Invitations

List Invitations

GET /v1/organization/invitations

Cancel Invitation

DELETE /v1/organization/invitations/{id}

curl -X DELETE https://api.cloudheed.com/v1/organization/invitations/invite-123 \
  -H "Authorization: Bearer YOUR_TOKEN"

Permission Matrix

ActionOwnerAdminDeveloperViewer
View databases
Create databases
Delete databases
Manage backups
View metrics
Manage members
Change settings
View billing
Manage billing
Delete organization

Transfer Ownership

POST /v1/organization/transfer

curl -X POST https://api.cloudheed.com/v1/organization/transfer \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "new_owner_id": "user-789",
    "password": "current_password"
  }'
🚫

Ownership transfer is irreversible. You'll become an admin after transfer.