Restore a post from the trash

Embed
Preview of the card
<a href="https://indrava.forumulate.com/docs/ref-posthistory-trash-restore"><img src="https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/pages/00927ba4-03df-48a9-8e80-228f07a63b0e/social-card.svg?v=3e7ae33eec8b" alt="Restore a post from the trash" width="600" height="315"></a>
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

id
string
path
required

Request body

application/json
to
string
draft | original = draft
{
  "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
id
string
required
status
string
required
draft | pending_approval | scheduled | publishing | published | failed
Updated