---
title: "Cancel team subscription"
method: DELETE
path: "/api/v3/teams/{team_id}/subscriptions/{subscription_id}"
tags: ["Billing"]
---

# Cancel team subscription

`DELETE /api/v3/teams/{team_id}/subscriptions/{subscription_id}`

## Request

- Base URL: `https://codemagic.io`
- URL: `https://codemagic.io/api/v3/teams/{team_id}/subscriptions/{subscription_id}`
- Auth: API key in header `x-auth-token`
- TypeScript: <https://skmtc.dev/codemagic/apis/codemagic-api/docs/api/v3/teams/:team_id/subscriptions/:subscription_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `subscription_id` string, required
- `team_id` string, required

## Response `202`

Request accepted, processing continues off-line

## Other responses

- `400`: The request could not be validated
- `401`: Authentication is missing or invalid
- `403`: The caller lacks the required permission
- `404`: The requested resource does not exist
- `409`: Subscription cannot be cancelled.
- `422`: Cancellation is not supported for this subscription.
- `429`: The rate limit has been exceeded

---

[API](https://skmtc.dev/codemagic/apis/codemagic-api.md) - [All operations](https://skmtc.dev/codemagic/apis/codemagic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/codemagic/apis/codemagic-api/revisions/be09630f65e2?raw)
