Delete a post
DELETE /posts/{id}
Soft-deletes a post: it leaves feeds, lookups and its own page, but
its record, members and tags are kept and it can be restored. The
author may delete it, and so may holders of posts.admin or
system.admin and holders of posts.admin for the post’s team. A
post that is missing or already deleted is 404. The member assets
and their files aren’t touched.
An optional reason is stored with the deletion; it is trimmed and
may be at most 500 bytes long. The deletion and its federation
activity are written together, also for drafts, and an audit entry
is recorded afterwards on a best-effort basis. Deleted posts are
removed for good by a background job once they are older than the
retention period, 30 days by default.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The post’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 post was deleted.
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