Skip to content

Delete a Copilot Space for a user

DELETE
/users/{username}/copilot-spaces/{space_number}

Deletes a Copilot Space owned by a user. The authenticated user must be the owner of the space.

Warning: This action is permanent and cannot be undone. Deleting a space will remove all associated resources and configurations.

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

API method documentation

username
required
string

The handle for the GitHub user account.

space_number
required
integer

The unique identifier of the Copilot Space.

The Copilot Space has been successfully deleted.

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"
}

Validation failed, or the endpoint has been spammed.

Media type application/json
Validation Error

Validation Error

object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
nullable
Example generated
{
"message": "example",
"documentation_url": "example",
"errors": [
{
"resource": "example",
"field": "example",
"message": "example",
"code": "example",
"index": 1,
"value": [
"example"
]
}
]
}