Skip to main content

Organization & Membership API

This document describes the endpoints for managing organizations, invite links, and member signups. All protected endpoints require authentication.


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:

ParameterRequiredDescription
inviteTokenYesThe special pilot invitation token
emailYesAdmin's email address

Success Response: 201 Created


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:

ParameterRequiredDescription
inviteTokenYesThe organization's invite token
emailYesMember's email address

Success Response: 201 Created


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..."
}

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:

ParameterRequiredDescription
emailsYesArray 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:

ParameterRequiredDescription
nameYesDisplay 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:

ParameterRequiredDescription
nameYesUnique room identifier
metadataNoAdditional 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

EndpointRequired Permission/Role
GET /api/v1/organizations/inviteAll roles except Guest
POST /api/v1/organizations/invite/resetAdmin, Moderator
POST /api/v1/organizations/send-invitationInviteUser permission
POST /api/v1/organizations/createAuthenticated user
POST /api/v1/livekit/room-createAuthenticated user