Skip to main content

Claim an Anonymous Site

Transfer ownership of an anonymous site to your account, making it permanent. When you publish without an API key, the site is anonymous and expires in 24 hours. The response includes a claimToken that you can use later to claim the site.
POST /api/v1/publish/:slug/claim

Path Parameters

slug
string
required
The slug of the anonymous site to claim.

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
AuthorizationYesBearer sh_live_... — you must be authenticated to claim a site

Request Body

claimToken
string
required
The claim token from the original anonymous publish response.

Example

curl -X POST https://simplehost.dev/api/v1/publish/bright-canvas-a7k2/claim \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sh_live_your_key_here" \
  -d '{"claimToken": "550e8400-e29b-41d4-a716-446655440000"}'

Response (200)

{
  "slug": "bright-canvas-a7k2",
  "siteUrl": "https://bright-canvas-a7k2.simplehost.dev/",
  "owner": "you@example.com",
  "message": "Site claimed successfully! It is now permanent and linked to your account."
}
After claiming, the site:
  • No longer expires
  • Appears in your site list
  • Can be updated and managed like any other site

Errors

StatusCodeReason
401UNAUTHORIZEDInvalid or missing API key
404NOT_FOUNDSite not found
400INVALID_REQUESTInvalid claim token
400INVALID_REQUESTSite has already been claimed
400INVALID_REQUESTSite has expired