---
title: "Delete a codespace for the authenticated user"
method: DELETE
path: "/user/codespaces/{codespace_name}"
tags: ["codespaces"]
---

# Delete a codespace for the authenticated user

`DELETE /user/codespaces/{codespace_name}`

Deletes a user's codespace.

OAuth app tokens and personal access tokens (classic) need the `codespace` scope to use this endpoint.

## Path parameters

- `codespace_name` string, required

## Response `202`

Accepted

- object

## Other responses

- `304` — Not modified
- `401` — Requires authentication
- `403` — Forbidden
- `404` — Resource not found
- `500` — Internal Error

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
