Deleted Media

Restore Deleted Media

Changed on

Restores one or more soft-deleted media. By default each media returns to the folder it was deleted from; pass folder_id to restore them into a specific folder instead. Only media still inside the restore window can be recovered. The restore runs asynchronously and the response includes a background job status.

Requires api token with one of the following permissions

Upload and view media

Tokens with the "Act with a team member's permissions" permission (all:delegate_to_contact_permissions scope) can also be used. Requests made with such a token are authorized using the permissions of the contact assigned to the token.

An expiring access token created with the all:delegate_to_contact_permissions scope and an account authorization granting the manage-deleted-media permission can also be used. Only the media the token's media authorizations name are restored, and folder_id also requires the upload permission on that folder.

post/deleted_media/restore

Request

  • Base URL
    https://api.wistia.com/modern
  • URL
    https://api.wistia.com/modern/deleted_media/restore
  • Auth
    HTTP bearer

Headers

X-Wistia-API-Versionstring required

Request body

media_hashed_idsstring[] required

The hashed ids of the soft-deleted media to restore. Up to 1000 at a time.

folder_idstring

Optional hashed id of the folder to restore the media into. If omitted, each media returns to the folder it was deleted from.

Example request

{
  "folder_id": "folder123"
}

Response

Restore request accepted and queued for processing.

messagestring

Example response

{
  "message": "Restoring 3 media.",
  "background_job_status": {
    "status": "queued"
  }
}

Changes