# Request service cancellation

`POST /v1/service/@id/cancel` · scope `services:write`

Send a request to cancel the service.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/service/@id/cancel` |
| Method | `POST` |
| Scope | `services:write` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | `application/json` |
| Tokens that can call it | app tokens (`tinoat_`), personal API tokens (`tinopat_`) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Service ID |
| `immediate` | body | string | no | set to false to terminate service at the end of billing date, true - terminate immediately |
| `reason` | body | string | no | Reason for this request |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/service/100001/cancel" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "immediate": "<immediate>",
  "reason": "<reason>"
}'
```

`$TINO_TOKEN` is a token with the scope `services:write`. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): Python `client.services.cancel(id, id=...)`, Node.js `await client.services.cancel(id, { id: ... });`, PHP `$client->services->cancel($id, ['id' => ...]);`.

## Example response

```json
{
 "info": [
  "cancell_sent"
 ]
}
```

Live sample from a test account with personal data masked; long arrays and strings are trimmed (`… N more item(s)`, `… N more line(s)`).
