Organization & Membership API¶
This document describes the endpoints for managing organizations, invite links, and member signups. All protected endpoints require authentication.
Admin Signup (Pilot Link)¶
Allows a new admin user to sign up using a special pilot invitation link.
Endpoint: POST /auth/admin-sign-up
Request Body:
{
"email": "admin@example.com",
"inviteToken": "abc123"
}
Parameters:
| Parameter | Required | Description |
|---|---|---|
inviteToken |
Yes | The special pilot invitation token |
email |
Yes | Admin's email address |
Success Response: 201 Created
Member Signup (Organization Invite Link)¶
Allows a new member to sign up using an organization-generated invite link.
Endpoint: POST /auth/member-sign-up
Request Body:
{
"email": "member@example.com",
"inviteToken": "abc123"
}
Parameters:
| Parameter | Required | Description |
|---|---|---|
inviteToken |
Yes | The organization's invite token |
email |
Yes | Member's email address |
Success Response: 201 Created
Get Organization Invite Link¶
Retrieves the current invite link for the organization. If no invite link exists, one is automatically created (lazy initialization).
Endpoint: GET /api/v1/organizations/get-invite-link
Authorization: All roles except Guest
Request Body: None
Success Response: 200 OK
{
"inviteLink": "https://app.example.com/invite/org_abc123..."
}
Reset Organization Invite Link¶
Generates a new invite link for the organization, invalidating the previous one.
Endpoint: POST /api/v1/organizations/reset-invite-link
Authorization: Admin, Moderator only
Request Body: None
Success Response: 200 OK
{
"inviteLink": "https://app.example.com/invite/org_newlink456..."
}
Send Mass Invitations (via WorkOS)¶
Sends invitation emails to multiple recipients through WorkOS. Recipients will receive an email with a link to join the organization.
Endpoint: POST /api/v1/organizations/send-invitation
Authorization: Requires InviteUser permission
Request Body:
{
"emails": [
"user1@example.com",
"user2@example.com",
"user3@example.com"
],
}
Parameters:
| Parameter | Required | Description |
|---|---|---|
emails |
Yes | Array of email addresses to invite |
Success Response: 200 OK
NOTE: Invitations that encounter errors fail silently.
Create Organization¶
Creates a new organization for the authenticated user.
Endpoint: POST /api/v1/organizations/create
Request Body:
{
"name": "My Company",
}
Parameters:
| Parameter | Required | Description |
|---|---|---|
name |
Yes | Display name for the organization |
Success Response: 200 OK
Create Room (IN PROGRESS, IGNORE FOR NOW)¶
Creates a new LiveKit room within the organization.
Endpoint: POST /api/v1/livekit/room-create
Request Body:
{
"name": "meeting-room-1",
"metadata": {
"displayName": "Meeting Room 1",
"capacity": 10
}
}
Parameters:
| Parameter | Required | Description |
|---|---|---|
name |
Yes | Unique room identifier |
metadata |
No | Additional room configuration |
Success Response: 200 OK
{
"room": {
"id": "room_abc123",
"name": "meeting-room-1",
"metadata": {
"displayName": "Meeting Room 1",
"capacity": 10
}
}
}
Note: Room create parameters may need to be updated. Check with backend for the latest schema.
RBAC Permission Summary¶
| Endpoint | Required Permission/Role |
|---|---|
GET /api/v1/organizations/invite |
All roles except Guest |
POST /api/v1/organizations/invite/reset |
Admin, Moderator |
POST /api/v1/organizations/send-invitation |
InviteUser permission |
POST /api/v1/organizations/create |
Authenticated user |
POST /api/v1/livekit/room-create |
Authenticated user |