Skip to main content
Delete Event
Deletes an event. Allowed for the event’s owner (also when they are no longer an active member of its space) and for an active admin or moderator of the event’s space. Other hosts can’t delete an event that has an owner. When the owner’s account was deleted, any of its hosts may delete it — for an event in a space, only while an active member of that space (an event kept after the spaces bundle was uninstalled counts as having no space here). A service key acts as the user it names in actingUserId, with that user’s powers. The event’s child EventRsvps and EventInvites are cleaned up, and—depending on settings—its files. Deletion honors the project’s eventDeletion settings:
  • softDelete (default false) — when true, the event is soft-deleted (a deletedAt timestamp is set) and drops out of listings while the row is retained.
  • preserveFilesOnSoftDelete (default true) — on a soft delete, keep the event’s files. The kept files, its cover included, then belong to nothing: each file’s owner can delete it with Delete File. On a hard delete, files are always removed.

Path Parameters

string
required
UUID of the event to delete.

Query Parameters

string
Required with a service key: the user this request acts as. It has exactly that user’s powers, so it is refused unless they are the event’s owner, an active admin or moderator of its space, or (on an event with no owner) one of its hosts, and it is recorded as theirs. A user token always acts as its own user and must not send it (400 event/acting-user-not-allowed).

Response

Returns 204 No Content on success.

Error Responses

A service key sent no actingUserId.
actingUserId is not a user id.
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 and every other field in the query string.
Returned when a service key names an actingUserId that isn’t a user in this project.
The event doesn’t exist, or the caller can’t see it and isn’t one of its hosts.
The caller isn’t the owner or an admin or moderator of the event’s space (other hosts included), and the event has an owner — or the event has no owner and the caller isn’t one of its hosts.
On an event with no owner, the caller is a host, but the event is in a space they aren’t an active member of, or they are banned in it or a space above it. One body for every case.
See also: useDeleteEvent