Cancel a mailbox bought through Swarmhit (connectedVia: managed). It keeps working until cancelAt (its renewal date), then it is removed and stops being billed; the last mailbox of a domain also stops the domain's renewal. Not gated on the managed mailboxes feature. 409 with code: not-managed for a mailbox the workspace connected itself; 403 with code: not-allowed unless the key's creator may manage billing.
The domain's admin mailbox (managed.isAdmin) is the one every other mailbox on the domain depends on: once it is cancelled, no mailbox can ever be added to that domain again. While other mailboxes still run on the domain, cancelling it needs confirmAdmin: true; without it the answer is 409 with code: admin-mailbox and the warning to show.
Authorization
bearerAuth An API key created under Settings → API & Webhooks.
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/email-accounts/string/cancel-managed" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "cancelAt": "2019-08-24T14:15:22Z", "account": { "id": "string", "label": "string", "email": "string", "fromName": "string", "provider": "google", "authType": "password", "connectedVia": "app", "hostedLinkId": "string", "status": "pending", "error": "string", "limits": {}, "usage": {}, "paused": true, "pausedReason": "user", "pausedAt": "2019-08-24T14:15:22Z", "trackOpens": true, "trackClicks": true, "dnsHealth": { "domain": "string", "managed": true, "spf": { "status": "ok", "reason": "string" }, "dkim": { "status": "ok", "reason": "string", "selector": "string" }, "dmarc": { "status": "ok", "reason": "string", "policy": "none" }, "checkedAt": "2019-08-24T14:15:22Z" }, "deliverabilityTest": { "status": "running", "startedAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "landing": "inbox", "spf": "string", "dkim": { "result": "string", "selector": "string" }, "dmarc": "string", "blocklists": { "ip": "clean", "domain": "clean" }, "failure": "send" }, "counters": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "managed": { "provider": "string", "domain": "string", "status": "string", "renewsAt": "2019-08-24T14:15:22Z", "cancelAt": "2019-08-24T14:15:22Z", "isAdmin": true }, "warmup": { "provider": "string", "status": "pending", "statusLabel": "string", "strategy": { "preset": "conservative", "startingVolume": 1, "dailyIncrease": 1, "targetVolume": 1, "replyInbox": [ 0, 0 ], "replyPromotions": [ 0, 0 ], "replySpam": 0 }, "strategyApplied": true, "day": 0, "currentVolume": 0, "targetVolume": 0, "health": "excellent", "healthLabel": "string", "healthScore": 0, "inboxRate": 0, "startedAt": "2019-08-24T14:15:22Z", "holdUntil": "2019-08-24T14:15:22Z", "holdReason": "warming", "holdOverride": true, "syncedAt": "2019-08-24T14:15:22Z", "error": "string" }, "restoredFrom": "string" } }}Rename a lead list PATCH
Previous Page
Buy domains and mailboxes POST
Buy the quoted order: charges the workspace's card on file for the quote's `dueNowCents`, then registers the domains and creates the mailboxes. They arrive connected (no sign-in, `connectedVia: managed`) and warming unless `warmup.enabled` is false, usually within hours; follow the order on GET /mailbox-orders/{id} or the `mailbox_order.completed` / `mailbox_order.failed` webhooks. Send the `quoteId`; the order fields are optional and, when sent, must be exactly what was quoted (`409`, `code: quote-mismatch`). Buying the same quote again returns the same order with no second charge, and an `Idempotency-Key` replays the first answer to a retry. `402` with `code: no-payment-method` or `payment-failed` when the card cannot be charged; `409` with `code: quote-expired`, `price-changed` or `domain-unavailable` when the quote no longer holds (quote again); `409` with `code: payment-pending` when the charge is still being confirmed (the order appears in GET /mailbox-orders within minutes if it went through, so do not buy again); `403` with `code: not-allowed` unless the key's creator may manage billing (owner or admin of the paying workspace). Quoting needs the same right. For `existing` domains: `409` with `code: mailbox-unavailable`, `domain-full` or `domain-admin-cancelled`, and `404` with `code: domain-not-owned`.