JavaScript SDK: swarmhit.emailAccounts.delete(emailAccountId)
Remove the mailbox from the workspace: its email threads go with it, it leaves every campaign pool, and leads it was emailing move to the remaining mailboxes. Its threads are deleted. Connecting the same address again within the restore window (15 days by default, set by Swarmhit) brings it back to its campaigns, its leads and its settings, under a new id with restoredFrom set; after the window it comes back as a new mailbox. Needs the email channel enabled for the workspace (403 otherwise). A mailbox bought through Swarmhit (managed set) is never removed this way: 409 with code: managed-mailbox; cancel it with POST /email-accounts/{id}/cancel-managed instead.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/email-accounts/string"{ "data": { "ok": true }}Pause a mailbox POST
**JavaScript SDK:** [`swarmhit.emailAccounts.pause(emailAccountId)`](/smart-api/sdk/methods#emailAccounts) Pause the mailbox: campaigns stop emailing from it until it is resumed. Its campaign leads stay assigned. Pausing an already-paused mailbox is a no-op and still returns the mailbox. Emits an `account.paused` webhook with `channel: email`.
Resume a paused mailbox POST
**JavaScript SDK:** [`swarmhit.emailAccounts.resume(emailAccountId)`](/smart-api/sdk/methods#emailAccounts) Resume a paused mailbox so campaigns can email from it again. A no-op on a mailbox that is not paused; returns the mailbox either way. Emits an `account.resumed` webhook with `channel: email`.