Concepts
- Default org, Every user has exactly one membership flagged as their default. Requests that don’t pin an org fall back to it. The default is created at signup and you must always have one.
-
Active org, The org the dashboard (or CLI) is currently acting on. The org switcher in the sidebar changes the active org; under the hood the dashboard sends
X-Org-Slug: <slug>on every request. -
Roles, Each member of an org has one of three roles:
-
Slug, A short URL-safe identifier (
a-z,0-9,-). Slugs are unique platform-wide and stable URLs in the dashboard (/orgs/{slug}). They can be renamed by an owner.
Using the dashboard
The org switcher lives in the sidebar. Click it to:- See every org you belong to and your role in each
- Switch the active org, every page in the dashboard refetches against the new org
- Open Organizations to create a new org, see pending invites you’ve received, or jump into an org’s settings
/orgs/{slug}) shows the members table, pending invites, and the org’s current balance. Owners get extra controls for renaming the org, changing the billing email, and deleting it.
Inviting members
Add someone by email from the org settings page (orPOST /orgs/{slug}/members). A pending invite is created and an invite email is sent, whether or not the email already has a Lyceum account. The response is always status: "invited". Nobody joins an org without accepting, and inviting someone who is already a member returns 409.
The link in the email goes to https://dashboard.lyceum.technology/invite/{token}:
- Existing user, They sign in and accept there, or under Organizations, which lists the invites they have received.
- New user, When they sign up with the same email, the invite is auto-accepted by the auth hook.
DELETE /orgs/{slug}/invites/{invite_id}). Once a user accepts, the row is kept for audit and a new pending invite can be issued.
Only one pending invite per (org, email) can exist at a time. Revoke the old one first if you need to re-send.
Org context on API requests
Every request that touches a billable resource (runs, VMs, deployments, balance, history) is resolved against an org using this order:- API key with an embedded
org_id, API keys created under/orgs/{slug}/api-keysare pinned to that org. Authentication and org context come from the key in a single step. - JWT +
X-Org-Slugheader, If you authenticated with a JWT, pass the slug of the org you want to act on asX-Org-Slug: <slug>. The server verifies that you’re a member of that org. - Fallback, If neither is provided, the request falls back to your default org.
CLI
Org management commands live underlyceum org. The CLI tracks the active org in ~/.lyceum/config.json; once set, it sends X-Org-Slug on every subsequent request.
Org commands need a browser login (lyceum auth login). A CLI signed in with an API key can run workloads, but of the commands below only lyceum org current and lyceum org unset work, see What an API key cannot do.
Billing
Credits are tracked per org. The org’s billing balance, transaction ledger, and category aggregates are available at the endpoints below. They need a signed-in session; with an API key, read the balance from/billing/credits instead.
Aggregate categories and the metadata keys you can group by:
Stripe top-ups credit the org that was active when the checkout session was created, the org id is captured in the Stripe session metadata so the webhook routes credits back to the right org even if the user switches active org before the payment completes.
See Billing for top-ups, history, and invoices.
REST API
Every endpoint in this section needs the JWT of a signed-in session, except the publicGET /invites/{token} preview. API keys are refused with 403.
Orgs
DELETE /orgs/{slug} returns 409 if any member has the org as their default, or if the org still has live VMs, runs, or deployments.
Members
DELETE is rejected with 400 if the target is the last owner, and 409 if the org is the target’s default org.
Invites
Org-scoped API keys
The plaintext key is returned exactly once at creation or regeneration, store it immediately. See API Keys for details.