> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hostrox.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Cancellation Request

> Submit a cancellation request for a service via the API

This action creates a cancellation request for the specified service through the API.

## Method / Endpoint

```text theme={null}
POST {{API_URL}}/order/cancel
```

For Hostrox, the full URL is:

```text theme={null}
POST https://client.hostrox.net/api/reseller/order/cancel
```

## Request parameters

| Name      | Required | Description                                                                                                                                       |
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `key`     | Yes      | API Key                                                                                                                                           |
| `id`      | Yes      | Order ID number                                                                                                                                   |
| `reason`  | Optional | Reason for cancellation                                                                                                                           |
| `urgency` | Yes      | Cancellation priority. Possible values: `period-ending` (cancelled at the end of the current period), `now` (cancelled immediately upon approval) |

## Example cURL request

```bash theme={null}
curl --location 'https://client.hostrox.net/api/reseller/order/cancel' \
  --header 'Content-Type: application/json' \
  --data '{
    "key": "UzZBSlBWeWk0UEcrVWxlU0RjS1B1dz09",
    "id": 1,
    "reason": "Testing",
    "urgency": "now"
  }'
```

## Example JSON response

```json theme={null}
{
  "status": "successful"
}
```
