Skip to content

Restore a deleted collection

POST
/admin/collections/{id}/restore

Takes a collection out of the trash. Whoever deleted it can restore it, and holders of system.admin can restore any deleted collection.

A collection whose deleter isn’t recorded can be restored only with system.admin. Owning the collection isn’t enough if someone else deleted it, and neither is collections.admin; despite the route, restoring your own deletion needs no admin capability.

A collection that isn’t deleted, or doesn’t exist, answers 404, and 403 means you can’t restore it. Restoring clears deleted_at and deleted_reason and sets a new updated_at; the recorded deleter stays. The collection comes back with its posts, grants, field values and settings as they were.

An admin.collection.restored audit event is recorded on a best-effort basis. No activity is recorded, so servers that received the deletion aren’t told. Once the background job has removed a collection for good, it can’t be restored.

id
required
string format: uuid

The collection’s id.

The collection is back.

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed