Delete a collection
DELETE /collections/{id}
Moves a collection to the trash. Its posts, sharing grants, field values and featured placements stay attached, so restoring it brings them back.
It drops out of lists and reads at once, except that holders of
system.admin can still open it, and can list it with
include_deleted=true when it’s public, theirs or shared with
them. The owner may delete it, and so may holders of
collections.admin or system.admin granted globally. A sharing
grant doesn’t count, whatever its permission. A collection that
doesn’t exist or is already deleted answers 404, and anyone else
gets 403. You’re recorded as the deleter, which is what lets you
restore it later with POST /admin/collections/{id}/restore.
The deletion and a delete activity are saved together. An
admin.collection.soft_deleted audit event is then recorded, and
cached copies are dropped, both on a best-effort basis. Deleted
collections are removed for good by a background job once they are
older than the retention period, 30 days by default, together with
their memberships, grants and field values. The job runs in daily
batches, so it can come well after the retention period.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The collection’s id.
Request Body
Section titled “Request Body ”Optional body for a delete. Send nothing, or {}, to delete without
a reason.
object
Why it was deleted, stored as deleted_reason. Surrounding spaces
are trimmed, an empty reason counts as none, and more than 500 bytes
after trimming gets 400.
Responses
Section titled “ Responses ”The collection is in the trash.
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completedResource not found
object
Human-readable error summary
Example
the request could not be completed