Skip to content

API Reference ​

REST under /api, JSON in and out, with the types of crates/core/hc-contract (the API contract). Routes are assembled in crates/server/hc-server/src/lib.rs (router); each app's handlers live in its crate (crates/server/hc-platform, crates/app-*).

Authentication. Everything under /api except /api/health, /api/about, /api/apps and /api/auth/* requires a valid session cookie. /api/admin/* additionally requires users.is_admin (requireAdmin). Two trees do not use sessions: /dav authenticates with HTTP Basic and an app password, and /mcp with the same app password as a bearer token. A third, /feed, uses no credential at all beyond the unguessable token in its own URL, and so does /api/public/polls, where people without an account answer scheduling polls.

Scoping. Every handler scopes its queries by the authenticated users.id. There is no cross-user read path except the explicit sharing endpoints.

Errors. Unhandled failures return 500 {"error":"Internal server error"}; oversized bodies return 413. Validation failures return 400 with the zod issue.


Public ​

MethodPathNotes
GET/api/health{"status":"ok"}. No auth.
GET/api/about{"sourceUrl":"…","platformApi":5,"calendarApi":2,"tasksApi":1,"filesApi":2,"serverVersion":"4.0.6","desktop":{"minVersion":"4.0.0","latestVersion":"4.0.6"}}: where this instance's source is (SOURCE_URL, else upstream), each API's version, which clients check, the server's release, and the HyperCloud Desktop releases it works with (#840) (see The API contract). No auth.
GET/api/apps{"apps":["calendar","tasks",…]}: the apps this instance runs for someone, switched on and supported by the host, in a fixed order. The same list as apps in /api/auth/config. No auth. A signed-in client asks /api/capabilities.
GET/healthzok, or 503 when the database does not answer. No auth.
GET/metricsPrometheus text format. 404 unless METRICS_TOKEN is set, then 401 without Authorization: Bearer <token>. See Monitoring.
GET/.well-known/assetlinks.jsonAndroid App Links: lets HyperCloud Finance open /finance/{token} links. 404 unless ANDROID_CERT_SHA256 is set. No auth.
GET/api/auth/configWhat sign-in methods this instance offers (signIn: password, passkey, device), whether registration is open, apps: the apps this instance runs (switched on, and supported by the host), and pollsAvailable: whether this instance can hand out poll links.
GET/api/public/polls/*A scheduling poll as visitors reach it. See Scheduling polls.
GET/api/public/availability/:tokenAn availability link's busy time. See Availability links.
GET/freebusy/:token.icsThe same as an iCalendar VFREEBUSY.
GET/feed/:token.icsA published calendar as iCalendar. No auth: the token is the credential. ETag/If-None-Match supported; 60 requests/min per IP. Every failure (unknown, revoked, rotated, since-encrypted, deleted) is an identical 404.

Authentication: /api/auth ​

MethodPathNotes
POST/api/auth/registerOpen self-registration (unless the admin disabled it). The first account registered becomes the admin. Rate limited: 5/min per IP.
POST/api/auth/loginUsername + password. If TOTP is enabled, returns a pending-login handle instead of a session. Rate limited: 10/min per IP.
POST/api/auth/login/totpSecond step: pending-login handle + TOTP code or recovery code. Rate limited: 10/min per IP.
POST/api/auth/logoutClears the session and the cookie.
POST/api/auth/passkey/login/optionsWebAuthn assertion options.
POST/api/auth/passkey/login/verifyVerify the assertion, mint a session.
GET/api/auth/oidc/:id/startRedirect to an identity provider. ?returnTo= a path on this server to come back to.
GET/api/auth/oidc/callbackThe provider's redirect back: signs in and redirects to returnTo, adding signin=totp when the code is due or oidc_error= on a refusal.

With password sign-in off (see below), login, register (but for the first account) and /api/device-auth/password answer 403.

Account: /api/me ​

MethodPathNotes
GET/api/meThe current Identity: includes isAdmin.
GET/api/capabilitiesWhat this account can use: apps, each with its version, its API's version (api, or null), its slots (launchers nav, settings sections, admin pages, each { id, label }) and extensionPoints; features (mcp, extApi, availabilityLinks, accountsApart); and platformApi. An app offered to groups the account is not in, or one that needs an app it lacks, is not listed.
PATCH/api/meUpdate display name, email, password, discovery visibility. Rate limited: 10/min.
DELETE/api/meDelete the account and everything it owns, including its daily backup files. Body { currentPassword }; 403 when wrong. Rate limited: 10/min.
GET PATCH/api/me/settingsNotification toggle, default reminders, all-day reminder time, custom theme, event templates (a PATCH replaces the whole list; at most 50), and preferences, the app's synced preferences (an object the server stores as given, up to 8 KB; a PATCH replaces it).
POST/api/me/avatarUpload an avatar, saved as avatar.<ext> in the caller's upload folder in Files (#327); users keeps the node's id.
PUT/api/me/avatar/file{ "nodeId" }: an image already in the caller's Files (PNG, JPEG or WebP, at most 5 MB) becomes the avatar.
DELETE/api/me/avatarRemove it. The file stays in Files.
GET/api/avatars/:userIdServe another user's avatar (for shared-calendar UI).

Passkeys: /api/me/passkeys ​

MethodPath
GET/api/me/passkeys
POST/api/me/passkeys/register/options
POST/api/me/passkeys/register/verify
DELETE/api/me/passkeys/:id

Identity providers, /api/me/oidc ​

MethodPathNotes
GET/api/me/oidcThe enabled providers, each with linked, the provider's email and linkedAt.
POST/api/me/oidc/:id/link{ returnTo } → { url }: the provider's address to connect this account through.
DELETE/api/me/oidc/:idDisconnect. 409 when passwords are off and it is the account's last way in.

The admin's: GET and PATCH /api/admin/oidc (passwordSignIn, the redirectUri to register, the providers), POST /api/admin/oidc/providers and PATCH/DELETE /api/admin/oidc/providers/:id. Saving a provider reads its discovery document; the client secret is never returned (hasClientSecret).

TOTP: /api/me/totp ​

MethodPathNotes
GET/api/me/totpEnrollment state.
POST/api/me/totp/setupGenerate a secret + provisioning URI.
POST/api/me/totp/enableConfirm with a code; returns recovery codes once.
POST/api/me/totp/disable
POST/api/me/totp/recovery/regenerateInvalidates the previous set.

App passwords: /api/me/app-passwords ​

Revocable Basic-auth credentials for CalDAV clients (DAVx5 and friends).

MethodPathNotes
GET/api/me/app-passwordsMetadata only: the token is never returned again.
POST/api/me/app-passwordsReturns the plaintext token once.
DELETE/api/me/app-passwords/:id

Linked devices: /api/device-auth, /api/devices ​

A device links itself the way OAuth's device flow (RFC 8628) has it, then holds a credential that does nothing but mint one token per app on it. See the security model.

MethodPathNotes
POST/api/device-authNo auth. { name, kind } (android, desktop, other) → { deviceCode, userCode, verificationUrl, verificationUrlComplete, expiresIn, interval }. 10/min.
POST/api/device-auth/tokenNo auth. { deviceCode }, polled every interval seconds: 400 authorization_pending, 429 slow_down, 403 access_denied, 404 expired_token, or once { deviceId, username, credential }.
POST/api/device-auth/passwordNo auth. For a first-party app, in place of the two above: { username, password, deviceName, kind } → { deviceId, username, credential }, or { pending } when the account has TOTP. Limits, throttle and refusals as /api/auth/login; no session is made.
POST/api/device-auth/password/totpNo auth. { pending, code }, a TOTP code or a recovery code, within five minutes → { deviceId, username, credential }. The pending token is spent by the first code, right or wrong. Limits as /api/auth/login/totp.
POST/api/devices/me/tokensAuthorization: Bearer <credential>. { app } (calendar, contacts, files, sync) → { app, token }, replacing that app's previous token.
DELETE/api/devices/meAuthorization: Bearer <credential>. The device unlinks itself (signing out on it): its tokens stop working too.
GET/api/devicesThe caller's linked devices and the apps on each.
DELETE/api/devices/:idUnlink: the device's credential and every token it minted stop working.
GET/api/devices/requests/:codeA pending request, to show before approving. The code may be typed in any case, with or without the dash.
POST/api/devices/requests/:code/approveLink it to the caller's account. …/deny refuses it. 20/min.

A HyperCloud Desktop device is configured from the web: per device, a DesktopConfig (linked folders, sync settings, import defaults, notifications, autostart) and the DesktopState the daemon last reported.

MethodPathNotes
GET/api/devices/:id/configOne of the caller's devices: its DesktopConfig, the default (revision 0, nothing linked) before it was set. Another's device is a 404.
PUT/api/devices/:id/configThe whole DesktopConfig, with the revision it was read at → the stored one, at the next revision. 409 stale_revision with the current one as config when it changed meanwhile; 400 for a config that does not hold together.
POST/api/devices/:id/commandsOne of the caller's devices: { kind, untilMs? } (syncNow, pauseUntil with untilMs in the future, at most 253402300799999 (the end of the year 9999, which pauses until resumed), resume, signOut) appends a one-off command to its config → the config, at the next revision, which wakes the device's long poll. The last 20 commands of the last day are kept; config writes keep them as they are. The state lists each id in handledCommands once the device ran it.
GET/api/devices/:id/stateThe DesktopState the device last reported (reportedAt set by the server), null before its first report.
GET/api/devices/me/configAuthorization: Bearer <credential>. The device's own config. With ?since=<rev>, waits up to 30 s (&wait=<s> for less) for a newer one and answers 304 when none came.
PATCH/api/devices/me/configAuthorization: Bearer <credential>. A JSON merge patch on the config with the revision it was made on, for changes made on the machine. Same answers as the PUT.
PUT/api/devices/me/stateAuthorization: Bearer <credential>. The daemon's DesktopState → 204.

A config is checked before it is stored: absolute local folders, remote paths without . or .., unique pair ids and local folders, no linked folder inside another, an interval of 10 s to a day, and at most 64 KiB. The wait is woken in-process: with several server instances, a change made through another one is seen when the wait runs out. Unlinking the device deletes both.

The two device-auth routes of the flow, /api/devices/me/tokens and DELETE /api/devices/me take a request from any Origin: they use no session, and the browser extension calls them from its chrome-extension:// origin.

A token for calendar, contacts or files works on the whole API as Authorization: Bearer <token>, as a session would (administering only for an admin's account). A sync token, like an app password made by hand, works on /api/files and WebDAV only.

Sessions: /api/me/sessions ​

The browsers signed in to the account. Each is listed by a public id (not the cookie or its stored hash), its user agent, when it signed in and was last used (to within ten minutes), and whether it is the current one.

MethodPathNotes
GET/api/me/sessionsLive sessions, most recently used first.
DELETE/api/me/sessions/:idEnds that session. Ending the current one clears the cookie.
POST/api/me/sessions/revoke-othersEnds every session except the current one.

Push: /api/me/push ​

MethodPathNotes
GET/api/me/push/keyThe VAPID public key, or null if the server has no keys configured.
POST/api/me/push/subscribeRegister this device's endpoint.
POST/api/me/push/unsubscribe

End-to-end encryption: /api/me/encryption ​

MethodPathNotes
GET/api/me/encryptionThe wrapped-key bundle, verbatim.
PUT/api/me/encryptionStore a new bundle. The server never sees the data key. See Security Model.

Calendars: /api/calendars ​

MethodPathNotes
GET/api/calendarsOwned calendars plus ones shared with you.
POST/api/calendars
PATCH/api/calendars/:idName, color, description, timezone, default reminders, default event length (defaultDurationMin, 5 to 1440, null for the user's default), sort order, CalDAV exposure.
DELETE/api/calendars/:id
PATCH/api/calendars/:id/visibilityShow/hide: for a shared calendar this sets hidden_by_grantee, not the owner's flag.
GET/api/calendars/:id/conversionPreview converting a calendar to/from encrypted.
POST/api/calendars/:id/convertPerform the conversion.
GET/api/calendars/:id/shares
POST/api/calendars/:id/sharesGrant a role to another user.
DELETE/api/calendars/:id/shares/:granteeId
GET/api/calendars/:id/feedFeed status. Includes the URL whenever published: the token is stored in the clear so it can be re-copied.
POST/api/calendars/:id/feedPublish, or rotate an existing link (the old URL stops working immediately). 400 for an encrypted calendar; 501 where the host has no public origin.
DELETE/api/calendars/:id/feedUnpublish. Idempotent: 204 whenever you own the calendar.

Events: /api/events ​

Reading ​

MethodPathNotes
GET/api/eventsRange query (from/to). Recurring masters are expanded and overrides applied. This is the hot path the week view uses, and the one the service worker caches network-first.
GET/api/events/:id
GET/api/events/searchBacked by the event_search_tokens / override_search_tokens index tables. categories= keeps events with any of those tags. all=1 returns every match at once (up to 1000) instead of a page, for acting on a whole result set.
GET/api/events/trashSoft-deleted events (deleted_at set).
GET/api/events/invitationsEvents you've been invited to.
GET/api/events/streamServer-sent events: live updates for open clients.

Writing ​

MethodPathNotes
POST/api/events
PATCH/api/events/:idOptimistic concurrency via the row's version.
DELETE/api/events/:idSoft delete → trash.
POST/api/events/:id/restoreUndelete from trash.
POST/api/events/syncBatch of event changes: the offline queue's replay, and bulk actions from search. Each op is applied on its own and gets its own result; an error carries a code (read_only, calendar_read_only, forbidden, validation, not_recurring, duplicate_uid, encryption_mismatch, failed).

Recurrence ​

MethodPathNotes
POST/api/events/:id/overrideEdit or cancel a single occurrence.
POST/api/events/:id/split"This and all future": ends the master and starts a new series.

Sharing and attendees ​

MethodPath
GET POST/api/events/:id/shares
DELETE/api/events/:id/shares/:granteeId
GET POST/api/events/:id/attendees
DELETE/api/events/:id/attendees/:userId
POST/api/events/:id/rsvp

Attachments ​

MethodPathNotes
POST/api/events/:id/attachmentsMultipart. Enforces the admin-configured per-file limit under the global body cap.
GET/api/events/:id/attachments/:attIdServed with nosniff and a Content-Disposition.
DELETE/api/events/:id/attachments/:attId

An upload is saved as a file in the uploader's Files (#327), in the folder their attachmentFolderId preference names (/Attachments when unset, or when that folder is gone or in the Trash), and the event links to it as to a file linked from Files: source: "files". A second file of the same name is saved as name (2). The upload answers 409 with code: "encryptedCalendar" on an encrypted calendar, 409 with code: "filesUnavailable" where the caller has no Files, and 507 with code: "quotaExceeded" past their storage quota. The database keeps no bytes; only the phone's engine, which has no blob store, still keeps them in the row.

POST /api/events/:id/attachments/file with { "nodeId": "..." } links a file from the caller's Files instead of uploading it. It answers 409 on an encrypted calendar, or where Files is off. GET serves the file as it is now, while the linking user still has it. DELETE removes the link, never the file.

Tasks: /api/tasks ​

MethodPath
GET POST/api/tasks
PATCH DELETE/api/tasks/:id

Collaboration: /api ​

MethodPathNotes
GET/api/usersDirectory for invites. Users who set discovery_disabled are excluded.
GET/api/freebusyOpaque busy blocks for the given users and range: no titles, no details. Backs the "find a time" overlay.

Busy time is a user's events in calendars that count as busy (each calendar's countsAsBusy; when null, every calendar except subscriptions and generated ones: birthdays and Wellbeing's sleep calendar), plus invitations they accepted or tentatively accepted. Deactivated accounts are left out of the answer.

Availability rules: /api/me/availability ​

When the signed-in user can be booked, before busy time is subtracted: weekly hours in a zone, minimum notice, horizon and buffers. GET returns { rules, saved }; until rules are saved they are derived from the synced working-hours settings. PUT saves a full rule set, and DELETE returns to the derived ones.

URLs that show the owner's busy time, and nothing else, to anyone holding one. Needs the admin's availabilityLinksEnabled and a public origin.

MethodPathNotes
GET/The caller's links, each with url (the page) and icsUrl (VFREEBUSY).
POST/{ kind: "freebusy", name, calendarIds?, horizonDays? }. calendarIds null means the calendars that count as busy. 403 when switched off.
PATCH/:idAny of name, calendarIds, horizonDays.
DELETE/:idRevoke. The link 404s from the next request.

A booking link has kind: "booking" and booking: { title, durationMinutes, stepMinutes?, calendarId }. calendarId is where bookings land and must be the owner's own plaintext, writable calendar. Its url is the booking page at /b/<token>.

Booking visitors call /api/public/booking/:token:

MethodPathNotes
GET/:token?from&to{ title, durationMinutes, from, to, slots }: open starts, at most 31 days, from now to the horizon.
POST/:token{ startUtc, name, email?, note? } → 201 { id, title, startUtc, endUtc, cancelToken }. 409 when the slot isn't open.
DELETE/:token/bookings/:idCancel, with X-Booking-Cancel-Token. 404 for a wrong token or a booking already cancelled or over.

Free/busy visitors call GET /api/public/availability/:token?from&to (ISO date-times, at most 31 days; default the next 7) and get { from, to, busy }, clamped to start no earlier than the current hour and end within the horizon. Calendar apps subscribe to GET /freebusy/:token.ics. Every unusable link is the same 404.

Scheduling polls: /api/polls ​

An owner offers candidate time slots behind a link; people answer each slot yes, maybe or no without an account; the owner settles on one. Creating a poll needs a public origin from the host (501 without one, as for feeds), and the polls app switched on (pollsEnabled; every polls route answers 404 when off, like any switched-off app).

MethodPathNotes
GET/api/pollsYour polls, newest first, each with its link (url), slots and answer count.
POST/api/pollsCreate. Takes the rules and the concrete slot list (at most 300); generator stores the dialog's controls. 10/min per IP.
GET/api/polls/:id
PATCH/api/polls/:idPartial. password absent keeps it, null removes it. slots replaces the list, matched by time, so unchanged slots keep their answers.
DELETE/api/polls/:idWith every answer.
POST/api/polls/:id/rotateNew link; the old one is a 404 at once. 10/min per IP.
POST/api/polls/:id/close, /reopenReopening also clears a deadline that has passed, and an earlier decision.
GET/api/polls/:id/resultsEvery participant with name, email, comment, account and answers.
DELETE/api/polls/:id/participants/:pidRemove an entry.
POST/api/polls/:id/finalize{ slotId, eventId }. Records the decision and closes the poll. The event is made by the client through /api/events first, so an encrypted calendar gets an encrypted event.

Visitors: /api/public/polls/:token ​

Mounted before the session check, still under /api (so the CSRF origin check and body limit apply). Every way of not finding a poll is the same 404. A poll for signed-in users only answers 401 {"code":"login_required"} without a session; one with a password answers 401 {"code":"password_required"} until the visitor sends a grant in X-Poll-Grant. The owner passes both gates.

MethodPathNotes
GET/api/public/polls/:tokenThe public view: slots with full, and counts and other participants only when the owner's visibility rule allows. Never an email. Names are null in anonymous mode.
POST/api/public/polls/:token/unlock{ password } → { grant }, valid 12 hours or until the password changes. Wrong passwords are throttled per poll. 10/min per IP.
POST/api/public/polls/:token/participantsAnswer: { name, email, comment, answers }. Returns the entry and an editToken, shown once. One entry per account for signed-in visitors. 10/min per IP.
GET/api/public/polls/:token/meYour own entry, by X-Poll-Edit-Token or by your account.
PUT/api/public/polls/:token/meChange it, while the poll is open and allows edits.
DELETE/api/public/polls/:token/meWithdraw it, under the same conditions.
GET/api/public/polls/:token/final.icsThe decided time as iCalendar, once there is one.

All of these share a 60/min per IP limit. The page itself is the SPA at /p/:token.

Finance: /api/finance ​

Shared-expense projects, with members, bills, balances, the settlement plan, sharing and payment details, behind the finance app's switch (financeEnabled). Guests holding a public link reach /api/public/finance/{token}/.... The routes, their access levels and what each answers are in Finance.

Import / export: /api ​

MethodPathNotes
GET/api/export.icsStandard iCalendar. Encrypted calendars and trashed events are excluded. ?calendarId= narrows it to one calendar you own (404 otherwise). A whole-account export also carries the task list as VTODOs, and import reads them back.
POST/api/export.icsChosen events rather than a calendar: a JSON body { "ids": [...], "name"?: "..." }, up to 1000 ids. Series come with their exceptions. Events you can't read and encrypted events are left out, so the app adds private events itself.
POST/api/importImport an .ics file (multipart file, tz, optional calendarId). anchor (ms) moves the events so the earliest starts there, refused for a file with a repeating event; strict=1 imports all of the file or nothing, a 422 saying why.
POST/api/import/previewWhat /api/import would write, with the same fields, writing nothing: the events by start (the first 50), total, tasks, errors (including a cut-off file) and whether they are movable to the anchor.
GET/api/export.hypercalendarNative JSON format. Preserves what iCalendar can't carry: per-event color, reminders, calendar grouping, per-occurrence override colors. Takes the same ?calendarId=. A whole-account export also carries addressBooks, contacts, birthdaysCalendars, tasks, subscriptions (feed URLs), profile (not applied on import) and the finance projects the account owns (financeProjects and the other finance* lists, no link tokens; see Finance), and the account's wellbeing records (wellbeingDrinks, wellbeingDiary and the other wellbeing* lists, the trash too, plus wellbeingCsv with a CSV file per kind; see Wellbeing); no CardDAV or CalDAV credentials. ?attachments=1 adds attachments, base64-encoded. ?calendarId=<encrypted calendar>&ciphertext=1 returns that calendar with its text fields still ciphertext and sealed: true, for the app to decrypt; import refuses a sealed file.
GET/api/export/:appOne app's part of the archive (calendar, tasks, contacts, polls, finance, wellbeing), <app>.json, which /api/import.hypercalendar reads like the whole. ?format=csv, ics or vcf returns the app's files of that kind instead (one file, or a ZIP of several), zip all of them. An app the account does not have is a 404, like one with no such files; an unknown format is a 400.
GET/api/export.zipThe tree a backup writes to Files (see Backups into Files below), as a ZIP. ?apps=calendar,tasks narrows it to those apps' folders; without it the ZIP also holds the whole archive, the settings and the plugins' data.
POST/api/import.hypercalendarImport a .hypercalendar file or an app's <app>.json (multipart file). apps, a comma separated list, restores only those apps' lists. Import adds and updates, it never deletes.

Subscriptions: /api/subscriptions ​

Read-only external ICS feeds. A subscription is a calendar row with subscription_url set, so listing, editing, and deleting go through /api/calendars.

MethodPathNotes
POST/api/subscriptionsAdd a feed. The URL is checked against the SSRF guard (crates/apps/hc-app-api/src/host.rs) before fetching.
POST/api/subscriptions/:id/refreshForce a refresh now.

Weather: /api/weather ​

Hourly forecast and severe-weather warnings for the week-view lens, proxied rather than fetched from the browser: the app's CSP is connect-src 'self', so the page cannot reach a third-party host, and going through the server keeps the user's IP away from the weather source. The outbound call uses the same safeFetch guard as subscriptions.

MethodPathNotes
GET/api/weather?provider=&lat=&lon=&from=&to=from/to are unix ms, half-open, at most 9 days wide. provider is optional.

Responses are cached in memory for 30 minutes (forecast) and 5 minutes (warnings), keyed by provider, coordinates rounded to two decimals, and the window snapped to whole UTC days. A source failure is reported as 502 with a generic message; the upstream body is never echoed. An empty hours array means the source has no data for that window, which is what it returns past its forecast horizon, and is not an error.

Sources ​

Four are implemented, all free of charge, keyless and openly licensed: brightsky (Deutscher Wetterdienst via Bright Sky, Germany, with history), openmeteo (worldwide, no warnings), metno (MET Norway, worldwide, warnings for Norway) and nws (the US National Weather Service). provider must be one of those ids; anything else is a 400 and never reaches a third party. Unset, it falls back to WEATHER_PROVIDER, and then to brightsky.

Each source declares how far back and forward it can answer, and the request is rejected with a 400 if the window does not overlap that range at all. The client applies the same rule from the shared catalogue before asking, so in practice it renders "no forecast for this week" rather than sending a request it knows will fail. A window that only partly overlaps is fetched, and the days beyond the source's reach come back empty.

Set WEATHER_BRIGHTSKY_URL, WEATHER_OPENMETEO_URL, WEATHER_METNO_URL or WEATHER_NWS_URL to point at a self-hosted instance; those are deliberately server configuration rather than client settings, so an authenticated user cannot name an arbitrary URL for the server to fetch. A client only ever names a source from the list above. WEATHER_USER_AGENT sets how the server identifies itself, which MET Norway and the NWS both require.

The rate limit on this endpoint (30/minute per client) protects this server, not the sources. What protects them is the cache: a given source, place and window costs at most one upstream call per half hour, whatever the client does.

Two-way sync to a remote CalDAV collection (Nextcloud, Radicale, Fastmail, …). Requires CALDAV_SECRET to be set; without it, linking is refused rather than storing a password in the clear.

MethodPathNotes
POST/api/caldav/linksLink a calendar to a remote collection URL. Point it at a single calendar; hc-server also finds the one writable calendar from the server's address.
PATCH/api/caldav/links/:id
DELETE/api/caldav/links/:id
POST/api/caldav/links/:id/syncSync now.

The stored password is never returned by any response, export, or backup: there's a regression test for exactly that (caldav/links.test.ts).

Contacts: /api/address-books, /api/contacts ​

MethodPathNotes
GET/api/address-booksThe user's books with live contact counts. Creates a local "Contacts" book when there is none.
POST/api/address-books{ name, color? }.
PATCH/api/address-books/:idname, color, sortOrder, davEnabled.
DELETE/api/address-books/:idDeletes the book and its contacts. The last book can't be deleted.
GET/api/contacts?q= (name, org, email, phone digits), ?book=, ?trash=1.
POST/api/contactsContactCreateSchema: addressBookId plus the fields.
GET/api/contacts/:id
PATCH/api/contacts/:idOnly the fields sent change. addressBookId moves the contact.
DELETE/api/contacts/:idTo the Trash; ?permanent=1 for good.
POST/api/contacts/:id/restoreOut of the Trash.
GET/api/contacts/suggest?q=&limit=: { contactId, name, email } per address, best match first.
GET/api/contacts/duplicatesGroups sharing an email, a phone number or a (two-word) name.
POST/api/contacts/merge{ keepId, mergeIds, fields }: keepId takes fields, the rest go to the Trash.
POST/api/contacts/bulk{ ids, action }, up to 1000 ids. action.type is trash, restore, move (addressBookId), addLabels or removeLabels (labels), or favorite (value). All or nothing: an id that is not yours is a 404. Returns { updated, trashed }.
POST/api/contacts/labels/rename{ from, to }: renames a label on every contact that has it, matched without regard to case. to: null removes it. Returns { updated, trashed: [] }.
POST/api/contacts/import/previewMultipart file: CSV or vCard, detected from the content; for CSV, the header row and its mapping.
POST/api/contacts/importMultipart file, addressBookId, mode (skip, update, duplicate), optional CSV mapping JSON.
GET/api/contacts/export?format=csv (Google Contacts layout, with a BOM) or vcf; ?book=; ?ids=a,b,c for a selection.
GET/api/contacts/changes?cursor=&limit= (500 by default, at most 1000): the change feed, { changes, cursor, more, reset }, below.

The change feed lets a client keep its own copy of the contacts (a phone's address book) without listing them all on every pass. Each change is { seq, op, contactId, contact, etag }, oldest first, a contact changed several times appearing once at its latest change: upsert carries the contact and the ETag its vCard is served under over CardDAV; delete (trashed, deleted for good, or gone with its book) carries neither. Start from cursor=0, keep the cursor each page returns, and call again while more. reset means the cursor is older than the 90 days kept (or not one the server handed out): list the contacts again and carry on from the cursor it returns. The contacts ping below says when to call.

An address book or contact change pings the event stream with topic contacts, and also as a plain events ping when a birthdays calendar changed.

Two-way sync of an address book with a remote CardDAV collection. Like CalDAV links, it needs CALDAV_SECRET.

MethodPathNotes
POST/api/carddav/discover{ url, username, password }: the account's address books, found from the server's address (RFC 6764).
POST/api/carddav/linksVerify, then create a linked book and run the first sync. Takes a book URL, from discover or pasted.
PATCH/api/carddav/links/:idusername, password, refreshIntervalMinutes.
DELETE/api/carddav/links/:idStop syncing; the book and its contacts stay.
POST/api/carddav/links/:id/syncSync now.

Birthdays calendars: /api/birthdays-calendars ​

MethodPathNotes
POST/api/birthdays-calendars{ name?, color?, timezone?, defaultReminders?, source? }. Reminders default to 09:00 the day before.
PATCH/api/birthdays-calendars/:id{ source }: which books, which dates, the title format.

Renaming, recolouring, hiding and deleting go through /api/calendars like any calendar. Event writes into one are refused with 403.

Another app's generated calendar has generatedBy (the app, wellbeing for the sleep calendar, made with the profile's sleepCalendar) instead of birthdaysSource. It is read-only the same way and these routes answer 404 for it.

Backups: /api/backups ​

Per-user daily snapshots on the server's disk, .hypercalendar (or .ics for ones written before backups switched format). Only accounts without Files get new ones (the others are backed up into their Files, below); those already on disk still list and restore until they age out. Download serves each in its own format, and restore imports it the way a manual import of that file would. Requires a host with filesystem access; on the Android build these report the feature as unavailable.

MethodPath
GET/api/backups
POST/api/backups
GET/api/backups/:date
POST/api/backups/:date/restore

Backups into Files: /api/me/backup-settings, /api/backup-runs ​

Each run writes one new folder into the account's Files (#789), named for when it started (2026-11-23 03-00, in the settings' zone, else UTC):

README.txt                what each file is, how to restore, what is left out
hypercloud.hypercalendar  the whole account (only in a run of every app)
Calendar/  <calendar>.ics, <calendar>.csv, calendar.json, <private>.sealed.hypercalendar
Tasks/     <list>.ics, <list>.csv, tasks.json
Contacts/  <book>.vcf, <book>.csv, contacts.json
Polls/     <poll>.csv, polls.json
Finance/   <project>.csv, finance.json
Wellbeing/ drinks.csv, diary.csv, ..., wellbeing.json
Plugins/   <plugin>.bin (only in a run of every app)
Settings/  settings.json (only in a run of every app)

Each <app>.json is a .hypercalendar holding only that app's lists, so /api/import.hypercalendar reads it. settings.json is the settings file Settings → Data imports. A private calendar is its sealed export, which only the account's key opens. Attachments and other files stay out (they are in Files already), and so do passwords, tokens, link addresses and DAV credentials. Only apps the account has are written. The types are in hc_contract::platform (BackupSettings, BackupRun, ...).

MethodPathNotes
GET/api/me/backup-settings{ available, enabled, intervalDays, keep, apps, backupApps, folderId, folderName, zone, nextDue }. available is false when the account cannot use Files here; the rest then does not apply and the server keeps its daily copy. apps null is every app (and the whole archive, settings and plugins); backupApps lists the apps this account can back up.
PUT/api/me/backup-settingsThe fields given change: enabled, intervalDays (1 to 365), keep (1 to 100), apps (null: all), folderId (null: /Backups), zone (an IANA zone, null: UTC). A folder others can see is a 409 folderShared. Turning backups on or changing the interval sets the next one from the last automatic run. Off also stops the daily disk copy.
GET/api/backup-runs{ runs, nextDue }, newest first. A run: { id, kind, apps, whole, status, error, errorCode, folderId, folderName, kept, bytes, startedAt, finishedAt }; kind is auto or manual, status running, done or failed. errorCode is quotaExceeded, folderShared, filesUnavailable, interrupted or internal.
POST/api/backup-runsBack up now: { apps? } (null: everything). 202 with the run, which goes on after the answer. While one is running, that one is answered instead. Without Files: filesUnavailable.
DELETE/api/backup-runs/:idDelete a run and its folder; 204. A folder that was renamed, moved or added to stays in Files. 409 running while it runs.
POST/api/backup-runs/:id/restore{ apps? } (null: everything the run holds). Returns the import summary { created, updated, skipped, errors }. Adds and updates, never deletes. 409 notDone for a run that failed or is running, backupIncomplete when a file it needs is no longer in its folder.

Automatic runs follow the account's schedule, on, weekly, keep 4 until the account changes it; the first is spread over a day after the account is first seen, with a notice saying so. Only after an automatic run succeeds are the automatic runs past keep deleted, and only those whose folder is unchanged (kept false). Manual runs stay until deleted. A failed run deletes nothing, notifies the account, and the next try comes sooner, backing off. Starting and finishing a run publishes backups.changed ({ run, status }) inside the server and a change with topic backups on /api/events/stream.

Files: /api/files ​

The files app (see Files). Answers 404 while an admin has switched it off, and 501 on a host with no storage for it (the Android app's on-device backend). Every write appears in the change feed and pings the event stream with topic files.

MethodPathNotes
GET/api/files/rootThe account's root folder as a listing: { folder, path, children }, folders first.
GET/api/files/folders/:idA folder's listing; path runs from the root down to its parent.
PUT/api/files/folders/:id/expiryMakes a folder temporary (#795): { expireAfterSecs }, 60 to 157680000 seconds, or null to keep its contents. Each live item directly in it goes to the Trash that long after it came in (created, copied, moved or restored there), by the files-folder-expiry job (every minute), with an expired Activity line. Needs manage access; 400 for the top folder or a file. Answers the folder, whose expireAfterSecs is set (omitted when off).
POST/api/files/folders{ parentId, name }. 409 when the name is taken (names are unique regardless of case).
GET/api/files/nodes/:idOne folder or file.
PATCH/api/files/nodes/:idRename and/or move: { parentId?, name?, onConflict? } with fail (default), rename or replace.
POST/api/files/nodes/:id/copy{ parentId, name?, onConflict? }. Copies share contents, so only the quota is charged. 507 when it does not fit.
DELETE/api/files/nodes/:idTo the Trash, with everything below it.
GET/api/files/nodes/:id/contentThe contents, with Range (and If-Range), ETag and If-None-Match. Always under a sandboxing CSP; ?inline=1 shows images, media, PDF and plain text.
PUT/api/files/content?parentId=&name=Upload in one request; the body is the file. Replaces a same-named file (onConflict=), keeping the old contents as a version. With sha256=, 422 when the body hashes otherwise; with ifMatch=<etag>, 409 unless the same-named file still has that etag (files API 4).
POST/api/files/uploadsStart a resumable upload: { parentId, name, size, mimeType?, modifiedAt? } → { id, offset, size }. Delta sync (files API 5, #194): with chunking, chunks: [{ hash, size }] and sha256 it answers missing, the indexes of the chunks the server lacks; only the uploader's own files count.
PUT/api/files/uploads/:id?offset=Append a chunk (up to 64 MB) at offset, the bytes received so far. A wrong offset answers 409 with the right one.
PUT/api/files/uploads/:id/chunks/:hashOne chunk an upload named, checked against its hash and size (422, 413). 204.
GET/api/files/nodes/:id/manifest{ sha256, size, chunking, chunks: [{ hash, offset, size }] }: the chunks a file is stored as, to fetch the ones a client lacks by range (files API 5).
GET/api/files/uploads/:idWhere an interrupted upload got to.
POST/api/files/uploads/:id/commit{ sha256?, onConflict?, ifMatch? }. 409 until every byte is in, or when the same-named file no longer has the etag ifMatch names; 422 when the checksum differs.
DELETE/api/files/uploads/:idAbandon an upload.
POST/api/files/batchSeveral small files in one request (files API 2): the body is the manifest { files: [{ parentId, name, size, mimeType?, modifiedAt?, sha256?, onConflict?, ifMatch? }] } on one line, then the files' bytes in its order (64 MB in all, 1000 files). → { results: [{ node?, status, error? }] }: each file's node, or the status and error its own upload would have had.
GET/api/files/nodes/:id/versionsEarlier contents, newest first (20 kept).
GET/api/files/nodes/:id/versions/:vid/contentAn earlier version's contents.
POST/api/files/nodes/:id/versions/:vid/restoreMake it current; the current contents become a version.
GET/api/files/nodes/:id/activityWhat happened to it, and inside a folder, and who did it, newest first (FileActivityPage; ?before=<id>&limit=, at most 200). Anyone who can see it; members do not see its shares, others' downloads or synced devices, nor where a move went.
GET/api/files/activityThe account's Activity (#675): what happened to its own files, whoever did it, and what it did in folders shared with it, newest first, each with the folder it is in (FileActivityPage; ?before=<id>&limit=). Downloads (GET .../content without inline=1 or sync=1, ZIPs, links, WebDAV) are told once per person and file in 10 minutes.
POST/api/files/nodes/:id/syncA sync client's folder pair made with this folder: a syncStarted line in its Activity naming the device (the linked device, or the app password). DELETE: removed, syncStopped. 204.
GET/api/files/trashWhat is in the Trash, newest first.
POST/api/files/trash/:id/restoreBack to where it was, or to the root if that folder is gone, under a free name.
DELETE/api/files/trash/:id, /api/files/trashDelete one item, or everything, for good.
GET/api/files/changes?cursor=&limit=The change feed: { changes, cursor, more, reset }. reset means the cursor is older than the 90 days kept: list the tree again.
GET/api/files/streamServer-sent events for sync clients: files/hello on connecting, files/changed whenever the change feed moves, a ping every 15 s. Only that something changed; the feed says what.
GET/api/files/recent?limit=Files changed most recently, anywhere in the tree (50 by default, at most 200).
GET/api/files/search?q=&from=&types=&modifiedSince=&minSize=&maxSize=&owner=&contents=&limit=Files and folders by name (anywhere in it, as typed), then by the words in their text (once the files-index job has read it): the caller's own and what is shared with them, never the Trash. from is all, mine or shared; types the Type filter's groups; contents=false searches names only; 50 hits by default, at most 200. { hits, more, pending }: each hit a node with path, ownerId, ownerName, matched (name or contents) and a snippet; pending is how many of the caller's files wait to be read.
GET/api/files/favoritesThe asker's starred nodes. Every node carries favorite for the asker.
PUT/api/files/nodes/:id/favoriteStar a node; DELETE takes the star off.
POST/api/files/bulk{ action: "trash" } or { action: "move" | "copy", parentId, onConflict? }, with ids (up to 1000) → { done, failed }.
GET/api/files/zip?ids=Up to 1000 nodes as one ZIP, folders with their paths, streamed with a known length (ZIP64 for large archives).
GET/api/files/nodes/:id/thumbnail?size=A picture's WebP thumbnail, 256 or 1024 px; 404 for anything that is not a picture the server can read. Cached for good per contents.
GET/api/files/usage{ used, quota } in bytes; quota is null without a limit.
GET/api/files/storageWhat the storage is used by: filesBytes, versionsBytes (and versionCount), trashBytes adding up to used, with quota, available, and the ten largestFiles and largestFolders.
POST/api/files/versions/pruneBody { olderThanDays } (0 for all): deletes the account's earlier versions made before then; answers { removed, bytes }.

Every route above also works on what was shared with the caller: reading needs a share, changing needs one that can edit, and the shared node itself stays its owner's to rename, move or delete (403). Writes land in the owner's tree and count against the owner's storage; moving between owners is refused (409), copying is not. Every node carries permission (owner, write or read) and, for its owner, shared.

Sharing (refused while accounts are kept apart, except DELETE):

MethodPathNotes
GET/api/files/nodes/:id/sharesThe node's shares, owner only.
POST/api/files/nodes/:id/shares{ type: "user" | "group", granteeId, permission } (sharing again changes the permission) or { type: "link", permission, password?, expiresAt? }. A link answers with its token (and url) once.
PATCH/api/files/nodes/:id/shares/:shareId{ permission?, password?, expiresAt? }; null takes a link's password or expiry off.
DELETE/api/files/nodes/:id/shares/:shareIdStop sharing.
GET/api/files/sharedWhat others shared with the caller, each with ownerName and permission.
GET/api/files/shared-by-meWhat the caller shares with people, groups or by link, still in their live tree (shared set), each with its shares.
GET/api/groupsEvery group, for choosing one to share with.

A link is opened without a session at /api/public/files/:token: GET for { node, permission, needsPassword, expiresAt }, POST /unlock with { password } for a grant to send back as X-Link-Grant (or ?grant= on a plain download link), GET /folders and /folders/:id, GET /content (a link to a file) and /nodes/:id/content, /nodes/:id/thumbnail, /zip?ids=, and, on a writable folder link, PUT /content?parentId=&name=. Anything outside the shared node, and every way of not finding a link, answers 404.

Over WebDAV the same tree is at /dav/files/:user/ (see below).

Finance: /api/finance ​

The finance app (see Finance, which lists every route with the level it takes). Shared-expense projects with members, categories, payment modes, currencies, bills, balances, the settlement plan and transfers under /api/finance/projects/:id/...; a guest holding a public link reaches a project under /api/public/finance/:token/.... Answers 404 while an admin has switched it off. Every write appears in the change feed and pings the event stream with topic finance and the projectId.

MethodPathNotes
GET/api/finance/changes?cursor=&limit= (500 by default, at most 1000): what changed in every project the account sees, each row as it is now, { changes, cursor, more, reset }. A project gained comes whole, one lost as its delete; reset means the cursor is too old: read again from 0.
GET/api/finance/streamServer-Sent Events: finance with { projectId } when a project the account sees changed (null on connecting: read the feed).
POST/api/finance/sync{ ops }, at most 500: an offline queue of create, update (with baseVersion, base and patch) and delete ops on bills, members, categories, payment modes, currencies and transfers. { results }, one per op: applied, merged, conflict, gone or refused.

A link's project has the same three under /api/public/finance/:token (/changes, /stream, and /sync for bills and transfers at participant).

Wellbeing: /api/wellbeing ​

The health tracker (see Wellbeing): drinks, the food diary, workouts, body weight and the profile, each account's own. Every route needs a session; nothing is shared or public. Answers 404 while an admin has switched it off (wellbeingEnabled).

MethodPathNotes
GET/api/wellbeing/profileThe account's WellbeingProfile; the defaults (version 0) until it saves one.
PATCH/api/wellbeing/profileWellbeingProfileUpdate: changes the fields it carries (null clears an optional one) and keeps the rest; none is required. Height 300 to 3000 mm, a year of birth from 1900, sex (female, male or null, for the blood alcohol estimate), a goal weight like a weighing's, a standard drink 1 to 50 g, a weekly limit up to 2 kg, the first day of the week 1 Monday to 7 Sunday. One bad field refuses the whole patch. sleepCalendar true makes the sleep calendar (in the x-timezone zone), false deletes it.
GET/api/wellbeing/drinks?from=YYYY-MM-DD&to=YYYY-MM-DD: the drinks outside the trash on those local days (both included, at most 732) in the zone x-timezone names, UTC without one; oldest first.
POST/api/wellbeing/drinksWellbeingDrinkEntryCreate: 201 with the drink. With foodId (a drink food: the account's own outside the trash or a built-in preset-* one; another food is a 400), name, ABV and kcal default to the food's; without, a name is needed. The server computes alcoholMg and sets sessionId from the session of its time.
GET/api/wellbeing/drinks/frequent?limit= (1 to 50, default 8): the drink foods had most often, for a quick add; ties go to the latest had. Trashed ones are left out.
GET/api/wellbeing/drinks/trashThe drinks in the trash, the latest first.
GET/api/wellbeing/drinks/:idOne drink, in the trash or not.
PATCH/api/wellbeing/drinks/:idWellbeingDrinkEntryUpdate; alcoholMg is computed again. A new foodId brings its name and ABV unless the patch has them. One in the trash is a 409.
DELETE/api/wellbeing/drinks/:idInto the trash, 204 (again too).
POST/api/wellbeing/drinks/:id/restoreOut of the trash, with the drink.
GET/api/wellbeing/foods?q=&limit=&drinks=only (1 to 200, default 50): the foods outside the trash (with drinks=only the drink foods, then the built-in drinks q finds), those q finds in the name or brand (case and accents aside) or as one of its barcodes; favourites first, then the most eaten in the last 90 days, the latest eaten, by name.
POST/api/wellbeing/foodsWellbeingFoodCreate: 201 with the food. A label per 100 g or 100 ml, at most 950 kcal and 100 g of each nutrient; an implausible one is a 400 naming the value (nutrients.sugarsMg). barcodes: at most 20, each an EAN-8, UPC-A, EAN-13 or GTIN-14 with its check digit. A category, a packageAmount (mg or ml; setting it starts restockedAt), mergedInto on update (#822). At most 20 portions in the basis' unit. A drink (#853): drink (its kind) and abv (hundredths of a % vol, 0 to 10 000), per 100 ml, its kcal counting the alcohol. A built-in drink (preset-*) is a 403 on change. blsCode (#1031): a code of the built-in BLS list (else a 400 on blsCode); a label that is exactly that food's is held to the bounds only.
GET/api/wellbeing/foods/trashThe foods in the trash, the latest first.
GET/api/wellbeing/foods/:idOne food, in the trash or not.
PATCH/api/wellbeing/foods/:idWellbeingFoodUpdate; label and portions are checked again. Diary entries keep their snapshot. One in the trash is a 409.
DELETE/api/wellbeing/foods/:idInto the trash, 204 (again too). Entries, recipes and templates using it keep reading it.
POST/api/wellbeing/foods/:id/restoreOut of the trash, with the food.
GET/api/wellbeing/food-entries?from=YYYY-MM-DD&to=YYYY-MM-DD: the diary entries outside the trash on those days (both included, at most 732), by day.
POST/api/wellbeing/food-entriesWellbeingFoodEntryCreate: 201 with the entry. Of a food (foodId, mg or ml as its basis, or thousandths of a named portion), a recipe (recipeId, thousandths of a portion, or mg of its weight), or a quick entry (name and nutrients). The server stores the nutrients as a snapshot.
GET/api/wellbeing/food-entries/trashThe entries in the trash, the latest first.
GET/api/wellbeing/food-entries/:idOne entry, in the trash or not.
PATCH/api/wellbeing/food-entries/:idWellbeingFoodEntryUpdate. A new amount, unit or portion takes a new snapshot from the food or recipe as it is now (409 when it is gone); nutrients only for a quick entry; ingredients only for a recipe's (#918): its own, the nutrients their sum, the recipe unchanged.
DELETE/api/wellbeing/food-entries/:idInto the trash, 204 (again too).
POST/api/wellbeing/food-entries/:id/restoreOut of the trash, with the entry.
GET/api/wellbeing/diary?day=YYYY-MM-DD: WellbeingFoodDay, the day's entries by time, the groups they make (#916: more than 90 minutes apart starts one, those without a time last), the day's sum and the goals of that weekday.
GET/api/wellbeing/goalsThe WellbeingGoals rows: every day's first, then Monday to Sunday.
PUT/api/wellbeing/goalsWellbeingGoalsUpdate: sets every day's row (no weekday) or one weekday's (1 Monday to 7 Sunday), which wins whole over every day's. A target left out is not tracked.
DELETE/api/wellbeing/goals/:idRemoves that row for good, 204.
GET/api/wellbeing/recipesThe recipes outside the trash with their ingredients, by name.
POST/api/wellbeing/recipesWellbeingRecipeCreate: 201 with the recipe. picture is a data:image/(jpeg|png|webp);base64, URI of at most 96 KiB (#1009). Ingredients are foods or recipes of the account's outside the trash (at most 100), each in a unit that fits, or items of their own (#911: name and nutrients, in mg, amount 0 when the weight is not known); a recipe containing itself, directly or through others, or nesting more than 8 deep is a 400.
GET/api/wellbeing/recipes/trashThe recipes in the trash, the latest first.
GET/api/wellbeing/recipes/:idOne recipe, in the trash or not.
PATCH/api/wellbeing/recipes/:idWellbeingRecipeUpdate (ingredients replaces the list, picture: null takes it away). Entries logged from it keep their snapshot. One in the trash is a 409.
DELETE/api/wellbeing/recipes/:idInto the trash, 204 (again too). Recipes using it keep counting it.
POST/api/wellbeing/recipes/:id/restoreOut of the trash, with the recipe.
GET/api/wellbeing/recipes/:id/nutrientsWellbeingRecipeNutrients: the total, per portion and per 100 g of its weight, from its foods as they are now; missing lists ingredients gone for good.
POST/api/wellbeing/recipes/:id/duplicateWellbeingRecipeDuplicate: 201 with a copy, named " (Kopie)" unless name is given.
POST/api/wellbeing/recipes/from-entriesWellbeingRecipeFromEntries: 201 with a recipe of one portion made of those diary entries (#911): an entry whose food or recipe is still there names it, any other is an item of its own with its snapshot. 400 for no entries or one not found.
GET/api/wellbeing/exercisesThe built-in exercises (preset: true, read-only, English name and German nameDe), then the account's own outside the trash, by name.
POST/api/wellbeing/exercisesWellbeingExerciseCreate: 201 with the exercise. A client's id sent again answers 200 with the first one's.
GET/api/wellbeing/exercises/trashThe account's own in the trash, the latest first.
GET/api/wellbeing/exercises/:idA preset or one of the account's own, in the trash or not.
PATCH/api/wellbeing/exercises/:idWellbeingExerciseUpdate. A preset is a 403, one in the trash a 409.
DELETE/api/wellbeing/exercises/:idInto the trash, 204 (again too). Sessions and templates naming it keep it. A preset is a 403.
POST/api/wellbeing/exercises/:id/restoreOut of the trash, with the exercise. A preset is a 403.
GET/api/wellbeing/exercises/:id/history?before= (ms, optional): WellbeingExerciseHistory, the exercise's sets in the latest session outside the trash started before then that had it, and its best set (warm-ups left out; the estimated one-rep maximum for weight and reps).
GET/api/wellbeing/workouts?from=YYYY-MM-DD&to=YYYY-MM-DD: the strength sessions outside the trash started on those local days (both included, at most 732) in the zone x-timezone names, oldest first. volumeG is the working sets' volume.
POST/api/wellbeing/workoutsWellbeingWorkoutSessionCreate: 201 with the session. Each exercise a preset or the account's own (in the trash too), at most 50 of 50 sets; a bad one is a 400 naming its place (["exercises", "0", "sets", "2", "weightG"]). endedAt not before startedAt; templateId one of the account's templates.
GET/api/wellbeing/workouts/trashThe sessions in the trash, the latest first.
GET/api/wellbeing/workouts/:idOne session, in the trash or not.
PATCH/api/wellbeing/workouts/:idWellbeingWorkoutSessionUpdate (exercises replaces the list). One in the trash is a 409.
DELETE/api/wellbeing/workouts/:idInto the trash, 204 (again too). Its cardio entries stay.
POST/api/wellbeing/workouts/:id/restoreOut of the trash, with the session.
GET/api/wellbeing/cardio?from=YYYY-MM-DD&to=YYYY-MM-DD: the cardio entries outside the trash started on those local days, as the sessions. paceSPerKm and speedMPerH with a distance.
POST/api/wellbeing/cardioWellbeingCardioEntryCreate: 201 with the entry. A duration of 1 s to a week; distance, energy and heart rate optional. sessionId one of the account's sessions.
GET/api/wellbeing/cardio/trashThe cardio entries in the trash, the latest first.
GET/api/wellbeing/cardio/:idOne entry, in the trash or not.
PATCH/api/wellbeing/cardio/:idWellbeingCardioEntryUpdate (sessionId: null makes it stand alone). One in the trash is a 409.
DELETE/api/wellbeing/cardio/:idInto the trash, 204 (again too).
POST/api/wellbeing/cardio/:id/restoreOut of the trash, with the entry.
GET/api/wellbeing/workout-templatesThe workout templates outside the trash with their exercises and target sets, by name.
POST/api/wellbeing/workout-templatesWellbeingWorkoutTemplateCreate: 201 with the template; exercises as a session's.
GET/api/wellbeing/workout-templates/trashThe templates in the trash, the latest first.
GET/api/wellbeing/workout-templates/:idOne template, in the trash or not.
PATCH/api/wellbeing/workout-templates/:idWellbeingWorkoutTemplateUpdate (exercises replaces the list). Sessions started from it keep theirs. One in the trash is a 409.
DELETE/api/wellbeing/workout-templates/:idInto the trash, 204 (again too).
POST/api/wellbeing/workout-templates/:id/restoreOut of the trash, with the template.
POST/api/wellbeing/workout-templates/:id/startWellbeingWorkoutTemplateStart: 201 with a new session of its exercises and target sets, each set's weight the one the exercise had in its latest session (set by set, the last one's for more sets; the template's without). One in the trash is a 409.
GET/api/wellbeing/weight?from=YYYY-MM-DD&to=YYYY-MM-DD: the weighings outside the trash on those local days (both included, at most 732) in the zone x-timezone names, UTC without one; oldest first.
POST/api/wellbeing/weightWellbeingWeightEntryCreate: 201 with the weighing. Weight 1000 to 700 000 g, body fat 10 to 800 tenths of a percent or none; a day may have several. A client's id sent again answers 200 with the first one's.
GET/api/wellbeing/weight/trashThe weighings in the trash, the latest first.
GET/api/wellbeing/weight/:idOne weighing, in the trash or not.
PATCH/api/wellbeing/weight/:idWellbeingWeightEntryUpdate (null clears the body fat or the note). One in the trash is a 409.
DELETE/api/wellbeing/weight/:idInto the trash, 204 (again too).
POST/api/wellbeing/weight/:id/restoreOut of the trash, with the weighing.
GET/api/wellbeing/sleep?from=YYYY-MM-DD&to=YYYY-MM-DD: the nights outside the trash listed on those local days (by when they ended, or began while they run; both included, at most 732) in the zone x-timezone names, UTC without one; oldest first.
POST/api/wellbeing/sleepWellbeingSleepEntryCreate: 201 with the night. wokeAt none while it runs, else after bedAt and at most 24 h later; ratings 1 to 5 or none; 0 to 720 minutes to fall asleep. A client's id sent again answers 200 with the first one's.
GET/api/wellbeing/sleep/trashThe nights in the trash, the latest first.
GET/api/wellbeing/sleep/:idOne night, in the trash or not.
PATCH/api/wellbeing/sleep/:idWellbeingSleepEntryUpdate (null clears a field); the night as patched is checked as a whole. One in the trash is a 409.
DELETE/api/wellbeing/sleep/:idInto the trash, 204 (again too).
POST/api/wellbeing/sleep/:id/restoreOut of the trash, with the night.
GET/api/wellbeing/substance-categoriesThe categories outside the trash, by position, then name.
POST/api/wellbeing/substance-categoriesWellbeingSubstanceCategoryCreate: 201 with the category (#948): a name (trimmed, not empty, at most WELLBEING_NAME_MAX characters) and a position (0 without one). A client's id sent again answers 200 with the first one's.
GET/api/wellbeing/substance-categories/trashThe categories in the trash, the latest first.
GET/api/wellbeing/substance-categories/:idOne category, in the trash or not.
PATCH/api/wellbeing/substance-categories/:idWellbeingSubstanceCategoryUpdate: a new name or position. One in the trash is a 409.
DELETE/api/wellbeing/substance-categories/:idInto the trash, 204 (again too).
POST/api/wellbeing/substance-categories/:id/restoreOut of the trash, with the category.
GET/api/wellbeing/substancesThe substances outside the trash, by name.
POST/api/wellbeing/substancesWellbeingSubstanceCreate: 201 with the substance: a name, a category of the caller's outside the trash or none, its unit (mg, count, ml; fixed once made), µg per unit for count and ml only, a note. A client's id sent again answers 200 with the first one's.
GET/api/wellbeing/substances/trashThe substances in the trash, the latest first.
GET/api/wellbeing/substances/:idOne substance, in the trash or not.
PATCH/api/wellbeing/substances/:idWellbeingSubstanceUpdate: the name, category, µg per unit or note (null clears one); the unit and role stay. One in the trash is a 409.
DELETE/api/wellbeing/substances/:idInto the trash, 204 (again too).
POST/api/wellbeing/substances/:id/restoreOut of the trash, with the substance.
GET/api/wellbeing/substance-entries?from=YYYY-MM-DD&to=YYYY-MM-DD: the doses outside the trash on those local days (both included) in the zone x-timezone names, UTC without one; oldest first.
POST/api/wellbeing/substance-entriesWellbeingSubstanceEntryCreate: 201 with the dose: a substance of the caller's outside the trash, at, an amount above 0 in thousandths of its unit, a note; it takes the unit and µg (doseUg) from the substance. A client's id sent again answers 200 with the first one's.
GET/api/wellbeing/substance-entries/trashThe doses in the trash, the latest first.
GET/api/wellbeing/substance-entries/:idOne dose, in the trash or not.
PATCH/api/wellbeing/substance-entries/:idWellbeingSubstanceEntryUpdate: a new substance or amount takes the unit and µg again; null clears the note. One in the trash is a 409.
DELETE/api/wellbeing/substance-entries/:idInto the trash, 204 (again too).
POST/api/wellbeing/substance-entries/:id/restoreOut of the trash, with the dose.
GET/api/wellbeing/grocery-itemsThe items (#822) outside the trash of the caller's list and of every list shared with them (#872; one on another's list has listId, its owner), the oldest first; the clients sort it (category, open before ticked, amount, name).
POST/api/wellbeing/grocery-itemsWellbeingGroceryItemCreate: 201 with the item: a food or a name alone, a category, an amount with its unit (a unit needs an amount), a note, checkedAt, source. A client's id sent again answers 200 with the first one's. listId puts it on a list shared with the caller (400 for one that is not).
GET/api/wellbeing/grocery-items/trashThe items in the trash.
GET/api/wellbeing/grocery-items/:idOne item, in the trash or not.
PATCH/api/wellbeing/grocery-items/:idWellbeingGroceryItemUpdate (null clears a field), checked as a whole. One in the trash is a 409.
DELETE/api/wellbeing/grocery-items/:idInto the trash, 204.
POST/api/wellbeing/grocery-items/:id/restoreOut of the trash, with the item.
GET/api/wellbeing/grocery-sharesWho the caller's grocery list is shared with (#872): WellbeingGroceryShare[], the oldest first.
POST/api/wellbeing/grocery-sharesWellbeingGroceryShareCreate (type user or group, granteeId): 201 with the share; one there already answers 200. Not with oneself, an unknown account or group (400), an account without the app (409), nor while accounts are kept apart (403). The account is told (wellbeing.shared).
DELETE/api/wellbeing/grocery-shares/:idTakes a share of the caller's list away, 204.
GET/api/wellbeing/grocery-listsThe lists of others shared with the caller: WellbeingGroceryList[] (id the owner, ownerName, direct when shared with the caller, not only a group).
DELETE/api/wellbeing/grocery-lists/:idLeaves the list of account :id, 204; reached through a group only, 409.
GET/api/wellbeing/off/product/:barcode?language=: WellbeingOffAnswer, what Open Food Facts has for the barcode (product null when unknown), asked by the server. Not an EAN or UPC is a 400; Open Food Facts busy a 503 with Retry-After, silent a 504, otherwise no answer a 502. 30 lookups and searches a minute per account (429).
GET/api/wellbeing/off/search?q=&limit=&language=: WellbeingOffResults, the products with a name Open Food Facts finds for q (at most 200 characters), at most limit (20 by default, 50 at most). Fails as a product does.
GET/api/wellbeing/changes?cursor=&limit=: WellbeingChanges, the account's records changed after cursor (0 or none: from the start), oldest first, at most limit (500 by default, 1000 at most) and 3 MiB. Each change is an upsert with the record as its route reads it (in the trash or not) or a delete for one gone for good (a goals row); a record changed several times shows once. more says another page waits; reset says the cursor is too old (or from the future): drop the local copy and read from 0. The presets are not in it; the profile is, once saved, as profile.
POST/api/wellbeing/syncWellbeingSyncRequest: an offline queue of creates (with the client's ids: sent again, nothing new), updates (merged field by field when the record moved on, a field both sides changed answered as a conflict with the server's value kept), deletes (into the trash; a goals row for good) and restores, run in order through the routes above, each answered in WellbeingSyncResponse (applied, merged, conflict, gone, refused with code and message). At most 500 ops (400) and 4 MiB (413); 60 a minute.
GET/api/wellbeing/admin/overviewThe server's admins only (403 otherwise): WellbeingAdminOverview, per kind the rows outside the trash and in it, and how many accounts keep any. Counts only: no record, value or account is named.

Every write that succeeds pings the account's clients on /api/events/stream (topic wellbeing, by the writer's X-Client-Id); a sync pings once.

Another account's record is a 404, like one that does not exist; naming another account's food, recipe, exercise, session or template in a body is a 400, as one that does not exist.

Admin: /api/admin ​

Requires users.is_admin.

MethodPathNotes
GET/api/admin/settings
PATCH/api/admin/settingsNotably: close registration once the household's accounts exist, or switch an app off (contactsEnabled, tasksEnabled, pollsEnabled, filesEnabled, financeEnabled, wellbeingEnabled; /api/admin/apps does more), or set the storage per account (storageQuotaBytes, null for none).
GET/api/admin/appsEvery app in the build: state (available: not installed; enabled; disabled), version, groups it is offered to (null for everyone), dependsOn, dependents, supported (the host has what it needs) and usable. The actions below answer with the same list.
POST/api/admin/apps/:id/installRuns the app's migrations and switches it on for everyone. 409 when installed, or while an app it depends on is not.
POST/api/admin/apps/:id/enableSwitches it on. { groups: [id, …] } offers it to those groups' members only; no body, {} or { groups: null } to everyone. 400 for a group that does not exist or an empty list.
POST/api/admin/apps/:id/disableSwitches it off; its data stays. The apps that depend on it go off with it.
POST/api/admin/apps/:id/remove{ confirm: ":id", snapshot? }: drops the app's tables and data (the files' blobs too), after a database snapshot when snapshot is true (501 when the server keeps none). 409 while an app that depends on it is installed. Answers { apps, snapshot }.
GET/api/admin/db-backupsList database snapshots.
POST/api/admin/db-backupsTake one now (VACUUM INTO), checked with quick_check; a snapshot that fails is removed and the call fails.
GET/api/admin/db-backups/:nameDownload one.
GET/api/admin/db-copyWhether the scheduled snapshots are copied into the caller's own Files: { available, enabled, keep, folderId, lastCopiedAt, error, errorCode }.
PUT/api/admin/db-copy{ enabled, confirm? }, for the caller only. Turning it on needs confirm: true (a copy holds every account's data and password hashes) and Files (409 filesUnavailable). Audited.
GET/api/admin/configThe instance settings file: { format: "hypercal-instance", version, settings, apps }. settings has each app's switch (calendarEnabled, contactsEnabled, …); apps says who each app is offered to, { groups: null } for everyone or { groups: [name, …] }, by group name. No environment variables.
PUT/api/admin/configApply such a file; answers with the settings now in force. A newer version is refused, and so is a group in apps this instance does not have (400, nothing changed). An app this build does not carry is skipped; a file without apps leaves the groups as they are.
GET/api/admin/usersEvery account: id, username, displayName, email, isAdmin, twoFactor, createdAt.
PATCH/api/admin/users/:id{ isAdmin }. Not for the caller's own account (409).
PUT/api/admin/users/:id/passwordA new password for someone who forgot theirs. Body { currentPassword, newPassword }, the first the admin's own. Ends that account's sessions. Not the caller's account (409).
DELETE/api/admin/users/:idDelete another account. Body { currentPassword }, the admin's own. Not the caller's account (409).
GET/api/admin/groupsEvery group with its memberCount; POST { name } makes one (409 when the name is taken).
GET/api/admin/groups/:idA group with its members; PATCH { name } renames it, DELETE removes it and what was shared with it.
POST/api/admin/groups/:id/members{ userId }; DELETE /api/admin/groups/:id/members/:userId takes someone out. Both answer with the group.
GET/api/admin/pluginsThe installed plugins (state, groups, permissions with what is granted, contributions, signedBy, baseUrl, health, running), unsignedAllowed and the trustedKeys' ids. See Plugins.
POST/api/admin/plugins/inspect{ url } or { package, signature? } (base64) → what the package is and asks for, its sha256, and the version installed now. Nothing is installed.
POST/api/admin/pluginsThe same, plus sha256 (the package looked at; another is 409), grant: [permission, …] and, for an external plugin, baseUrl. Installs or upgrades it, switched off. Answers { plugins, secret }: an external plugin's new secret, this once.
POST/api/admin/plugins/:id/enableAs for an app: { groups } or everyone. …/disable switches it off, its data kept.
POST/api/admin/plugins/:id/grant{ grant: [permission, …] }, among what it asked for, replacing what it had.
POST/api/admin/plugins/:id/remove{ confirm: ":id" }: deletes the plugin, its database and its settings.

Plugins: /api/plugins, /plugins ​

A plugin's own API is whatever it answers under /api/plugins/:id/…, for any method, for the accounts it is offered to (404 for anyone else, as for a switched-off app). A read-only credential may only GET. Its answers carry Content-Security-Policy: default-src 'none'; sandbox. /plugins/:id/ is its web UI for the shell's frame, public while the plugin is on. See Plugins.

MethodPathNotes
POST/api/auth/handoff{ next }, a path on this instance → { path }: a one-time link (60 s) that signs a browser in as the caller. Not with an app password made by hand or a sync token (403); a linked device's calendar, contacts or files token can. The native apps open the web app through it.
GET/auth/handoff/:codeNo auth. A page naming the account, asking to continue; it signs nobody in. A browser already signed in as that account gets a 303 to next instead, and the link is used up.
POST/auth/handoff/:codeNo auth. Uses the link: a session cookie and 303 to next; an expired or used link is a 404 page.

CalDAV server: /dav ​

Lets DAVx5, Thunderbird, Apple Calendar, etc. read and write HyperCloud directly. HTTP Basic auth with an app password: not the session cookie, and not your account password.

  • OPTIONS, PROPFIND, REPORT, GET, PUT, DELETE on the collection and its objects. MKCALENDAR makes a calendar (VEVENT, or no component named) or a task list (VTODO only); DELETE on a collection removes it and moves its events to the Trash, except the default calendar and task list.
  • PROPFIND answers the properties its body names, with a 404 group for those a resource lacks; a malformed body is a 400, and Depth: infinity (or no Depth) on a collection a 403 DAV:propfind-finite-depth.
  • GET on a calendar is its events as one VCALENDAR; on a home or an address book, an HTML listing. Every GET carries ETag and Last-Modified, and If-None-Match or If-Modified-Since answers 304.
  • calendar-query applies its whole filter (RFC 4791 9.7) to calendars and task lists alike: components, alarms, properties, parameters, text matches, and time ranges, where every occurrence of a series counts and an alarm counts when it rings. A filter that does not fit iCalendar is a 403 CALDAV:valid-filter. calendar-data can ask for some components and properties, expand a series into its instances or limit-recurrence-set its overrides, and CALDAV:timezone names the zone of floating times. free-busy-query answers a VFREEBUSY of the collection's events.
  • PROPPATCH on a calendar or task list sets DAV:displayname, Apple's calendar-color and calendar-order, and on a calendar CALDAV:calendar-description and calendar-timezone(-id); all of a PROPPATCH applies or none of it.
  • A PUT that is not iCalendar 2.0 is refused with the precondition RFC 4791 names: supported-calendar-data, valid-calendar-data, valid-calendar-object-resource (METHOD, two kinds of component, two UIDs), valid-timezone (an unknown TZID with no VTIMEZONE), and no-uid-conflict for a UID another object has. A PUT on a collection or a home is a 403.
  • MOVE of an event or a task to a new name, in its collection or another of the same kind, keeps the object (history, attachments, a task's subtasks go with it). An object already at the destination is not replaced (412 with Overwrite: F, else 403). COPY of an object is a 403 CALDAV:no-uid-conflict, as a UID is unique within an account, and a collection is not copied. A successful MOVE answers with a Location.
  • MOVE takes an event to another calendar, or a task (with its subtasks) to another task list, under the Destination's name; the object keeps its history. An object already there is not replaced (412 with Overwrite: F, else 403). COPY of an object is a 403 CALDAV:no-uid-conflict, as a UID is unique within an account.
  • A collection (calendar, task list, address book) is served under the name its MKCALENDAR or MKCOL gave it: any text but /, up to 255 characters, unique within the account. A name that cannot be a row id ([A-Za-z0-9._-], at most 64) or that another account's collection already has as one is kept beside a fresh id. MOVE of a collection to another name in its home renames it (the default task list keeps tasks); a name the account already serves is not taken over (412 with Overwrite: F, else 403). Hrefs percent-encode what a path segment cannot hold.
  • A PUT keeps what the event model does not hold and serves it back: properties without a field (STATUS, TRANSP, CLASS, X- ones), alarms beyond a display reminder (and every alarm of an edited occurrence), a DURATION, RANGE=THISANDFUTURE (the occurrences it moves are stored but not served) and a lone override's RECURRENCE-ID. The next PUT replaces it; the client's alarms give way once the app changes the reminders, the range once the app changes the series. An event marked TRANSP:TRANSPARENT or STATUS:CANCELLED takes no time in free-busy, the app's included.
  • DELETE of the last address book leaves an empty one under the same name, as CalendarServer re-creates its default book.
  • /.well-known/caldav (and /.well-known/caldav/) → 301 to /dav/ so clients can discover the service from the bare domain; GET /dav/ is a page naming the signed-in account.
  • Trailing slashes are optional (the router runs strict: false).

Only calendars with caldav_enabled are exposed. Encrypted calendars never are.

An object stays at the file name its client PUT it under, whatever names other accounts or deleted objects use. A PUT with the UID of a deleted object brings that object back if it had the same name; under another name it is a new object, and the deleted one is still reported removed to a syncing client. A floating time (no zone) is read in the calendar's zone, else the account's (its default calendar's), else UTC; a new task's floating DUE is read in the account's zone too. A calendar takes VEVENTs only and a task list VTODOs only: anything else is a 403 CALDAV:supported-calendar-component. An event's tags go out as CATEGORIES (a published feed leaves them out).

The same tree serves CardDAV: the principal advertises addressbook-home-set at /dav/addressbooks/:user/, /.well-known/carddav redirects to /dav/, and each address book with dav_enabled is a collection of .vcf cards (served as vCard 3.0) supporting addressbook-multiget, addressbook-query (its filters, collations and limit applied as RFC 6352 says) and sync-collection; a query on a single card (Depth 0) tests that card. An extended MKCOL makes an address book, DELETE removes one (not the last), and PROPPATCH renames or recolours it. GET on the principal is a page. Cards are UTF-8; another charset is refused with CARDDAV:valid-address-data. A card deleted over /dav goes to the Trash. A read-only app password can read but not write.

Files over WebDAV are at /dav/files/:user/: PROPFIND, GET, PUT, MKCOL, DELETE, MOVE, COPY, with ETags, If-Match, Overwrite, and X-OC-Mtime to keep a file's own time. LOCK, UNLOCK and PROPPATCH succeed without doing anything, which is what Finder and Windows need to mount the share writable. The root carries the RFC 4331 quota properties.

MCP server: /mcp ​

MethodPathNotes
POST/mcpModel Context Protocol over streamable HTTP, for AI agents. Authorization: Bearer <app password>; the credential's scope decides whether the write tools exist.

Stateless and JSON-only (no SSE session to resume). 503 unless an admin has switched it on (mcpEnabled in /api/admin/settings), which is checked per request. The tool surface is documented in MCP server.

Extension API: /ext ​

A slice of the REST API for a browser extension or a script, authenticated with Authorization: Bearer <app password> instead of the session cookie. 503 unless an admin has switched it on (extApiEnabled in /api/admin/settings), checked per request and before the credential is looked at.

PathSame as
GET /ext/whoamiReturns { username, scope }, to test a credential
GET /ext/settingsReturns { defaultReminders, appearance }
/ext/events/*/api/events/*, including stream (SSE)
/ext/calendars/*/api/calendars/*, except publishing a feed (501)
/ext/tasks/*/api/tasks/*
/ext/subscriptions/*/api/subscriptions/*
/ext/users, /ext/freebusy/api/users, /api/freebusy
/ext/import, /ext/export.ics, /ext/*.hypercalendarthe matching /api import and export routes
/ext/address-books/api/address-books
/ext/contacts/import, /ext/contacts/import/previewthe matching /api contacts import routes

appearance is the account's accent, corners and font ({ accent: { seed, variant }, shapeStyle, font }, the defaults for what it has not chosen), which the extension paints its pages in.

A read app password may use GET and HEAD only; any other method is a 403. Nothing under /api/me, /api/auth, /api/admin, /api/backups, /api/backup-runs, /api/caldav or /api/weather is reachable. The Origin check that guards /api does not apply, so an extension's chrome-extension:// origin is fine. Fields of encrypted events come back as ciphertext. Rate limited to 300 requests/min per IP. Its client is the Chrome extension. Of the contacts, only the address book list and the import are reachable: the rest of /api/contacts is not.