Replace the site contents (full re-upload, same URL).
Two body shapes. application/json with an html string is the simplest and mirrors POST /publish, which is what the paid rails already speak: curl -X PUT https://api.stacktr.ee/sites/<id> -H "Content-Type: application/json" -d '{"html":"<!doctype html>..."}'. multipart/form-data with a file field takes everything JSON cannot carry (a zip, a PDF, e2e ciphertext): curl -X PUT https://api.stacktr.ee/sites/<id> -F file=@new.html -H "Authorization: Bearer <key>". Either shape keeps the existing URL while swapping the content, and keeps the site's settings — including its client-space filing — untouched (client/client_path are not accepted here; re-file with PATCH). Replacing a page does not count as a new publish against the Free lifetime cap. Two keyless alternatives, neither of which needs an account: for a page that is still UNCLAIMED, its own claim_token from the publish response is the update credential (Authorization: Claim <claim_token>, described in the claimToken security scheme; works on every rail, and stops working at the claim and at expiry); for a wallet-paid page, the paying wallet is (see walletSignature: challenge from POST /wallet-auth/challenge, then Authorization: Wallet challenge=…,sig=0x…). Either way the URL is unchanged: replacing a page never mints a second one. Send exactly one Authorization scheme per request.
Request
- Base URL: https://api.stacktr.ee
- URL: https://api.stacktr.ee/sites/{idOrSlug}
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.stacktr.ee/oauth/authorize, token URL https://api.stacktr.ee/oauth/token, scopes: sites:write)
- API key in header Authorization
- API key in header Authorization
Request body
Response
Replaced.
Changes
No recorded changes to this operation across all 1 revision of this API.