1. Order
Scaledmail
  • Scaledmail API Documentation
  • Workspaces
    • Get Workspaces
      GET
    • Create Workspace
      POST
  • Pre Warm Inboxes
    • Pre Warm Inboxes
      GET
    • Buy Pre Warm Inboxes
      POST
  • Domain
    • Get Domains
      GET
    • Get Domain Masking
      GET
    • Get Purchased Domains
      GET
    • Buy Domains
      POST
    • Search Domains
      POST
    • Suggest Domains
      POST
    • Update Sender Name
      POST
    • Update Domain Name
      POST
    • Update Domain Redirect
      POST
    • Update Domain Masking
      POST
  • Package
    • Calculate Package
      POST
    • Get Packages
      GET
  • Order
    • Get Orders
      GET
    • Get Order Details
      GET
    • Cancel Order
      DELETE
    • Create Order
      POST
    • Create Custom Order
      POST
    • Update Order Tag
      PATCH
    • Cancel Domains
      POST
  • Mailboxes
    • Get Mailboxes
  • Stats
    • Get Reporting Stats
  1. Order

Cancel Domains

POST
https://server.scaledmail.com/api/v1/orders/{order_id}/cancel-domains
Cancel one or more domains of an order without cancelling the whole order.
The domains and their inboxes keep working until the end of the current paid period, then they are removed.
Your monthly price goes down from the next invoice. There is no refund for the current period.
All or nothing: if one domain can't be cancelled, nothing is cancelled.
An order must keep at least one domain. To cancel every domain, cancel the whole order instead with
DELETE /api/v1/orders/{order_id}.

Authentication#

Send your API key as a Bearer token. The key needs write access, and the key's user must be an owner or admin of the
workspace.
Authorization: Bearer YOUR_API_KEY

Path and query parameters#

NameInRequiredDescription
order_idpathYesThe order ID (sub_...), as returned by GET /api/v1/orders (id).
organization_idqueryYesYour workspace ID.

Body#

FieldTypeRequiredDescription
domainsarray of stringsYesDomain names on this order to cancel. 1 to 20 names per call. Not case-sensitive; duplicates are ignored.
All domains in one call must belong to the order in the URL. To cancel domains of several orders, make one call per order.

Example request#

Response 200 OK#

{
  "success": true,
  "message": "2 domains will be cancelled on 2026-12-01.",
  "cancel_at": "2026-12-01",
  "domains": ["demo-domain-1.com", "demo-domain-2.com"],
  "monthly_amount_before": 300,
  "monthly_amount_after": 240
}
FieldDescription
cancel_atThe day the domains and their inboxes are removed (end of the paid period).
domainsThe domains that will be cancelled.
monthly_amount_beforeMonthly price of the order before this change, in USD.
monthly_amount_afterMonthly price of the order after this change, in USD.

Errors#

Every error has this shape:
{
  "error": "domains_not_found",
  "message": "Some domains are not on this order or are already being cancelled. Nothing was cancelled.",
  "isAuthError": false,
  "details": { "domains": ["demo-domain-9.com"] },
  "requestId": "..."
}
StatuserrorWhen
400domains_requireddomains is missing, empty, or has an entry that is not a domain name.
400too_many_domainsMore than 20 domains in one call. Split them over several calls.
400domains_not_foundOne or more names are not on this order, or are already being cancelled. details.domains lists them. Nothing was cancelled.
400nothing_leftThe list holds every remaining domain of the order. Cancel the whole order with DELETE /api/v1/orders/{order_id}.
400cancellingThe order is already cancelled or being cancelled.
400order_form_pendingThe order form of this order has not been sent yet.
400contact_supportThis order can't be changed through the API (for example, billed every 3, 6 or 12 months, or not paid by card). Contact support.
403not_allowedYour role in this workspace can't cancel domains. Ask an owner or admin.
404subscription_not_foundNo order with this ID in this workspace.
409busyAnother change to this order is running. Try again in a moment.
429rate_limitedToo many requests. Write calls are limited to 40 per minute; wait for the Retry-After seconds.
500payment_unclearOur payment provider gave no clear answer. Our team was notified and will check the order. Do not try again.
500server_errorSomething went wrong on our side. Check the order with GET /api/v1/orders/{order_id} before you try again.
503payments_unavailablePayments are not available right now. Try again later.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params

Query Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://server.scaledmail.com/api/v1/orders//cancel-domains?organization_id=undefined' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'
Response Response Example
{}
Modified at 2026-11-02 12:12:57
Previous
Update Order Tag
Next
Get Mailboxes
Built with