Restore a post from the trash
POST
http://localhost:4000/api/v1 /posts/trash/{id}/restore to: "draft" (the default) restores it as a draft that keeps its planned time. to: "original" schedules it again at the time it had (needs posts:publish, and passes the approval, plan and rule checks of POST /posts); a time that has passed restores as a draft. A post that was already published or failed comes back as that record, whatever to says. Channels and tags deleted meanwhile are left out.
Parameters
idstring
path
required
Request body
application/json
tostring
{
"to": "draft"
}Code samples
cURL
curl -X POST "http://localhost:4000/api/v1/posts/trash/{id}/restore" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"draft"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 OK
Example
{
"id": "string",
"status": "draft"
}Schema
idstring
required
statusstring
required
Updated