Skip to main content
Five calls decide who gets in before or after a site is live. All of them take the usual site_id and optional workspace (see Which workspace), and all of them change something real for visitors, so each answers in two calls:
  1. Send the call without confirmation_id. Nothing changes. You get back state: "confirmation_required", a confirmation_id, and a description of what would happen. Show that to the person approving.
  2. After they approve, send the same arguments again with the confirmation_id. That second call needs a member’s own API key. A service-account key can propose but never approve (see Service accounts).

Make one page members-only

page.set_access makes one page of a site members-only, so only signed-in members of the workspace can open it, or makes it public again. A live site rebuilds and publishes itself with the change. A draft site picks the change up with its next build.

Put a password on a published site

page.set_password puts one shared password in front of a site that is already published. Anyone with the address has to type it to get in.
  • password is 8 to 256 characters. Send exactly what the site owner chose.
  • Setting or changing the password ends every private link and every visitor’s saved unlock at once. Say so when you ask for approval.
  • We store a check value derived from the password, never the password itself.

Take the password off

page.clear_password takes the password off so anyone with the address can read the site. It takes only site_id. It makes the site public, and every private link for it stops working, so say that plainly when you ask for approval.

Let one person past the password

page.mint_access_link makes a private link that lets one person in without knowing the password. It works only on a site that has a password.
  • ttl_minutes is optional. We keep it inside the allowed range; leave it out for the default.
  • The answer carries the whole link and when it expires. It is shown once and can’t be looked up again, so hand it over straight away.
  • Setting or clearing the password ends the link.

Share a version that is not live

A preview link shows a site’s newest build to someone before you publish. It changes no address and publishes nothing. You can reach it two ways:
  • The REST route POST /api/pages/{siteId}/preview-links takes ttlMinutes. See Create a preview link.
  • The tools page.create_preview_link and page.revoke_preview_link do the same through the two-call approval above. To revoke, pass the token (the last part of the link’s address, or the whole address). Nothing stores the token, so it has to come from whoever holds the link. Revoking a link that already expired reports the same success.
The link is shown once and can’t be looked up again.

Where to go next