Detect whether the caller has a connected LinkedIn account with Sales Navigator premium. Gate for the Sales Nav import flow.
hasSalesNavigator flag and, when true, a summary of the first matching LinkedIn account the caller owns. This is the precondition check for importFromSalesNav — a missing Sales Nav account causes that endpoint to 400 with a human-readable instruction to connect one.
The detection signal is accounts.has_sales_navigator, populated as a side effect of Unipile account sync. A freshly connected LinkedIn account may briefly show hasSalesNavigator: false until the next sync refresh lands. No external calls are made from this endpoint — it’s a pure Supabase read.
getSalesNavAccess before importFromSalesNav. If hasSalesNavigator is false, prompt the user to connect a LinkedIn account via the Unipile OAuth flow (createUnipileConnect) before proceeding.Stale sync. If the user recently reconnected a LinkedIn account with Sales Nav but this endpoint reports false, wait ~1 minute and retry — account status is synced via a scheduled Trigger.dev job, not inline at connection time.No side effects. Pure read, safe to poll frequently.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Sales Navigator availability for the caller. When hasSalesNavigator is true, account is populated.
True when the caller has at least one connected LinkedIn account with has_sales_navigator = true.
The first connected LinkedIn account the caller owns that has Sales Navigator premium.