Skip to content

Delete a codespace from the organization

DELETE
/orgs/{org}/members/{username}/codespaces/{codespace_name}

Deletes a user’s codespace.

OAuth app tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

username
required
string

The handle for the GitHub user account.

codespace_name
required
string

The name of the codespace.

Accepted

Media type application/json
object
Examples
Example default
null

Not modified

Requires authentication

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Internal Error

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}