List the user’s linked LinkedIn accounts (GET) or soft-disconnect one (DELETE).
GET /api/unipile/accounts — listUnipileAccounts. Returns every LinkedIn account owned by the caller with status in ('connected', 'credentials_required'). Rows missing display name or premium flags are lazily enriched from Unipile on the call and the enrichment is persisted. If Unipile returns 404 for a row, we flip it to disconnected before returning.
DELETE /api/unipile/accounts?accountId=<uuid> — deleteUnipileAccount. Soft-disconnects one account: calls Unipile’s DELETE endpoint best-effort (failures there do not block our own cleanup), then sets status to disconnected. The row is preserved so historical campaign data stays intact; the account just stops being usable for new sends.
accounts — historical prospects, conversations, and sent-message records keep working. To re-enable, use reconnectUnipileAccount with the same accountId.accountId is a query parameter for DELETE, not a path segment and not a JSON body. DELETE /api/unipile/accounts?accountId=aaaa...-1111-....Best-effort Unipile cleanup. If Unipile’s DELETE fails we still mark our row disconnected and return 200. An orphaned Unipile-side account is harmless — it stops counting against anything on our side once our status flips.Active campaigns. Disconnecting an account used by an active campaign does not cancel in-flight prospects. The engine will start failing future sends on that account — pause or delete the campaign first if you want a clean stop.Listing is non-destructive but does write. The GET path can persist enrichment updates and auto-flip a row to disconnected on a confirmed Unipile 404. Safe to call frequently, but not a pure read.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Supabase UUID of the account row to disconnect. Passed as a query string parameter (not path or body).
^([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)$Account marked disconnected. Unipile-side deletion was attempted best-effort.
true