ResilientLang docsDeveloper documentation (draft, product name is a placeholder)

Team and members

Not in openapi.json. These routes belong to the sign-in module (src/ResilientLang.Identity, prefix /identity). They are used by the dashboard, are authenticated by a signed-in session cookie and not by secret API keys, so they will not appear in the key-based OpenAPI file. Source: docs/work/WP-32.md; a test checks the routes against the source.

Conventions#

Roles#

owner, admin, editor, viewer. Admins grant and manage only editors and viewers. Only an Owner grants owner or admin, or touches an Owner. Nobody changes their own role. The last Owner can be neither demoted nor removed.

Invitations#

RouteWhoRequestSuccess
POST /identity/invitationsAdmin or Owner{ "email", "role" }201 { id, email, role, expiresAt }. The mail goes out separately; the token is never in the response. Re-inviting an address replaces its pending invitation
GET /identity/invitationsAdmin or Ownernone200 list of pending invitations (no tokens)
DELETE /identity/invitations/{id}Admin or Ownernone204; 404 if unknown, used or another tenant's
POST /identity/invitations/acceptany signed-in user{ "token" }204. The same 400 text is returned for an unknown, used, expired or wrong-address token. After 5 failures in 15 minutes: 429

Members#

RouteRequestSuccess
GET /identity/membersnone200 list: userId, displayName, email, role, joinedAt, status (active or disabled), twoFactor, lastSignInAt, you
PATCH /identity/members/{userId}{ "role" }200 { userId, role }; takes effect on the person's next request
DELETE /identity/members/{userId}none204; their sessions in this team end at once

Failures use 400, 401, 403, 404 and 409 (last Owner). Role changes, removals and invitations are written to the audit log without e-mail addresses.