Skip to main content
These endpoints power the Grantiva dashboard. They use cookie-based sessions — the browser sends credentials with credentials: 'include' and Vapor manages the session cookie. They are documented here for completeness; server integrations should use API keys instead.

The auth response object

Login, me, verify-email, switch-org, and clear-org all return the same shape:
organization and entitlements are null when the user has no organization context. Null values inside limits mean unlimited.

Log in

Rate limited per IP. Creates a session cookie on success. Request body
Response200 OK — the auth response object. Errors

Log out

Destroys the session. Response204 No Content.

Current user

With a session cookie, returns the auth response object. Without a session, falls back to Bearer authentication for CLI/API keys (aat_, grantiva_, or gpat_ prefixed) and returns a minimal identity instead:
401 if neither a session nor a valid key is presented.

Forgot password

Rate limited per IP, and capped at 3 active reset tokens per account. Always returns the same message regardless of whether the email exists (no account enumeration). The reset link is valid for 1 hour. Request body
Response

Reset password

Consumes a reset token from the email link. On success, all other outstanding reset tokens and all existing sessions for the user are invalidated. Request body
Response
Errors

Change email

Session required. Sends a confirmation link to the new address; the current email stays active until confirmed. Token valid for 1 hour; max 3 pending requests. Request body
Response
Errors

Confirm email change

Public (token-based, no session required). Request body
Response
400 for an invalid/expired token, 409 if the address was taken in the meantime.

Verify email

Public. Exchanges an email-verification token for an active account and a session, then returns the auth response object so the dashboard can log the user straight in. Errors

Accept a team invite

Session required. The authenticated user’s email must match the invite’s email. Idempotent — accepting an invite for an org you already belong to succeeds without duplicating membership. Request body
Response
Errors

List organizations

Session required. Returns the organizations the user belongs to (super admins see all orgs). isActive marks the org currently selected in the session. Response

Switch organization

Session required. Sets the active org for the session. Non-super-admins must be a member of the target org (403 otherwise); 404 if the slug doesn’t exist. Request body
Response — the auth response object for the newly active org.

Clear organization

Session required. Clears the active org from the session (used by super admins for the “All Organizations” view). Returns the auth response object with organization and entitlements set to null.

See also

  • CLI Sessions — device-code auth for the Grantiva CLI
  • API Keys — server-to-server authentication