Skip to main content

Documentation 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.

Project membership in PrintHeritage is entirely invitation-based. A user with project access can invite any registered user by email, assigning them one of the four platform roles. The invited user receives a pending ProjectPermission record that appears in their invitations list; they can then accept or reject it. A separate endpoint lets clients silently mark an invitation notification as read without changing its acceptance status. All endpoints require a valid Bearer token.

POST /projects//invite

Sends a project invitation to an existing platform user identified by their email address. A new ProjectPermission record is created with status = PENDING and invited_by set to the currently authenticated user’s ID.

Path parameters

project_id
string (UUID)
required
UUID of the project to which the user is being invited.

Query parameters

user_email
string
required
Email address of the registered user to invite.
access_level
string (GlobalRole enum)
required
Role to assign to the invited user within the project. Must be one of:
ValueDescription
SUPER_ADMINFull platform-wide administrative access.
GENERAL_ADMINAdministrative access across all projects.
PROJECT_ADMINAdministrative access scoped to this project, including the ability to delete datasets.
VISUALIZERRead-only access to project data and dashboards.

Response

ok
boolean
true when the invitation was created successfully.

Example

curl -X POST "https://api.printheritage.io/projects/2b9e1f4a-3c5d-4e8f-a012-bc9d1234ef56/invite?user_email=ana.ferreira%40example.com&access_level=PROJECT_ADMIN" \
  -H "Authorization: Bearer <token>"
{
  "ok": true
}
A side-effect audit log entry with action PROJECT_MEMBER_INVITE is written on success, recording the acting user and the invited user’s ID as the target.

GET /invitations

Returns all pending invitations addressed to the currently authenticated user — that is, every ProjectPermission record belonging to this user where status = PENDING.

Response

Returns a JSON array of ProjectPermissionResponse objects.
id
string (UUID)
Unique identifier of the ProjectPermission record. Use this ID with the accept, reject, and read endpoints below.
user_id
string (UUID)
UUID of the invited user (always the currently authenticated user).
project_id
string (UUID)
UUID of the project the invitation relates to.
access_level
string (GlobalRole)
The role that will be granted on acceptance: SUPER_ADMIN, GENERAL_ADMIN, PROJECT_ADMIN, or VISUALIZER.
status
string (PermissionStatus)
Current status of the invitation. For this endpoint the value is always PENDING.
is_read
boolean
true if the user has already viewed this notification (see POST /invitations/{id}/read).
is_favorite
boolean
Whether the user has marked the associated project as a favourite.
project_name
string
Human-readable name of the project, resolved at query time from the related Project record.
inviter_email
string
Email address of the user who sent the invitation, resolved from the invited_by relationship. Falls back to "Sist" if the inviting user record no longer exists.

Example

curl "https://api.printheritage.io/invitations" \
  -H "Authorization: Bearer <token>"
[
  {
    "id": "d4e5f678-9abc-4def-b012-c3d4e5f67890",
    "user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "project_id": "2b9e1f4a-3c5d-4e8f-a012-bc9d1234ef56",
    "access_level": "PROJECT_ADMIN",
    "status": "PENDING",
    "is_read": false,
    "is_favorite": false,
    "project_name": "Torre do Relógio — Monitorização 2024",
    "inviter_email": "joao.monteiro@printheritage.io"
  }
]

POST /invitations//accept

Accepts a pending invitation by setting its status to ACCEPTED. The authenticated user must be the invitee — the endpoint filters by both the permission ID and the current user’s ID.

Path parameters

id
string (UUID)
required
UUID of the ProjectPermission record to accept, as returned by GET /invitations.

Response

ok
boolean
true when the invitation was found and accepted. Also returns true (silently) if no matching record was found, making the call idempotent.

Example

curl -X POST "https://api.printheritage.io/invitations/d4e5f678-9abc-4def-b012-c3d4e5f67890/accept" \
  -H "Authorization: Bearer <token>"
{
  "ok": true
}
On success, an audit log entry with action INVITE_ACCEPT is written, recording the accepting user and the associated project ID as the target.

POST /invitations//reject

Rejects a pending invitation by setting its status to REJECTED. As with the accept endpoint, the record must belong to the currently authenticated user.

Path parameters

id
string (UUID)
required
UUID of the ProjectPermission record to reject, as returned by GET /invitations.

Response

ok
boolean
true when the invitation was found and rejected. Also returns true silently if no matching record was found.

Example

curl -X POST "https://api.printheritage.io/invitations/d4e5f678-9abc-4def-b012-c3d4e5f67890/reject" \
  -H "Authorization: Bearer <token>"
{
  "ok": true
}
On success, an audit log entry with action INVITE_REJECT is written, recording the rejecting user and the associated project ID as the target.

POST /invitations//read

Marks an invitation notification as read by setting is_read to true on the ProjectPermission record. This endpoint does not change the acceptance status — it exists solely to allow the UI to track which notifications have been seen.

Path parameters

id
string (UUID)
required
UUID of the ProjectPermission record to mark as read, as returned by GET /invitations.

Response

ok
boolean
true when the record was found and updated. Also returns true silently if no matching record was found, making the call safe to call multiple times.

Example

curl -X POST "https://api.printheritage.io/invitations/d4e5f678-9abc-4def-b012-c3d4e5f67890/read" \
  -H "Authorization: Bearer <token>"
{
  "ok": true
}
This endpoint does not write an audit log entry. It is a lightweight notification-housekeeping call with no security implications.

Build docs developers (and LLMs) love