Sites

Change the address or visibility of a site

Renames a site (slug) and/or switches it between public and unlisted. After a rename the old address redirects (301) to the new one for 90 days, then stays reserved for this project for 30 more days without redirecting, so nobody can grab it right away; after that it is free again. At most 2 old addresses redirect at a time (a new rename stops the oldest), every redirect goes straight to the current address, and a site that is offline, unlisted or deleted has no redirects. A site's address can change at most 3 times per 30 days, and at most 10 times per project per 30 days: past that the answer is 429 rate_limited with retry_at and a user_message that says when it can change again. A connected domain stays on the site, and public tokens keep working on every redirecting address of the same site. unlisted puts the site on a secret link (url in the response, 26 random characters, no name in it): the readable address and old addresses give 404, pages are sent with noindex and no-referrer. A secret link is not a login: anyone who has it can open the site. For real protection set a password as well (PUT /sites/{id}). A site on a domain cannot be unlisted. Four-eyes approval applies, just as for a deploy.

put/sites/{id}/address

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/sites/{id}/address
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: sites:write)

Path parameters

idstring uuid required

The id of the site.

Request body

slugstring

The new address: https://<slug>.hypamoon.app, 3 to 40 characters, lowercase letters, digits and hyphens. The old address keeps redirecting (301) to the new one and stays reserved for this project, so nobody else can take it. A connected domain stays on the site.

visibility'public' | 'unlisted'

public: the site lives at https://<slug>.hypamoon.app. unlisted: the site only lives at a secret link (https://<random>.hypamoon.app, 26 random characters, no name in it), the readable address gives 404, and search engines are told not to index it. A secret link is not a login: anyone who has the link can open the site. For real protection set a password as well.

Response

The site with its new address.

idstring uuid required

The id of the site. Use it to update or delete the site.

slugstring required

The first part of the address: https://<slug>.hypamoon.app.

namestring required

Your name for the site.

urlstring required

Where the site lives: https://<slug>.hypamoon.app, or the secret link when visibility is unlisted.

created_atstring date-time required

When the site was created.

updated_atstring date-time required

When the site or its files last changed.

versionstring required

The version that is live now. Changes on every update; every file on the site carries it as its ETag, so you can check that a page shows this version.

password_protectedboolean required

true when visitors have to enter the site's password first (set with password on POST /sites or PUT /sites/{id}). The password itself is never returned.

testboolean required

true for a site of a test project. It is public all the same.

visibility'public' | 'unlisted' required

public: the site lives at https://<slug>.hypamoon.app. unlisted: url is the secret link (https://<random>.hypamoon.app) and the readable address gives 404.

Changes

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