restore_site
Restore a deleted or expired page at the same URL, keeping its ID, token, and read history so previously shared links work again. Works within 30 days and without using a new page slot.
Instructions
Put a page back at the same URL after it was deleted or ran out of time. Same id, same token, same slug, same read history, so every link already sent starts working again. Call this, and never publish_html, whenever update_site, set_expiry, set_password or another settings call answers 409 site_deleted: publishing the page again mints a different URL, strands everyone holding the old one, and spends another of the free plan's three lifetime pages, while a restore spends none of them. Works only inside the 30 days after the page stopped serving, and only for a page its owner deleted or one that expired. A page taken down for abuse is not restorable, and neither is one past its window: both answer 404 with the same body, deliberately. IT IS A RESCUE, NOT A RENEWAL. Read expires_at and restored_for off the response and tell the user that date: restored_for "grace" means the page had run out of time and comes back for 48 hours rather than a fresh full lifetime, while "plan" means it got the normal window for the plan. A 402 plan_site_limit_exceeded means the account is at its live-page limit: take another page down or upgrade, and this one stays restorable until its deadline either way. If a retry answers 404, do not assume the page is gone: call get_site first, because the earlier attempt may have succeeded and a restored page is no longer restorable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id_or_slug | Yes | Site id, slug, or unlisted token. All three still resolve while the page is down. |