Orders

Cancel order

Cancel an order at the end of the paid period. Everything keeps working until cancel_at.

POSThttps://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

  • idstringrequired

    The order id (ord_...).

Headers

  • Authorizationstringrequired

    Bearer <your API token>. Tokens start with sm_live_.

  • Workspacestringrequired

    The workspace id to act on (from GET /workspaces or Settings › API tokens). Required on every call except the /workspaces calls; without it: 400 workspace_required.

Body

  • reasonenumoptional

    Why you cancel. Default other, so a call without reason needs feedback.

    One of: too_expensive not_using deliverability moving other

  • feedbackstringoptionalat most 1000 characters

    A few words for us, at most 1000 characters. Required (at least 3 characters) when reason is other or left out.

Response (200)

  • idstringrequired

    The order (ord_...).

  • status"cancelling"required

    The order runs until cancel_at, then becomes cancelled.

  • domain_countintegerrequired

    Domains that end with the order.

  • cancel_atstringrequired

    The day the order ends (YYYY-MM-DD): the end of the paid period.

Responses

  • 200OK. The order will end at cancel_at.
  • 400Invalid input. reason is other or left out, and feedback has fewer than 3 characters (feedback_required). An unknown reason or feedback over 1000 characters: validation_failed.
  • 403Not allowed. The token does not have the orders:write scope (missing_scope) or can't use this workspace (workspace_not_allowed), or the person who made the token is no longer an owner or admin of the workspace (role_not_allowed).
  • 404Not found. No order with this id in this workspace (order_not_found). An order of another workspace looks the same.
  • 409Not active. The order is already cancelling or has ended (order_not_active), or another change to it is running (order_busy: try again in a moment).
  • 422Billed by invoice. The order can't be changed through the API (order_billed_manually): 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.
  • 409Can't cancel. The cancel could not be scheduled (order_not_cancellable). Contact support.
  • 429Rate limited. More than 60 write calls in a minute with this token (rate_limited). Wait for the Retry-After seconds.
  • 503Not available. Payments are not available right now (not_available), or the server is busy (busy, with Retry-After). Nothing changed; try again later.

Like every call, it can also answer 401 (bad key), 400 workspace_required, 403 workspace_not_allowed. See Errors.