Trash
Restore posts
Takes up to 100 posts out of the trash.
POST
/
trash
/
restore
Restore posts
curl --request POST \
--url https://api.postploy.com/public/v1/trash/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"3f6c2a1b-9d8e-4f7a-b6c5-d4e3f2a1b0c9"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['3f6c2a1b-9d8e-4f7a-b6c5-d4e3f2a1b0c9']})
};
fetch('https://api.postploy.com/public/v1/trash/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.postploy.com/public/v1/trash/restore"
payload = { "ids": ["3f6c2a1b-9d8e-4f7a-b6c5-d4e3f2a1b0c9"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"restored": true
}
}{
"statusCode": 400,
"message": "Scheduled date and time must be in the future",
"errors": [
{
"message": "Scheduled date and time must be in the future",
"path": [
"posts",
0,
"scheduledAt"
],
"cause": "custom"
}
],
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/posts"
}{
"statusCode": 401,
"message": "Invalid API key",
"errors": null,
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/accounts"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}⌘I
Restore posts
curl --request POST \
--url https://api.postploy.com/public/v1/trash/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"3f6c2a1b-9d8e-4f7a-b6c5-d4e3f2a1b0c9"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['3f6c2a1b-9d8e-4f7a-b6c5-d4e3f2a1b0c9']})
};
fetch('https://api.postploy.com/public/v1/trash/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.postploy.com/public/v1/trash/restore"
payload = { "ids": ["3f6c2a1b-9d8e-4f7a-b6c5-d4e3f2a1b0c9"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"restored": true
}
}{
"statusCode": 400,
"message": "Scheduled date and time must be in the future",
"errors": [
{
"message": "Scheduled date and time must be in the future",
"path": [
"posts",
0,
"scheduledAt"
],
"cause": "custom"
}
],
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/posts"
}{
"statusCode": 401,
"message": "Invalid API key",
"errors": null,
"timestamp": "2030-01-10T12:00:00.000Z",
"route": "/public/v1/accounts"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"errors": [
{
"message": "<string>",
"path": [
"<string>"
],
"cause": "<string>",
"code": "<string>",
"platform": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z",
"route": "<string>"
}