JavaScript SDK: swarmhit.accounts.restore(accountId, params?)
Bring an archived account back under the same id, with its conversations, settings (limits, warm-up) and history, within 90 days of archivedAt: after that it is deleted permanently. It takes a seat, with the same check as connecting a sender (400 seat-limit-reached or no-plan when there is none), and comes back disconnected (status: error). Its login secrets were not kept, so reconnect it before it sends again: POST /accounts/{id}/reconnect with its password (and totpSecret), or with a fresh liAt for a browser-session (cookie) account, or a hosted connect link for it (POST /accounts/hosted-link with accountId).
When the same LinkedIn account was connected again in the workspace after it was archived, it can't be restored next to it: 400 already-connected, as connecting it twice gives.
It rejoins its old campaigns only with {"campaigns": true}: then the campaigns it was in that still exist take it back, and its own leads there go on once it is reconnected. account.restored is sent to the endpoints subscribed to it.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/accounts/string/restore" \ -H "Content-Type: application/json" \ -d '{ "campaigns": true }'{ "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" }}