Add the power of the Box AI API to your custom apps at Content Cloud Summit on May 15

Learn more and register!

Restore Web Link

Restore Web Link

To restore a web link that has been moved to the trash, but has not yet been purged, make a POST request to the /web_links/:web_link_id endpoint. This will place the web link in the original parent folder if it is still available, you optionally can specify a parent folder.

cURL
curl -i -X POST "https://api.box.com/2.0/web_links/12345" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Python
web_link_to_restore = client.web_link(web_link_id='33333')
restored_web_link = client.trash().restore_item(web_link_to_restore)
print(f'Web link ID is {restored_web_link.id} and name is {restored_web_link.name}')