---
title: "destroy"
method: DELETE
path: "/api/v1/repos/{user_id}/{repo}/master_tokens/{id}"
tags: ["master_tokens"]
---

# destroy

`DELETE /api/v1/repos/{user_id}/{repo}/master_tokens/{id}`

Destroy a master token and all of its read token children.

NOTE: Default tokens have their token value rotated when used with this
API. All private repositories must have default master tokens.

**Example request:**

```
curl -X DELETE https://packagecloud.io/api/v1/repos/username/reponame/master_tokens/1
```

## Path parameters

- `user_id` string, required
- `repo` string, required
- `id` integer, required

## Response `204`

Successful response

## Changes

- **2026-06-09** `5591e5a92d9e` — 1 breaking
  - removed the media type `application/json` for the response with the status `204`

[Change history](https://skmtc.dev/cstrahan/apis/packagecloud-api/changes/api/v1/repos/:user_id/:repo/master_tokens/:id/delete.md)

---

[API](https://skmtc.dev/cstrahan/apis/packagecloud-api.md) · [All operations](https://skmtc.dev/cstrahan/apis/packagecloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cstrahan/packagecloud-api/revisions/9744ac4cffc2/schema)
