Skip to main content
Delete Entity
Requires the entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.
Deletes an entity and its associated data. Only the entity’s author may delete it: with their own access token, or with a service key naming them in actingUserId — the request then runs exactly as theirs. An entity with no author belongs to your app: only a service key naming nobody may delete it, and a user token gets 403. A draft with no author is answered as not found (404 entity/not-found) for every caller. Deleting a published entity takes back the author’s reputation for creating it, once: not for a draft, and not again for one already soft-deleted. Authentication required. The author may delete their own entity even after losing read access to its space, or while banned there. Anyone else gets 404 entity/not-found for an entity in a space they can’t read, the same as a missing entity, and 403 otherwise. Deletion behavior depends on your project’s entityDeletion settings:
  • Hard delete (default): The entity and all its files are permanently removed.
  • Soft delete: The entity is marked as deleted but retained in the database. File preservation is configurable separately. Files a soft-deleted entity keeps belong to nothing: their owner can delete them with Delete File.

Path Parameters

string
required
The UUID of the entity to delete.

Query Parameters

string
Service key only: the user this delete acts as. Required when the entity has an author: name the author, and the request runs exactly as their own access token’s (naming anyone else gets what their token gets, 403). Leave it out only for an app-owned entity (no author). A user token always acts as its own user and must not send it, and neither may a request with no credentials (400 entity/acting-user-not-allowed).

Response

Returns 204 No Content on success. A hard delete removes the entity’s reports with it; a soft delete keeps them and closes the open one (status: "auto-closed").

Error Responses

The entity doesn’t exist, or the caller isn’t its author and can’t read its space.
Returned when the entity record exists but could not be deleted (e.g., it was already soft-deleted).
The caller isn’t the author, and can read the entity.
A service key sent no actingUserId for an entity that has an author. Name the author: the request then runs exactly as their own.
A user token, or a request with no credentials, 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.
Returned when a service key names an actingUserId that isn’t a user in this project.