API referenceAccounts
GET
/accounts/{id}

JavaScript SDK: swarmhit.accounts.get(accountId)

Authorization

bearerAuth
AuthorizationBearer <token>

An API key created on the Access tokens page.

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/string"
{  "data": {    "id": "string",    "label": "string",    "senderId": "string",    "fullName": "string",    "firstName": "string",    "lastName": "string",    "headline": "string",    "publicIdentifier": "string",    "profileUrl": "string",    "profilePicture": "string",    "connectionMethod": "cookie",    "connectedVia": "app",    "hostedLinkId": "string",    "status": "active",    "connectionStatus": "string",    "isVerified": true,    "isPremium": true,    "linkedinPlan": "classic",    "error": "string",    "limits": {},    "usage": {},    "paused": true,    "pausedReason": "user",    "pausedAt": "2019-08-24T14:15:22Z",    "cooldownUntil": "2019-08-24T14:15:22Z",    "cooldownReason": "invite_daily_limit",    "checkpoint": {      "type": "2FA",      "input": "code",      "requestedAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z",      "expired": true,      "canResend": true,      "canTryAnotherWay": true,      "liveView": true    },    "inmailCredits": {      "balance": 0,      "syncedAt": "2019-08-24T14:15:22Z"    },    "ssi": {      "score": 0,      "brand": 0,      "people": 0,      "insights": 0,      "relationships": 0,      "industryTop": 0,      "networkTop": 0,      "industryAverage": 0,      "networkAverage": 0,      "industryName": "string",      "unavailable": true,      "syncedAt": "2019-08-24T14:15:22Z"    },    "country": "string",    "stoppedReason": "proxy_drift",    "connection": {      "country": "string",      "isp": "string",      "changedAt": "2019-08-24T14:15:22Z"    },    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}

Disconnect a sender DELETE

**JavaScript SDK:** [`swarmhit.accounts.disconnect(accountId, params?)`](/smart-api/sdk/methods#accounts) Disconnect a LinkedIn sender account: revoke its session, remove it from the workspace and free its seat. The inverse of connecting a sender (POST /accounts). From then on GET /accounts/{id} answers 404 and GET /accounts no longer lists it; no webhook is sent, unless an endpoint subscribes to `account.archived`. The account is archived: its conversations, settings (limits, warm-up) and history stay, listed by GET /accounts?archived=true, and POST /accounts/{id}/restore brings it back under the same id. Its login secrets (session cookie, password, 2FA key) are not kept: a restored account is reconnected like any other. Archived accounts are kept for 90 days, then deleted permanently; pass `permanent=true` to delete right away. With `permanent=true` the account is deleted for good, live or archived: its conversations and settings are erased (`account.deleted`). What it did in campaigns stays with the campaigns. Only a key created by an owner or admin of the workspace can do this (403 `not-allowed` otherwise).

Get the pending sign-in challenge GET

**JavaScript SDK:** [`swarmhit.accounts.checkpoint.get(accountId)`](/smart-api/sdk/methods#accounts.checkpoint) The verification step this sender is waiting on, or `null` when there is none. `type` is 2FA, OTP, IN_APP_VALIDATION, PHONE_REGISTER or CAPTCHA (UNKNOWN for a step Swarmhit does not recognise); `input` says what answers it (`code`, `phone`, or `none` for a step completed outside the API: approved in the LinkedIn mobile app, or a captcha cleared on LinkedIn's own page); `expiresAt` is when LinkedIn drops the attempt, five minutes after it asked. IN_APP_VALIDATION and CAPTCHA are completed outside the API, so poll this endpoint (or listen for account.connected, which fires when the sender comes up) — it re-reads the live session and clears the challenge as soon as the sender is up.