Skip to content

Restore a deleted post

POST
/admin/posts/{id}/restore

Undoes a post’s soft deletion, clearing the deletion time and reason. Whoever deleted the post can restore it, and holders of system.admin can restore any deleted post, including one whose deleter isn’t recorded. Being the author isn’t enough if someone else deleted it, and despite the route, restoring your own deletion needs no admin capability.

A post that isn’t deleted, or doesn’t exist, is 404. Restoring doesn’t change whether the post is a draft and sends no federation activity, so servers that received the deletion aren’t told. An audit entry is recorded on a best-effort basis. A post can be restored only until the retention job removes it for good.

id
required
string format: uuid

The post’s id.

The post was restored.

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