Skip to main content
Delete Space
Permanently deletes a space. All entities, members, child spaces, rules, and reports belonging to the space are also deleted. Only the space’s creator (the original owner) can perform this action, and not while they are banned from the space or from a space above it. A service key must name the user it acts as in actingUserId; the request then behaves exactly as that user’s own token.
This operation is irreversible. All associated data including child spaces will be permanently deleted.

Path Parameters

string
required
UUID of the space to delete.

Query Parameters

string
Required with a service key: the user this request acts as. The request behaves exactly as that user’s own token, so it is refused unless they created the space and are not banned from it or from a space above it. Sent in the query; a request with a body is refused (400 space/body-not-allowed). A user token always acts as its own user and must not send it (400 space/acting-user-not-allowed).

Response

string
Confirmation message: "Space deleted successfully."

Error Responses

Returned when spaceId isn’t a valid UUID. Checked before sign-in, permissions and the endpoint’s other checks.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
The request carried a body. A DELETE takes no body: send actingUserId in the query string.
Returned when a service key names an actingUserId that isn’t a user in this project.
actingUserId is not a user id.
A service key sent no actingUserId in the query.
The space doesn’t exist, or the caller didn’t create it and can’t see it (see Space visibility).
The caller (or the user named by actingUserId) did not create the space.
The creator (or the user named by actingUserId) is banned from the space, or from a space above it.
See also: useDeleteSpace