Stats

Restore a deleted site from the trash

Admin-only. Recreates the site with its original id (so its analytics re-attach) and settings, under the original name or the one given, and copies its files back. The site comes back switched off with no renewal dates — or suspended, if it was suspended for abuse. The account may go past its site limit; overSlotLimit says so. The trash entry is then removed. Records a site.restored_from_trash activity.

post/stats/deleted-sites/{id}/restore

Request

  • Base URL: https://api.nippy.host
  • URL: https://api.nippy.host/stats/deleted-sites/{id}/restore
  • Auth: bearer (a scheme the document does not define)

Path parameters

idstring required

The original site UUID

Request body

subdomainstring

The name to restore the site under. Leave it out to use the original name; a new name is needed when the original is taken.

Example request

{
  "subdomain": "my-site-restored"
}

Response

siteIdstring required

The restored site id — the original id.

subdomainstring required
accountIdstring required
status'pending' | 'awaiting_verification' | 'live' | 'inactive' | 'suspended' required

inactive (switched off) — the owner switches it on, which checks the live-site cap. suspended only for a site that was suspended for abuse when it was deleted.

fileCountnumber required

Files copied back.

overSlotLimitboolean required

True when the account now holds more sites than its plan allows. An admin restore is allowed past the cap.

sitesInAccountnumber required

Sites the account holds now.

slotLimitnumber nullable required

The plan’s site limit; null for an unlimited plan.

Changes

No recorded changes to this operation across all 1 revision of this API.