Orders
Cancel order
Cancel an order at the end of the paid period. Everything keeps working until cancel_.
https://api.scaledmail.com/v2/orders/:id/cancel- Rate limit
- Write: 60 calls per minute per token
Can't be undone through the API, and there is no refund for the current period. To keep fewer domains, use POST /orders/:id/remove-domains.
Path parameters
idstringrequiredThe order id (
ord_).. . .
Headers
AuthorizationstringrequiredBearer <your API token>. Tokens start withsm_.live_ WorkspacestringrequiredThe workspace id to act on (from
GET /workspacesor Settings › API tokens). Required on every call except the/workspacescalls; without it:400workspace_.required
Body
reasonenumoptionalWhy you cancel. Default
other, so a call withoutreasonneedsfeedback.One of:
too_expensivenot_usingdeliverabilitymovingotherfeedbackstringoptionalat most 1000 charactersA few words for us, at most 1000 characters. Required (at least 3 characters) when
reasonisotheror left out.
Response (200)
idstringrequiredThe order (
ord_).. . . status"cancelling"requiredThe order runs until
cancel_, then becomesat cancelled.domain_countintegerrequiredDomains that end with the order.
cancel_atstringrequiredThe day the order ends (
YYYY-MM-DD): the end of the paid period.
Responses
- 200OK. The order will end at
cancel_.at - 400Invalid input.
reasonisotheror left out, andfeedbackhas fewer than 3 characters (feedback_). An unknownrequired reasonorfeedbackover 1000 characters:validation_.failed - 403Not allowed. The token does not have the
orders:writescope (missing_) or can't use this workspace (scope workspace_), or the person who made the token is no longer an owner or admin of the workspace (not_ allowed role_).not_ allowed - 404Not found. No order with this id in this workspace (
order_). An order of another workspace looks the same.not_ found - 409Not active. The order is already cancelling or has ended (
order_), or another change to it is running (not_ active order_: try again in a moment).busy - 422Billed by invoice. The order can't be changed through the API (
order_): it is not paid by card (for example billed by invoice), is billed every 3, 6 or 12 months, or its price is set by support. Contact support.billed_ manually - 409Can't cancel. The cancel could not be scheduled (
order_). Contact support.not_ cancellable - 429Rate limited. More than 60 write calls in a minute with this token (
rate_). Wait for thelimited Retry-Afterseconds. - 503Not available. Payments are not available right now (
not_), or the server is busy (available busy, withRetry-After). Nothing changed; try again later.
Like every call, it can also answer 401 (bad key), 400 workspace_, 403 workspace_. See Errors.
