Publish a build
VISIBLE ON THE INTERNET. Only a site on the Site plan can be published: a draft is refused with 403 feature_not_available and an action_url to its plan. Makes this exact build (or, without build_id, the draft as it is now, built first when needed) what visitors see on every address of the site, within about a minute. Refused with 409 if the site was published, rolled back or taken offline since your review (expected_generation). Requires sites:publish.
POST/v1/sites/{site_id}/publish
Requires sites:publish and a workspace admin. Costs no credits.
This is visible on the internet. Publish only after the owner has approved what the review showed. A claim link or a sign-in is not that approval.
If the site was published, rolled back or taken offline since your review (by anyone, you included), the call is refused with 409 conflict and nothing changes. Review again. A build with blockers is refused the same way, with the blockers in details.
Without build_id, the draft as it is now goes live, built first when needed. A build_id older than the draft is refused (older_than_draft) unless you send allow_older_build: true: putting an earlier version live is then a decision, not an accident.
Authorizations
Authorizationbearerin headerrequiredPath parameters
site_idstringrequiredThe site's id, or its slug (the address before .atelier201.page).
Body
application/jsonrequiredbuild_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)$The build to publish. Omit it to publish the draft as it is now: it is built first when needed, which adds a few seconds.
expected_generationintegerrequiredrange: 0–9007199254740991allow_older_buildbooleanRequired to publish a build older than the draft on purpose; otherwise that is refused (older_than_draft).
Response
Publish a build
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