DELETE /api/v1/orders/{order_id}.Authorization: Bearer YOUR_API_KEY| Name | In | Required | Description |
|---|---|---|---|
order_id | path | Yes | The order ID (sub_...), as returned by GET /api/v1/orders (id). |
organization_id | query | Yes | Your workspace ID. |
| Field | Type | Required | Description |
|---|---|---|---|
domains | array of strings | Yes | Domain names on this order to cancel. 1 to 20 names per call. Not case-sensitive; duplicates are ignored. |
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
}| Field | Description |
|---|---|
cancel_at | The day the domains and their inboxes are removed (end of the paid period). |
domains | The domains that will be cancelled. |
monthly_amount_before | Monthly price of the order before this change, in USD. |
monthly_amount_after | Monthly price of the order after this change, in USD. |
{
"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": "..."
}| Status | error | When |
|---|---|---|
| 400 | domains_required | domains is missing, empty, or has an entry that is not a domain name. |
| 400 | too_many_domains | More than 20 domains in one call. Split them over several calls. |
| 400 | domains_not_found | One or more names are not on this order, or are already being cancelled. details.domains lists them. Nothing was cancelled. |
| 400 | nothing_left | The list holds every remaining domain of the order. Cancel the whole order with DELETE /api/v1/orders/{order_id}. |
| 400 | cancelling | The order is already cancelled or being cancelled. |
| 400 | order_form_pending | The order form of this order has not been sent yet. |
| 400 | contact_support | This order can't be changed through the API (for example, billed every 3, 6 or 12 months, or not paid by card). Contact support. |
| 403 | not_allowed | Your role in this workspace can't cancel domains. Ask an owner or admin. |
| 404 | subscription_not_found | No order with this ID in this workspace. |
| 409 | busy | Another change to this order is running. Try again in a moment. |
| 429 | rate_limited | Too many requests. Write calls are limited to 40 per minute; wait for the Retry-After seconds. |
| 500 | payment_unclear | Our payment provider gave no clear answer. Our team was notified and will check the order. Do not try again. |
| 500 | server_error | Something went wrong on our side. Check the order with GET /api/v1/orders/{order_id} before you try again. |
| 503 | payments_unavailable | Payments are not available right now. Try again later. |
curl --location 'https://server.scaledmail.com/api/v1/orders//cancel-domains?organization_id=undefined' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{}