A link to a page we host where your own user connects a LinkedIn account (type: create),
or reconnects one of yours (type: reconnect with reconnect_account), a hosted
sign-in: you never see their password. Send them to url; it works until expiresOn (default
1 hour, at most 7 days) and ends once an account is connected or they cancel. A sign-in
under way at the expiry may finish its verification step for 30 more minutes.
When an account is connected, notify_url (https, public) receives
{ "status": "CREATION_SUCCESS" | "RECONNECTED", "account_id": "lg_…", "name": "<your name>" }
(up to 3 tries), then the page sends the person to success_redirect_url; a cancel sends
them to failure_redirect_url. Check the account with GET /api/v1/accounts/{id}: the
notification is not signed. Your webhook gets the account's usual events too.
The page signs in exactly as POST /api/v1/accounts does (the same checkpoints, the live
view for a CAPTCHA). A reconnect takes the account's own email only. country places a new
account's IP (else the person's own location). At most 10 sign-in tries per link.
Your API key from the console (gw_live_…).
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/hosted/accounts/link" \ -H "Content-Type: application/json" \ -d '{ "type": "create", "providers": [ "LINKEDIN" ], "expiresOn": "2026-11-08T12:00:00.000Z", "name": "user-42", "success_redirect_url": "https://app.example.com/linkedin/connected", "failure_redirect_url": "https://app.example.com/linkedin/cancelled", "notify_url": "https://api.example.com/hooks/linkedin-connected" }'{ "object": "HostedAuthURL", "url": "https://console.swarmhit.com/connect/2f6k…", "id": "hl_8Hq2Lw0aZpN4tYc1", "expires_at": "2026-11-08T12:00:00.000Z"}Connect a LinkedIn account POST
Credentials or cookie. A credentials connect signs in and answers when it reaches a stop: signed in (201), a checkpoint (202), or an error. It can take up to about 150 s. See *Connecting a LinkedIn account* in the introduction. A refused connect (wrong password, throttled, proxy) keeps nothing: retrying it reuses the same device and IP.
Reconnect a LinkedIn account POST
Signs the same account in again (same id, device and IP), with credentials or a cookie; the same answers as a connect, `AccountReconnected` instead of `AccountCreated`. A restricted account, or one held by its proxy, is reconnected only with `reason: "manual"` (a person asked); otherwise 403 / 503. A `proxy` or a first `country` sent here is used from this sign-in on.