Overview
Organizations enable team collaboration in Budget Bee. Users can create organizations, invite members, and manage shared financial data with role-based access control.Base URL
Organization endpoints are managed through the Better Auth system:Requirements
Organization Schema
Unique organization identifier
Organization name
URL-friendly organization identifier
URL to organization logo
Additional organization metadata
Organization creation timestamp
Create Organization
Create a new organization.Request Body
Organization name
URL-friendly identifier (auto-generated if not provided)
URL to organization logo
Additional metadata
Request Example
Response Example
Limits
Maximum 5 organizations per user
Maximum 50 members per organization
List Organizations
Get all organizations the current user is a member of.Request Example
Response Example
Get Organization
Retrieve details of a specific organization.Query Parameters
Organization ID to retrieve
Request Example
Response Example
Update Organization
Update organization details.Request Body
Organization ID to update
New organization name
New slug
New logo URL
Updated metadata
Request Example
Response Example
Delete Organization
Permanently delete an organization.Request Body
Organization ID to delete
Request Example
Set Active Organization
Switch the active organization for the current session.Request Body
Organization ID to activate (or null for personal context)
Request Example
Response Example
Organization Members
List Members
Get all members of an organization.Query Parameters
Organization ID
Request Example
Response Example
Invite Member
Invite a user to join the organization.Request Body
Organization ID
Email address of user to invite
Member role:
admin, editor, or viewerRequest Example
Response Example
Invitation emails are automatically sent. Invitations expire after 7 days.
Update Member Role
Change a member’s role in the organization.Request Body
Organization ID
User ID of the member
New role:
admin, editor, or viewerRequest Example
Remove Member
Remove a member from the organization.Request Body
Organization ID
User ID to remove
Request Example
Organization Roles
Owner
Full Control
- All admin permissions
- Delete organization
- Transfer ownership
- Cannot be removed by other members
- Transactions: list, get, create, update, delete
- Subscriptions: list, get, create, update, delete
- Accounts: list, get, create, update, delete
- Members: invite, update, remove
- Organization: update, delete
Admin
Administrative Access
- Manage organization settings
- Manage members and invitations
- Full resource access
- Transactions: list, get, create, update, delete
- Subscriptions: list, get, create, update, delete
- Accounts: list, get, create, update, delete
- Members: invite, update, remove
- Organization: update
Editor
Read & Write Access
- Full CRUD on financial data
- Cannot manage members
- Cannot modify organization settings
- Transactions: list, get, create, update, delete
- Subscriptions: list, get, create, update, delete
- Accounts: list, get, create, update, delete
- Members: list only
Viewer
Read-Only Access
- View all financial data
- Cannot create or modify data
- Cannot manage members
- Transactions: list, get
- Subscriptions: list, get
- Accounts: list, get
- Members: list only
Access Control
Organization data access is enforced through PostgreSQL Row-Level Security (RLS):Database Policies
JWT Claims
When a user has an active organization, their JWT includes:Best Practices
Security
- Verify email before creating organizations - Email verification is required
- Use least privilege - Assign the minimum role needed
- Regular audits - Review member access periodically
- Remove inactive members - Clean up members who no longer need access
Organization Structure
- Clear naming - Use descriptive organization names
- Consistent slugs - Keep slugs URL-friendly and meaningful
- Role assignment - Only assign owner/admin to trusted users
- Documentation - Use metadata to store important org info
Collaboration
- Onboarding - Document processes for new members
- Communication - Establish channels for financial discussions
- Data governance - Set standards for categorization and tagging
- Regular reviews - Schedule periodic data quality checks

