Skip to main content

Login

Exchange email and password for a JWT access token and a refresh token.
Request body
string
required
The user’s email address.
string
required
The user’s password.
Example
Response 200 OK
string
JWT access token. Valid for 900 seconds (15 minutes).
string
Opaque token used to obtain a new access token without re-entering credentials.
string
Always "Bearer".
integer
Access token lifetime in seconds (900).
boolean
Present and true when the account is awaiting admin approval (open-signup flow only).

Using the token

Pass the access token in the Authorization header on every subsequent request:

Refreshing the token

When the access token expires, use the refresh token to get a new pair without re-entering credentials.
string
required
The refresh token received at login.
The response is the same shape as /auth/login. The old refresh token is invalidated immediately.

Logout

Invalidate a refresh token server-side.
string
required
The refresh token to revoke.
Returns 204 No Content on success.

Service account tokens

Service accounts are used for programmatic or AI staff access. Their tokens are prefixed with sa_ and are not JWTs — they authenticate via the same Authorization: Bearer header. A service account token is returned once when the service account is created and is not recoverable afterward. See Service Accounts for creation details. Use a service account token exactly like a user JWT:
Service account tokens do not expire unless explicitly revoked. Store them securely.

Common errors