POST

Restore From Trash Bin


Restores a deleted draft post from the trash bin by the provided ID.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Blog
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/blog/v3/draft-posts/trash-bin/{draftPostId}/restore

Path Params
draftPostIdstringRequired

Draft post ID.

Response Object
draftPostDraftPost

Restored draft post info.

Restore From Trash Bin Example 1
Request
cURL
curl -X POST \ 'https://www.wixapis.com/blog/v3/draft-posts/trash-bin/996cb649-d428-405d-b9ed-4facd46e2443/restore' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>' \
Response
JSON
{ "draftPost": { "id": "996cb649-d428-405d-b9ed-4facd46e2443", "title": "Places to visit in Europe", "featured": false, "categoryIds": [], "memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a39", "hashtags": [], "commentingEnabled": true, "minutesToRead": 0, "tagIds": [], "relatedPostIds": [], "pricingPlanIds": [], "language": "en", "changeOrigin": "AUTO_SAVE", "contentId": "622f285f7952527f485bc138", "editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691", "status": "UNPUBLISHED", "mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37", "hasUnpublishedChanges": true, "editedDate": "2022-03-14T11:34:55.121Z", "seoData": { "tags": [] }, "seoShowInSearch": true, "seoShowSnippetInSearch": true, "slugs": [], "createdDate": "2022-03-14T11:34:55.121Z" } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?