Skip to content

Organizations

Organizations are the top-level containers for your resources. All databases, API keys, and team members belong to an organization.


  • Every user has a personal organization created automatically at signup
  • You can create additional organizations for teams or projects
  • Resources are isolated between organizations
  • Team members can be invited with specific roles

RolePermissions
ownerFull access. Can delete organization, manage billing, and assign any role
adminManage databases, API keys, and members. Cannot delete org or change billing
memberCreate and manage databases and API keys. Cannot manage other members
readonlyView-only access to all resources

Creates a new organization. Requires JWT authentication.

Request:

{
"name": "Acme Corporation",
"slug": "acme-corp",
"billingEmail": "billing@acme.com"
}
FieldTypeRequiredDescription
namestringYesOrganization display name (2-100 characters)
slugstringNoURL-friendly identifier (auto-generated from name if not provided)
billingEmailstringNoEmail for billing notifications

Response (201 Created):

{
"organizationId": "org_abc123",
"name": "Acme Corporation",
"slug": "acme-corp",
"ownerUserId": "usr_abc123",
"plan": "free",
"status": "active",
"billingEmail": "billing@acme.com",
"createdAt": "2024-01-15T10:00:00Z",
"settings": {
"maxDatabases": 3,
"maxApiKeys": 10,
"maxMembers": 5,
"allowedRegions": null,
"requireMfa": false,
"ssoEnabled": false
}
}

Lists all organizations you are a member of.

Response:

{
"organizations": [
{
"organizationId": "org_abc123",
"organizationName": "Acme Corporation",
"role": "owner",
"joinedAt": "2024-01-15T10:00:00Z"
},
{
"organizationId": "org_def456",
"organizationName": "Side Project",
"role": "member",
"joinedAt": "2024-01-20T14:30:00Z"
}
]
}

GET /api/v1/organizations/{organizationId}

Section titled “GET /api/v1/organizations/{organizationId}”

Gets details of a specific organization. You must be a member.

Response:

{
"organizationId": "org_abc123",
"name": "Acme Corporation",
"slug": "acme-corp",
"ownerUserId": "usr_abc123",
"plan": "pro",
"status": "active",
"billingEmail": "billing@acme.com",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-20T09:00:00Z",
"settings": {
"maxDatabases": 10,
"maxApiKeys": 50,
"maxMembers": 25,
"allowedRegions": ["us-east-1", "eu-west-1"],
"requireMfa": true,
"ssoEnabled": false
}
}
StatusDescription
activeOrganization is fully operational
suspendedOrganization is suspended (usually billing issues)
deletedOrganization has been soft-deleted

PUT /api/v1/organizations/{organizationId}

Section titled “PUT /api/v1/organizations/{organizationId}”

Updates organization details. Requires admin or owner role.

Request:

{
"name": "Acme Corp Inc.",
"billingEmail": "finance@acme.com",
"settings": {
"requireMfa": true
}
}
FieldTypeDescription
namestringNew organization name
billingEmailstringNew billing email
settings.requireMfabooleanRequire MFA for all members

Response: Returns updated organization details.


DELETE /api/v1/organizations/{organizationId}

Section titled “DELETE /api/v1/organizations/{organizationId}”

Deletes an organization. Requires owner role.

Response: 204 No Content


Manage who has access to your organization.

GET /api/v1/organizations/{organizationId}/members

Section titled “GET /api/v1/organizations/{organizationId}/members”

Lists all members of an organization.

Response:

{
"members": [
{
"userId": "usr_abc123",
"email": "john@example.com",
"name": "John Doe",
"role": "owner",
"status": "active",
"joinedAt": "2024-01-15T10:00:00Z",
"invitedAt": null,
"invitedBy": null
},
{
"userId": "usr_def456",
"email": "jane@example.com",
"name": "Jane Smith",
"role": "admin",
"status": "active",
"joinedAt": "2024-01-20T14:30:00Z",
"invitedAt": "2024-01-18T10:00:00Z",
"invitedBy": "usr_abc123"
},
{
"userId": null,
"email": "pending@example.com",
"name": null,
"role": "member",
"status": "pending",
"joinedAt": null,
"invitedAt": "2024-01-22T09:00:00Z",
"invitedBy": "usr_abc123"
}
]
}
StatusDescription
activeMember has accepted invitation
pendingInvitation sent, awaiting acceptance

POST /api/v1/organizations/{organizationId}/members

Section titled “POST /api/v1/organizations/{organizationId}/members”

Invites a new member. Requires admin or owner role.

Request:

{
"email": "newmember@example.com",
"role": "member"
}
FieldTypeRequiredDescription
emailstringYesEmail address of user to invite
rolestringNoRole to assign: owner, admin, member, readonly (default: member)

Response (201 Created):

{
"userId": null,
"email": "newmember@example.com",
"name": null,
"role": "member",
"status": "pending",
"joinedAt": null,
"invitedAt": "2024-01-22T15:00:00Z",
"invitedBy": "usr_abc123"
}

PUT /api/v1/organizations/{organizationId}/members/{memberId}

Section titled “PUT /api/v1/organizations/{organizationId}/members/{memberId}”

Updates a member’s role. Requires admin or owner role.

Request:

{
"role": "admin"
}
FieldTypeRequiredDescription
rolestringYesNew role: owner, admin, member, readonly

Response:

{
"userId": "usr_def456",
"email": "jane@example.com",
"name": "Jane Smith",
"role": "admin",
"status": "active",
"joinedAt": "2024-01-20T14:30:00Z",
"invitedAt": "2024-01-18T10:00:00Z",
"invitedBy": "usr_abc123"
}

DELETE /api/v1/organizations/{organizationId}/members/{memberId}

Section titled “DELETE /api/v1/organizations/{organizationId}/members/{memberId}”

Removes a member from the organization. Requires admin or owner role, or the member themselves.

Response: 204 No Content


When you’re a member of multiple organizations, you can switch your active context.

Switches to a different organization. Requires JWT authentication.

Request:

{
"organizationId": "org_def456"
}

Response:

{
"accessToken": "eyJhbGci...",
"refreshToken": "rt_abc123...",
"expiresIn": 3600,
"userId": "usr_abc123",
"email": "john@example.com",
"name": "John Doe",
"avatarUrl": null,
"personalOrgId": "org_abc123",
"permissions": ["database:read", "database:write"],
"roles": ["member"]
}

// Create organization
var createOrgResult = await client.Organizations.CreateAsync(
new CreateOrganizationRequest(
Name: "Acme Corporation",
Slug: "acme-corp",
BillingEmail: "billing@acme.com"
)
);
// List organizations
var listResult = await client.Organizations.ListAsync();
// Get organization details
var orgResult = await client.Organizations.GetAsync("org_abc123");
// List members
var membersResult = await client.Organizations.ListMembersAsync("org_abc123");
// Invite member
var inviteResult = await client.Organizations.AddMemberAsync(
"org_abc123",
new AddMemberRequest(
Email: "newmember@example.com",
Role: "member"
)
);
// Update member role
var roleResult = await client.Organizations.UpdateMemberAsync(
"org_abc123",
"usr_def456",
new UpdateMemberRequest(Role: "admin")
);
// Remove member
var removeResult = await client.Organizations.RemoveMemberAsync(
"org_abc123",
"usr_def456"
);