The authentication endpoints handle all identity operations in PrintHeritage. JWT tokens are issued on login using the HS256 algorithm and expire after 60 minutes. Every request that modifies credentials or creates an account is recorded to the audit log. Pass the token returned byDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/joaomonteir0/printheritage/llms.txt
Use this file to discover all available pages before exploring further.
/login in the Authorization: Bearer <token> header for every protected endpoint.
POST /login
Authenticates a user with their email and password and returns a short-lived JWT access token. The request body must be encoded asapplication/x-www-form-urlencoded — this matches the OAuth2 Password Flow used throughout the platform. A successful login appends a USER_LOGIN entry to the audit log.
The
username field must contain the user’s email address, not a display name. The OAuth2 spec names this field username, but PrintHeritage treats it as the account email.Content-Type: application/x-www-form-urlencoded
The account email address used as the login identifier.
The account password in plain text. Verified against the stored bcrypt hash server-side.
Signed HS256 JWT. Include this value in the
Authorization header as Bearer <access_token> for all protected requests.Always
"bearer".| Status | Meaning |
|---|---|
401 Unauthorized | Email not found or password does not match. |
POST /register
Creates a new user account. The request body is JSON. If the email address is already associated with an existing account the request is rejected with HTTP 400. On success, aUSER_CREATED entry is written to the audit log including the new account’s email.
Request
Content-Type: application/json
A valid email address that must be unique across all platform accounts.
Plain-text password. Minimum recommended length is 8 characters; bcrypt is applied server-side.
Platform-wide role assigned to the user. Must be one of
SUPER_ADMIN, GENERAL_ADMIN, PROJECT_ADMIN, or VISUALIZER.Optional display name shown across the platform UI.
Optional ISO 8601 datetime string, e.g.
"1990-06-15T00:00:00".Optional URL pointing to the user’s profile picture.
Controls profile visibility to other users. Defaults to
true.UserResponse
Unique identifier of the newly created user.
Registered email address.
The platform-wide role assigned to the account.
Display name, or
null if not provided.ISO 8601 datetime, or
null if not provided.Profile picture URL, or
null if not provided.Indicates whether the profile is publicly visible.
| Status | Detail | Meaning |
|---|---|---|
400 Bad Request | "Existe" | An account with this email already exists. |
GET /me
Returns the profile of the currently authenticated user. The identity is resolved from the JWT token supplied in theAuthorization header — no request body or query parameters are required.
Authentication: Bearer token required.
Response — 200 OK — UserResponse
Unique identifier of the authenticated user.
Email address of the authenticated user.
Platform-wide role:
SUPER_ADMIN, GENERAL_ADMIN, PROJECT_ADMIN, or VISUALIZER.Display name, or
null if not set.ISO 8601 datetime, or
null if not set.Profile picture URL, or
null if not set.Whether the profile is publicly visible.
| Status | Meaning |
|---|---|
401 Unauthorized | Token is missing, expired, or invalid. |
POST /change-password
Updates the password of the currently authenticated user. The endpoint verifies the suppliedcurrent_password against the stored bcrypt hash before applying the change. On success, a PASSWORD_CHANGE entry is written to the audit log.
Authentication: Bearer token required.
Content-Type: application/json
The user’s existing password. Must match the stored bcrypt hash or the request is rejected.
The replacement password in plain text. Hashed with bcrypt before being stored.
Always
true when the password was changed successfully.| Status | Meaning |
|---|---|
400 Bad Request | current_password does not match the stored hash. |
401 Unauthorized | Token is missing, expired, or invalid. |