Organizations
Manage your organization and team members.
Overview
Organizations allow you to:
- Share resources - Multiple users access the same databases
- Control permissions - Role-based access control
- Centralize billing - Single invoice for all usage
Get Organization
GET /v1/organization
curl https://api.cloudheed.com/v1/organization \
-H "Authorization: Bearer YOUR_TOKEN"Response:
{
"id": "org-123",
"name": "Acme Corp",
"slug": "acme-corp",
"plan": "pro",
"owner_id": "user-123",
"member_count": 5,
"database_count": 12,
"created_at": "2026-01-01T00:00:00Z"
}Update Organization
PATCH /v1/organization
curl -X PATCH https://api.cloudheed.com/v1/organization \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation"
}'Organization Settings
GET /v1/organization/settings
curl https://api.cloudheed.com/v1/organization/settings \
-H "Authorization: Bearer YOUR_TOKEN"Response:
{
"require_2fa": true,
"allowed_regions": ["fsn1", "nbg1", "ash"],
"ip_allowlist_required": false,
"default_tier": "micro",
"sso_enabled": false
}Update Settings
PATCH /v1/organization/settings
curl -X PATCH https://api.cloudheed.com/v1/organization/settings \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"require_2fa": true
}'⚠️
Enabling require_2fa will require all members to set up 2FA on their next login.
Audit Log
Track all actions in your organization:
GET /v1/organization/audit-log
curl https://api.cloudheed.com/v1/organization/audit-log \
-H "Authorization: Bearer YOUR_TOKEN"Response:
{
"events": [
{
"id": "evt-123",
"action": "database.created",
"actor": {
"id": "user-456",
"email": "[email protected]"
},
"resource": {
"type": "database",
"id": "db-abc123",
"name": "production-db"
},
"ip_address": "203.0.113.50",
"created_at": "2026-03-17T10:00:00Z"
}
],
"meta": {
"page": 1,
"total": 150
}
}Available Actions
| Action | Description |
|---|---|
database.created | Database was created |
database.deleted | Database was deleted |
database.resized | Database tier changed |
member.invited | Team member invited |
member.removed | Team member removed |
member.role_changed | Member role updated |
api_key.created | API key created |
api_key.revoked | API key revoked |
settings.updated | Org settings changed |