# cancelSubscription

```graphql
mutation CancelSubscription {
  cancelSubscription {
    id
    status
    expiresAt
    canceledAt
  }
}
```

Schedule the paid subscription of an account to end with its current billing period; returns the canceled subscription. Requires account.billing.manage.

## Responses

| Status | Description                                               |
| ------ | --------------------------------------------------------- |
| 200    | The CancelSubscriptionPayload in data.cancelSubscription. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation CancelSubscription {\n  cancelSubscription {\n    id\n    status\n    expiresAt\n    canceledAt\n  }\n}"
}'
```

## Example response

```json
{
  "data": {
    "cancelSubscription": {
      "id": "string",
      "status": "string",
      "expiresAt": "string",
      "canceledAt": "string"
    }
  }
}
```
