Skip to Content

Organizations

Multi-tenant organizations, family sharing, and invitations.

Overview

Social and organizational features are handled by three services:

ServicePortPurpose
organization_service8212Multi-tenant, hierarchies, family sharing
invitation_service8213Invites, sharing links
membership_service8250Loyalty tiers, benefits

Organization Service (8212)

Create Organization

curl -X POST "http://localhost:8212/api/v1/organizations" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme Corp", "type": "business", "settings": { "allow_member_invites": true, "default_role": "member" } }'

Organization Types

TypeDescriptionFeatures
personalIndividual workspaceSingle owner
familyFamily sharingShared storage, albums
teamSmall teamUp to 10 members
businessBusiness orgUnlimited, advanced RBAC
enterpriseEnterpriseSSO, audit, compliance

Add Member

curl -X POST "http://localhost:8212/api/v1/organizations/org_abc123/members" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{"user_id": "user_456", "role": "editor"}'

List Members

curl "http://localhost:8212/api/v1/organizations/org_abc123/members" \ -H "Authorization: Bearer YOUR_JWT_TOKEN"

Family Sharing

Create Family

curl -X POST "http://localhost:8212/api/v1/organizations" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Smith Family", "type": "family", "settings": { "shared_storage": true, "shared_albums": true } }'

Family Roles

RolePermissions
organizerFull control, billing, add/remove members
adultFull access, can manage children
teenLimited access, parental controls
childRestricted, parent approval needed

Invitation Service (8213)

curl -X POST "http://localhost:8213/api/v1/invitations/link" \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "organization_id": "org_abc123", "role": "member", "max_uses": 10, "expires_in_days": 7 }'

Accept Invitation

curl -X POST "http://localhost:8213/api/v1/invitations/inv_xyz789/accept" \ -H "Authorization: Bearer YOUR_JWT_TOKEN"

Membership Service (8250)

Get Membership Status

curl "http://localhost:8250/api/v1/membership/me" \ -H "Authorization: Bearer YOUR_JWT_TOKEN"

Membership Tiers

TierPointsBenefits
Bronze0Base features
Silver5,00010% discount, 5GB extra storage
Gold15,00020% discount, priority support
Platinum25,00030% discount, early access

Python SDK

from isa_user import OrganizationClient, InvitationClient orgs = OrganizationClient("http://localhost:8212") invites = InvitationClient("http://localhost:8213") # Create organization org = await orgs.create( token=access_token, name="My Team", type="team" ) # Add member await orgs.add_member( token=access_token, org_id=org.organization_id, user_id="user_456", role="editor" ) # Create invite link link = await invites.create_link( token=access_token, org_id=org.organization_id, max_uses=5 )

Next Steps