Skip to content

Soft-delete a collection

DELETE
/collections/{id}

Soft-delete. Sets deleted_at = NOW() + deleted_reason from the optional body; the row remains for the operator recovery window (default 30 days per sysconfig.soft_delete.collection_retention_days) before the nightly gc coordinator hard-deletes it. Cascades to collection_resources fire on the eventual hard delete.

Prior behaviour was HARD delete; the flip is unconditional (no grace flag) per pre-release practices.

id
required
string format: uuid

Optional body on DELETE endpoints that soft-delete an entity. The reason free-text string is captured verbatim into the entity’s deleted_reason column so admin recovery-window audits carry operator context.

The body itself is optional — a bare DELETE with no body is still valid + writes deleted_reason = NULL. When present, an empty-string reason is treated the same as missing.

object
reason

Free-text explanation of why the entity was deleted. Max 500 characters; validated at the handler.

string
<= 500 characters

Deleted

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

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