Skip to content

Shared Links

Levelcast has two share systems:

Dashboard vs public API: the routes below (/api/v1/sharedLinks, /api/v1/screenSharedLinks) require a session cookie. API keys manage patient links via GET/POST /api/v1/public/patients/:patientId/shared-links and PATCH/DELETE /api/v1/public/shared-links/:id[/toggle] — see the API reference.

  • Table sharedLink (hasPassword, enablePdf, hasDateRange, enabledSections JSON).
  • Create via SharedLinkModal.vue — patient picker, isTemporary (date+time), hasPassword (bcrypt), hasDateRange (DateRangePicker with left border), sections (CheckboxCard grid).
  • Public view: GET /api/v1/sharedLinks/public/:token, POST /public/:token/unlock (HMAC SHARED_LINK_SECRET 4h token), then frame/settings, layout, linked-patients, glucose-readings.
  • Table shared_screen_link (frameId, token 32-char, isTemporary, hasPassword).
  • Limit: sharedLinks: 2 for Free, ∞ otherwise (canCreateSharedLink counts sharedScreenLink.userId).
  • Create: POST /api/v1/screenSharedLinks (validateUserOwnsFrameForSharedScreenLink + 402 if over limit).
  • Public: GET /public/:token, unlock, frame/* (settings/layout/readings).

UI: SharedLinksPage.vue and ScreenSharedLinksPage.vue use GenericTable + modals; billing limits show ApiStatCard or PremiumUpsellModal.