Skip to content

Organizations

Organizations are the top-level entities for grouping teams and projects. Each organization has its own members, roles, and settings.

Model

Organization
├── name, slug, description, logoUrl
├── members (with roles: OWNER, ADMIN, MANAGER, MEMBER)
├── teams (org-linked teams)
└── projects (org-linked projects)

API Endpoints

MethodPathDescription
GET/api/organizationsList user's organizations
POST/api/organizationsCreate organization
GET/api/organizations/:orgIdGet organization details
PATCH/api/organizations/:orgIdUpdate organization
DELETE/api/organizations/:orgIdDelete organization
GET/api/organizations/:orgId/membersList members
POST/api/organizations/:orgId/membersInvite member
PATCH/api/organizations/:orgId/members/:userIdUpdate member role
DELETE/api/organizations/:orgId/members/:userIdRemove member

Frontend Routes

RouteViewDescription
/organizationsOrganizationsListViewList all user orgs
/organizations/:orgIdOrganizationDetailViewOrg overview
/organizations/:orgId/settingsOrganizationSettingsViewOrg settings

Frontend Store

typescript
const store = useOrganizationsStore()
const { organizations, currentOrganization } = storeToRefs(store)

await store.fetchOrganizations()
await store.fetchOrganization(orgId)

await store.createOrganization({ name, slug, description })
await store.updateOrganization(orgId, { name, description })

// Members
await store.addMember(orgId, email, role)
await store.removeMember(orgId, userId)

Key Implementation Details

  • Organizations support custom roles with granular permissions
  • Slug is used for URL-friendly identifiers
  • Cascade delete removes all associated teams, projects, and tasks
  • Org-level permissions control access to settings, member management, and billing