JavaScript SDK: swarmhit.accounts.disconnect(accountId, params?)
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).
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Query Parameters
true deletes the account for good, live or archived, instead of archiving it.
falseResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/accounts/string"{ "data": { "ok": true }}