Skip to content

HTTP API

Generated from the route registrations in server/internal/syncapi/ and server/internal/web/. Do not edit.

The server has two kinds of routes. The sync API under /api/v1/ is for devices and scoped keys. It uses a bearer token, no cookies and no CSRF token. The web app routes are for the browser. They use the session cookie.

The authentication column shows what a route needs:

  • None: no login. A few of these check a one-time token or a code in the request.
  • Bearer token: a device token or a scoped key in the Authorization header.
  • Bearer token, admin access: the same, and the session or key has admin access.
  • Session: the session cookie of a logged-in user.
  • Session, unlocked E2E tab: the session cookie, and the browser tab has unlocked its end-to-end keys.

Sync API

These routes are under /api/v1/.

/api/v1/account

MethodPathAuthenticationPurpose
GET/api/v1/account/keysBearer tokenGets the encrypted user keys and the key derivation parameters of the caller.
GET/api/v1/account/rotationBearer tokenGets the plan to rotate the user keys.
POST/api/v1/account/rotationBearer tokenApplies a rotation of the user keys.

/api/v1/admin

MethodPathAuthenticationPurpose
GET/api/v1/admin/invitationsBearer token, admin accessLists the open invitations. Needs admin access.
POST/api/v1/admin/invitationsBearer token, admin accessMakes an invitation and returns its link once. Needs admin access.
DELETE/api/v1/admin/invitations/{id}Bearer token, admin accessRevokes an open invitation. Needs admin access.
GET/api/v1/admin/registrationBearer token, admin accessGets who can register: closed, invite or open. Needs admin access.
PUT/api/v1/admin/registrationBearer token, admin accessSets who can register. Needs admin access.
GET/api/v1/admin/usersBearer token, admin accessLists the users of the server. Needs admin access.
POST/api/v1/admin/users/{id}/cancel-deleteBearer token, admin accessCancels a deletion that is in its grace period. Needs admin access.
POST/api/v1/admin/users/{id}/deleteBearer token, admin accessStarts the deletion of a user. The data stays until a grace period ends. Needs admin access.
POST/api/v1/admin/users/{id}/disableBearer token, admin accessDisables a user and revokes the sessions, devices and keys of the user. Needs admin access.
POST/api/v1/admin/users/{id}/enableBearer token, admin accessEnables a disabled user. Needs admin access.
POST/api/v1/admin/users/{id}/roleBearer token, admin accessSets the role of a user. Needs admin access.

/api/v1/approvals

MethodPathAuthenticationPurpose
GET/api/v1/approvals/pendingBearer tokenLists the per-use approvals that wait for a decision.
POST/api/v1/approvals/{id}/decisionBearer tokenApproves or denies a per-use approval.

/api/v1/auth

MethodPathAuthenticationPurpose
POST/api/v1/auth/deviceNoneStarts a device-code login. Returns a device code, a user code and the address to approve in the browser.
POST/api/v1/auth/refreshNoneTrades a refresh token for a new access token and a new refresh token.
POST/api/v1/auth/tokenNonePolls a device-code login or trades a code for tokens. Answers authorization_pending until the user approves.

/api/v1/contacts

MethodPathAuthenticationPurpose
GET/api/v1/contactsBearer tokenLists the contacts of the caller (users with a pinned key).
PUT/api/v1/contacts/{user}Bearer tokenPins the key of a contact.

/api/v1/devices

MethodPathAuthenticationPurpose
POST/api/v1/devices/loginNoneLogs in with the auth key and makes a device. Returns a bearer token once.
DELETE/api/v1/devices/selfBearer tokenRevokes the device of the calling token (logout).

/api/v1/events

MethodPathAuthenticationPurpose
GET/api/v1/eventsBearer tokenServer-sent events for devices. Tells a device that a space changed. It never sends data.

/api/v1/grants

MethodPathAuthenticationPurpose
GET/api/v1/grantsBearer tokenLists the grant rows of the calling session or key.

/api/v1/keys

MethodPathAuthenticationPurpose
GET/api/v1/keysBearer token, admin accessLists scoped keys. Needs admin access.
POST/api/v1/keysBearer token, admin accessMakes a scoped key. The body has the record that the client made and signed. Needs admin access.
GET/api/v1/keys/selfBearer tokenGets the record of the scoped key of the calling token.
DELETE/api/v1/keys/{id}Bearer token, admin accessRevokes a scoped key. The body may have a signed revocation record. Needs admin access.
POST/api/v1/keys/{id}/revocationBearer token, admin accessStores the signed revocation record of a key that is already revoked. Needs admin access.

/api/v1/pair

MethodPathAuthenticationPurpose
POST/api/v1/pairSessionMakes a pairing offer for the QR code of the web app. Uses the web session.
POST/api/v1/pair/statusSessionTells if a pairing offer has been used. Uses the web session.

/api/v1/peers

MethodPathAuthenticationPurpose
GET/api/v1/peersBearer tokenLists the other devices of the user for peer sync, with their public keys and endpoints.
PUT/api/v1/peers/selfBearer tokenPublishes the peer key and the endpoints of this device.
POST/api/v1/peers/{id}/punchBearer tokenAsks the server to tell two devices to open a direct connection at the same time.

/api/v1/prelogin

MethodPathAuthenticationPurpose
POST/api/v1/preloginNoneGets the key derivation parameters of a user, so the client can derive its keys before it logs in.

/api/v1/sessions

MethodPathAuthenticationPurpose
GET/api/v1/sessionsBearer token, admin accessLists the device-code sessions. Needs admin access.
DELETE/api/v1/sessions/{id}Bearer token, admin accessEnds a device-code session. Needs admin access.

/api/v1/spaces

MethodPathAuthenticationPurpose
GET/api/v1/spacesBearer tokenLists the spaces and memberships of the caller.
POST/api/v1/spacesBearer tokenMakes a shared space. The body is the signed first entry of the membership log.
GET/api/v1/spaces/{id}/certsBearer tokenGets the certs of scoped keys and their revocation records, to check the signers of ops.
GET/api/v1/spaces/{id}/checkpointsBearer tokenReads the signed checkpoints of the end-to-end roots that the caller can see.
POST/api/v1/spaces/{id}/checkpointsBearer tokenStores a signed checkpoint of an end-to-end root.
GET/api/v1/spaces/{id}/folder-keysBearer tokenGets the folder keys that are sealed to the caller.
POST/api/v1/spaces/{id}/folder-keysBearer tokenStores folder keys that are sealed to the members of a shared space.
POST/api/v1/spaces/{id}/haveBearer tokenTells which of a list of op IDs the server has. Peer sync uses it.
GET/api/v1/spaces/{id}/items/{item}/fieldsBearer tokenLists the fields of a server-readable item, with no values.
GET/api/v1/spaces/{id}/logBearer tokenReads the signed membership log of a shared space.
POST/api/v1/spaces/{id}/logBearer tokenAdds one signed entry to the membership log of a shared space.
GET/api/v1/spaces/{id}/opsBearer tokenReads ops of a space after a cursor.
POST/api/v1/spaces/{id}/purgeBearer tokenPurges an entity for good, with a signed purge record for an end-to-end entity.
GET/api/v1/spaces/{id}/purgesBearer tokenReads the purge records of a space after a cursor.
POST/api/v1/spaces/{id}/pushBearer tokenPushes groups of ops. Each group succeeds or fails as one unit.
POST/api/v1/spaces/{id}/readsBearer tokenReads secret values of server-readable items for a scoped key or a session. Starts an approval if the item needs one.
GET/api/v1/spaces/{id}/rekeyBearer tokenGets the data that an admin needs to rekey a shared space.

/api/v1/teams

MethodPathAuthenticationPurpose
GET/api/v1/teamsBearer tokenLists the teams of the caller.
POST/api/v1/teamsBearer tokenMakes a team. The body is the signed first entry of the team log.
GET/api/v1/teams/{id}/keysBearer tokenGets the team keys that are sealed to the caller.
GET/api/v1/teams/{id}/logBearer tokenReads the signed log of a team.
POST/api/v1/teams/{id}/logBearer tokenAdds one signed entry to the log of a team.

/api/v1/users

MethodPathAuthenticationPurpose
GET/api/v1/users/lookupBearer tokenFinds a user by name and gets the public keys. Used to add a member to a shared space.

Web app routes

The browser uses these routes. Pages return HTML. Routes under /api/ return JSON.

(root)

MethodPathAuthenticationPurpose
GET/{$}SessionThe vault: the main page of the web app.

/api/devices

MethodPathAuthenticationPurpose
GET/api/devicesSessionGives the names of the devices of the user by device ID.

/api/e2e

MethodPathAuthenticationPurpose
GET/api/e2e/certsSessionGets the certs of scoped keys and their revocation records.
POST/api/e2e/checkpointsSession, unlocked E2E tabStores a signed checkpoint.
GET/api/e2e/contactsSession, unlocked E2E tabLists the contacts of the user.
PUT/api/e2e/contacts/{user}Session, unlocked E2E tabPins the key of a contact.
POST/api/e2e/foldersSession, unlocked E2E tabMakes an end-to-end root with its signed bundle.
POST/api/e2e/moveSession, unlocked E2E tabMoves an entity into or out of an end-to-end scope.
POST/api/e2e/opsSession, unlocked E2E tabAppends signed ops to an end-to-end scope.
POST/api/e2e/orphans/{rootID}/purgeSession, unlocked E2E tabPurges an end-to-end root that no member can open any more.
POST/api/e2e/purgeSession, unlocked E2E tabPurges an entity in an end-to-end scope with a signed purge record.
GET/api/e2e/rotationSession, unlocked E2E tabGets the plan to rotate the user keys.
POST/api/e2e/rotationSession, unlocked E2E tabApplies a rotation of the user keys.
GET/api/e2e/scopesSession, unlocked E2E tabLists the end-to-end roots of the user.
GET/api/e2e/scopes/{rootID}Session, unlocked E2E tabGets the ops and the folder key of one end-to-end root.
GET/api/e2e/spacesSession, unlocked E2E tabLists the shared spaces of the user for the sidebar.
POST/api/e2e/spacesSession, unlocked E2E tabMakes a shared space from the browser.
POST/api/e2e/spaces/{id}/folder-keysSession, unlocked E2E tabStores folder keys sealed to the members of a shared space.
GET/api/e2e/spaces/{id}/logSession, unlocked E2E tabReads the membership log of a shared space.
POST/api/e2e/spaces/{id}/logSession, unlocked E2E tabAdds one signed entry to the membership log.
GET/api/e2e/spaces/{id}/rekeySession, unlocked E2E tabGets the data to rekey a shared space.
DELETE/api/e2e/tab-keySessionDeletes the wrapped key of the tab. This locks the tab.
GET/api/e2e/tab-keySessionGets the wrapped key of an unlocked browser tab.
POST/api/e2e/tab-keySessionStores the wrapped key of an unlocked browser tab.
POST/api/e2e/tab-key/touchSessionMarks the tab key as used, so the idle timer restarts.
GET/api/e2e/teamsSession, unlocked E2E tabLists the teams of the user.
POST/api/e2e/teamsSession, unlocked E2E tabMakes a team.
GET/api/e2e/teams/{id}/keysSession, unlocked E2E tabGets the team keys that are sealed to the user.
GET/api/e2e/teams/{id}/logSession, unlocked E2E tabReads the log of a team.
POST/api/e2e/teams/{id}/logSession, unlocked E2E tabAdds one signed entry to the log of a team.
GET/api/e2e/unlockSession, unlocked E2E tabGets the data that the browser needs to unlock the end-to-end keys.
GET/api/e2e/users/lookupSession, unlocked E2E tabFinds a user by name to add as a member.

/api/import

MethodPathAuthenticationPurpose
POST/api/import/plainSessionImports items into a plain folder.

/api/login

MethodPathAuthenticationPurpose
POST/api/loginNoneLogs in to the web app and starts a session.

/api/prelogin

MethodPathAuthenticationPurpose
POST/api/preloginNoneGets the key derivation parameters of a user for the web login.

/api/recover

MethodPathAuthenticationPurpose
POST/api/recover/finishNoneFinishes a recovery and sets a new master password.
POST/api/recover/idNoneLooks up the account for a recovery by the recovery code.
POST/api/recover/startNoneStarts a recovery with the recovery code.

/api/recovery-kit

MethodPathAuthenticationPurpose
POST/api/recovery-kitSessionStores the sealed recovery kit of the user.

/api/register

MethodPathAuthenticationPurpose
POST/api/registerNoneMakes an account. Works for the first user, with an invitation, or when registration is open.

/api/reset

MethodPathAuthenticationPurpose
POST/api/reset/checkNoneChecks the one-time link of an operator password reset.
POST/api/reset/finishNoneFinishes an operator password reset: sets a new master password and makes new user keys.

/api/totp

MethodPathAuthenticationPurpose
POST/api/totp/confirmSessionTurns TOTP on after the user enters a valid code.
POST/api/totp/disableSessionTurns TOTP off after the user enters a valid code.
POST/api/totp/startSessionStarts the set-up of TOTP and returns the secret.

/app

MethodPathAuthenticationPurpose
GET/appNoneThe page with the steps to install the app and open it with this server.

/approvals

MethodPathAuthenticationPurpose
GET/approvals/pendingSessionThe dialog of the oldest pending per-use approval. Returns 204 if there is none.
POST/approvals/{id}/approveSessionApproves a per-use approval. For an end-to-end item, the body has the sealed just-in-time grants.
POST/approvals/{id}/denySessionDenies a per-use approval.

/approve

MethodPathAuthenticationPurpose
GET/approveNoneThe page to approve a device-code login. Shows the code and the access that the device asks for.
POST/approveNoneRecords the decision about a device-code login.

/events

MethodPathAuthenticationPurpose
GET/eventsSessionServer-sent events for the web app. Tells the page that a space changed.

/login

MethodPathAuthenticationPurpose
GET/loginNoneThe login page.

/logout

MethodPathAuthenticationPurpose
POST/logoutNoneEnds the web session.

/pair

MethodPathAuthenticationPurpose
GET/pairNoneThe page that hands a pairing offer to the app.

/recover

MethodPathAuthenticationPurpose
GET/recoverNoneThe page to recover an account with the recovery code.

/register

MethodPathAuthenticationPurpose
GET/registerNoneThe page to make an account.

/reset

MethodPathAuthenticationPurpose
GET/resetNoneThe page for the one-time link of an operator password reset.

/settings

MethodPathAuthenticationPurpose
GET/settings/appearanceSessionThe appearance settings.
GET/settings/auditSessionThe audit log of the user.
GET/settings/devicesSessionLists the devices and sessions of the user.
POST/settings/devices/removeSessionRemoves one device or one other session.
GET/settings/importSessionThe page to import a file from another password manager.
GET/settings/keysSessionLists the scoped keys and has the form to make one.
POST/settings/keysSessionStores a scoped key that the page made.
POST/settings/keys/revocationSessionStores the signed revocation record of a key.
POST/settings/keys/revokeSessionRevokes a scoped key.
GET/settings/organisationSessionThe organisation settings: users, invitations and registration. Needs admin access.
POST/settings/organisation/inviteSessionMakes an invitation. The answer shows the link and a QR code once.
POST/settings/organisation/invite/revokeSessionRevokes an invitation.
POST/settings/organisation/registrationSessionSets who can register.
POST/settings/organisation/users/{action}SessionRuns a user action of the organisation page, such as disable or enable.
GET/settings/securitySessionThe security settings: password, TOTP, recovery kit.

/static

MethodPathAuthenticationPurpose
GET/static/NoneStatic files of the web app (scripts, styles, fonts, images).

/theme

MethodPathAuthenticationPurpose
POST/themeNoneStores the theme choice.

/vault

MethodPathAuthenticationPurpose
GET/vault/e2e/purgeSessionThe dialog to purge an item or folder in an end-to-end folder.
GET/vault/emptySessionThe empty state of the vault page.
POST/vault/entities/{id}/deleteSessionMoves an item or folder to the trash.
GET/vault/entities/{id}/purgeSessionThe confirm dialog to purge an entity for good.
POST/vault/entities/{id}/purgeSessionPurges an entity for good.
POST/vault/entities/{id}/restoreSessionRestores an item or folder from the trash.
GET/vault/field-rowSessionA new field row for the item form.
POST/vault/foldersSessionMakes a plain folder.
GET/vault/folders/newSessionThe dialog for a new folder, with the choice of the type.
POST/vault/folders/{id}/moveSessionMoves a folder.
POST/vault/folders/{id}/renameSessionRenames a folder.
GET/vault/generateSessionGenerates a password.
POST/vault/itemsSessionMakes an item.
GET/vault/items/{id}SessionThe detail of an item. Secrets stay hidden.
POST/vault/items/{id}SessionSaves the changes of an item.
POST/vault/items/{id}/conflicts/{fid}/dismissSessionHides the note about a field that changed on two devices.
GET/vault/items/{id}/editSessionThe edit form of an item.
POST/vault/items/{id}/fields/{fid}/restoreSessionRestores an older value of a field.
GET/vault/items/{id}/fields/{fid}/totpSessionThe current TOTP code of a field.
GET/vault/items/{id}/fields/{fid}/valueSessionOne field value as plain text, for reveal and copy.
GET/vault/items/{id}/historySessionThe history of an item.
GET/vault/items/{id}/moveSessionThe dialog to move an item.
POST/vault/items/{id}/moveSessionMoves an item between plain folders.
GET/vault/items/{id}/plainSessionThe plain item as JSON, so the browser can encrypt it for an end-to-end folder.
GET/vault/newSessionThe form for a new item.
GET/vault/searchSessionSearches the items by name, user name and URL.