Palbase Machines · API
/sites/{name}/previews/linksMake a share link of a site's previews
Makes a link that opens the site's protected previews to anyone holding it, for 1 to 30 days (7 when none): its token is in the answer alone. 20 at most (too_many_links, 409).
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
namestring · optionaldaysinteger · optionalDays it opens the previews; 7 when none.curl -X POST "https://<your-ref>.palbase.studio/sites/<name>/previews/links" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"name":"string","days":1}'Responses
201The link, with its token
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
409The project already has a machine of this name, or has as many machines as it may
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 CreatePreviewLink of machines's contract.