headless lms

Organizations

The tenant: its members, roles, invites and students

Create an organization and make it active

For any signed-in person, including one with no organization yet. The caller becomes its owner.

Update the active organization (staff)

Owner or admin. Changes its name or slug; 409 when the slug is taken.

List the organization's team members (staff)

Staff only (owner, admin, instructor). The team: everyone in the organization who is not a student.

Change a member's role (staff)

Owner or admin only. The owner role can be neither granted nor changed (409), and only a moderator can become a student.

Remove an organization member (staff)

Owner or admin only. Removing a pending member cancels their invite. The owner cannot be removed (409).

Invite a member or student into the active organization (staff)

Owner or admin only. A student is created by this call, so their access can be granted before they accept. 409 when a student with that email is already in the organization.

Read an invite by its token

Public: no session needed. The same 404 answers forged, expired and accepted tokens, so a probe learns nothing.

Accept an invite with the signed-in account

For any signed-in person whose email matches the invitation. Makes the invite's organization the session's active one. 400 when the token is invalid or expired, or the email does not match.

Get the portal org's public identity (branding)

For any signed-in person whose session has this organization active. Name and slug only.

Get the caller's identity within the session's org

For a member of the organization: your org user id, which the member API keys on, and your role here.

List students (staff)

Staff only (owner, admin, instructor).

Get a student (staff)

Staff only (owner, admin, instructor).

Delete a student (staff)

Owner or admin only. 409 when the person has written posts, comments or messages.

Re-send a pending student's invite email (staff)

Owner or admin only. Issues a new token, so the previous link stops working. 404 when the student has no pending invite; 409 when it was already accepted.