Review before publishing
Changes nothing. Which build would go live, whether it is the latest draft, what blocks it, and expected_generation to send to publishSite so only THIS reviewed state is published.
GET/v1/sites/{site_id}/publish/review
Requires sites:read. Changes nothing.
Call this before every publish and show the person what it returned. Send expected_generation to Publish a build so that only this reviewed state goes live.
A build cannot be published while blockers is not empty. Each blocker has a code and a message: guest_site, site_unavailable, plan_required (the site is a draft: publishing needs the Site plan), no_build, build_not_ready, origin_changed, manual_check (this version waits for a quick check on our side: there is nothing to fix) or older_than_draft. See How a site goes live.
warnings never block. Read them before publishing: sample_text names, with file and line, any sample text left, such as Lorem ipsum.
Authorizations
Authorizationbearerin headerrequiredPath parameters
site_idstringrequiredThe site's id, or its slug (the address before .atelier201.page).
Query parameters
build_idstring<uuid>pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$allow_older_buildbooleanReview a build older than the draft as one you mean to put live (older_than_draft is then a warning, not a blocker).
Response
Review before publishing
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_credits
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required
errorobjectrequiredrequest_idstringrequiredPossible codes: resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: conflict, result_not_ready, idempotency_key_reused
errorobjectrequiredrequest_idstringrequiredPossible codes: result_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large_for_plan
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired