Skip to content

Organizations

Organizations are 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 (teams linked to the organization)
└── projects (projects linked to the organization)

API Endpoints

MethodPathDescription
GET/api/organizationsList user's organizations
POST/api/organizationsCreate organization
GET/api/organizations/by-slug/:slugGet organization details
PATCH/api/organizations/by-slug/:slugUpdate organization
DELETE/api/organizations/by-slug/:slugDelete organization
GET/api/organizations/by-slug/:slug/membersList members
POST/api/organizations/by-slug/:slug/membersInvite member
PATCH/api/organizations/by-slug/:slug/members/:userIdChange member role
DELETE/api/organizations/by-slug/:slug/members/:userIdRemove member
GET/api/organizations/by-slug/:slug/quotaGet organization quota
PATCH/api/organizations/by-slug/:slug/planChange organization plan
POST/api/organizations/by-slug/:slug/avatarUpload organization avatar

Frontend Routes

RouteViewDescription
/organizationsOrganizationsListViewList all user organizations
/organizations/:orgIdOrganizationDetailViewOrganization overview
/organizations/:orgId/settingsOrganizationSettingsViewOrganization 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 deletion removes all linked teams, projects, and tasks
  • Organization-level permissions control access to settings, member management, and billing