Integration Ports

Public-facing integration surface for Lemonaid's marketing stack — Project Stitch

Project Stitch · Lemonaid Integration Surface

FWD Care runs independently of Bask.

Every data point that moves through Bask is mirrored into our own Supabase store via the webhook receiver below. Lemonaid's marketing stack connects here — not to Bask directly. That means attribution, patient journeys, and content APIs are all ours to control and expose at any speed.

Bask Webhook Receiver

Live
POSThttps://portal.fwd.care/api/webhooks/bask

Receives all 17 Bask event types. Writes to bask_event_log (audit) + typed table per event. HMAC-verified via X-Bask-Signature header.

Supported event types (17):

newPatientnewOrderorderUpdatedorderShippednewPrescriptionnewTreatmenttreatmentUpdatedabandonedSessionsubscriptionCreatedsubscriptionUpdatedmagicLinkpaymentCreatedpaymentSucceededpaymentFailedpaymentCanceleddisputeCreateddisputeUpdated

To activate: In Bask portal → Settings → Webhooks → set destination URL to the endpoint above. Already active for 11 of 17 event types.

Health Check

Live
GEThttps://portal.fwd.care/api/health

Returns 200 JSON with service status, Supabase reachability, and timestamp. Suitable for uptime monitoring by Lemonaid.

Attribution Parameter Surface

Ready to wire
UTM ParameterFWD Care FieldNotes
utm_sourcesignUpSearchParams.utm_sourceLemonaid ad network or email
utm_mediumsignUpSearchParams.utm_mediumpaid_social | email | organic
utm_campaignsignUpSearchParams.utm_campaignLemonaid campaign name
utm_contentsignUpSearchParams.utm_contentCreative variant
utm_termsignUpSearchParams.utm_termKeyword if applicable
fwd_refsignUpCookies.fwd_refFWD Care internal referral token
lemon_refsignUpCookies.lemon_refLemonaid cross-brand referral

Bask surfaces signUpSearchParams and signUpCookies on newPatient and newOrder events. These land in the typed tables above and are queryable for attribution reporting.

Peptide Catalog / Content-Feed API

Planned — Phase 2
GEThttps://portal.fwd.care/api/catalog

JSON feed of all peptide_catalog rows. Intended for Lemonaid's content team to pull FWD Care molecule status, notes, and readiness into their CMS.

GEThttps://portal.fwd.care/api/catalog/[slug]

Single molecule detail, including status, molecule, category, signal notes, and ready_for_market flag.

MD Integrations (MDI) — Clinical Data

Planned — Phase 2

MDI API (985-page reference in research/md-integrations-endpoint-index.txt) provides case creation, Rx status, and provider assignment. Once wired, patient events from MDI surface on the patient timeline at /patients/[id].

Env vars needed: MDI_CLIENT_ID + MDI_CLIENT_SECRET

HubSpot CRM Sync

Connected — not yet wired

HubSpot connector is live (Vercel integration). Patient CRM events will sync to HubSpot contacts once the identity-linking job is wired. FWD Care patient IDs → HubSpot contact IDs will be stored in patient_identity with source = 'hubspot'.