Palbase Machines · API
/sites/{name}/previews/passGive a member a pass to a preview
Makes a pass to the site's previews for the caller — Studio asks for one as a signed-in member comes from a protected preview (the edge sent them there) — and answers where to go with it: to, one of the site's open previews' addresses, with the pass in its query once. 12 hours.
Called by your server, with the project's secret key.
Path
namestring · requiredThe site's name: lowercase letters, digits and dashes, starting with a letter and not ending with a dash, 32 at most.Request body
tostring (uri) · requiredcurl -X POST "https://<your-ref>.palbase.studio/sites/<name>/previews/pass" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"to":"https://example.com"}'Responses
201The pass
400Validation failed or a required field is missing
401Missing or invalid API key
403Not the project's secret key
404The project has no site of this name
429Over the project's request limit, or its machine time for this period is used up
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation CreatePreviewPass of machines's contract.