Skip to main content
POST
/
api
/
unipile
/
reconnect
Reconnect an existing Unipile LinkedIn account
curl --request POST \
  --url https://app.puffle.ai/api/unipile/reconnect \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{ "url": "https://account.unipile.com/hosted/reconnect-xyz789" }

Overview

Like connectUnipileAccount, but keyed to an existing row in unipile_accounts. Use this when:
  • An account has drifted into disconnected or credentials_required
  • The user has upgraded their LinkedIn plan (Premium, Sales Navigator, Recruiter) and we need to re-fetch the premium feature flags
Unlike a fresh connect, reconnect preserves the Unipile account_id — so historical prospects, conversations, and sent messages stay linked across the re-auth. The returned url expires 1 hour after issuance.

AI agent notes

Cannot be completed autonomously. The url must be opened in a human-operated browser. Surface it to the user and poll GET /api/unipile/accounts until the row’s status flips back to connected.When to prefer this over connectUnipileAccount:
  • There is already a row for this LinkedIn identity (even if currently disconnected) — reconnect keeps the account_id, history, and any attached sender-account links on draft campaigns.
  • connect creates a brand-new row and would leave the old one orphaned.
Plan-upgrade flow. If the user just added Sales Navigator and you only need to refresh the premium flags (not re-auth cookies), try refreshUnipileAccount first — it’s cheaper and doesn’t need the browser. Only fall back to reconnect if the flags still look wrong after a refresh.Chains with: searchUnipile (now eligible for the sales_navigator API), any LinkedIn campaign launch.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
accountId
string<uuid>
required

Supabase UUID of the unipile_accounts row (NOT the Unipile provider account_id). Must be owned by the authenticated user.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Response

Hosted reconnect URL created.

url
string<uri>
required

Hosted Unipile reconnect URL. Redirect the user's browser here to complete re-auth. Expires 1 hour after creation.