# Record how a cancellation went (requested, canceled, failed)

`POST /accounting/subscriptions/{id}/cancel` · Rivier · accounting

Record how a cancellation went (requested, canceled, failed). Skerry cancels nothing at the provider.

- Scope: accounting:write
- Graphql: Mutation.accountingCancelSubscription
- Sdk: accounting.subscription.cancel
- Cli: accounting subscription cancel

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "outcome": {
      "type": "string",
      "enum": [
        "requested",
        "canceled",
        "failed"
      ],
      "description": "How the cancellation went: asked for, done, or failed. Skerry cancels nothing at the provider."
    },
    "note": {
      "type": "string",
      "maxLength": 500,
      "description": "What happened, in a few words."
    }
  },
  "required": [
    "outcome"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/accounting/subscriptions/{id}/cancel' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "outcome": "requested"
}'
```
