Apply a site plan
A whole site's content in ONE call: business details, theme and navigation (merged onto the draft), entries, pictures (as images:place takes them) and the name. The starter's sample entries are deleted unless the plan keeps them. Validated together: if any part is refused, nothing is written and the 400 lists every part to fix. One history entry, and the build starts. Free: stock pictures cost no credits. Made for a first version and for a large rework.
POST/v1/sites/{site_id}/plan:apply
Requires sites:write. Costs no credits: stock pictures are free. The path ends in /plan:apply. Changes the draft only. Visitors see nothing until you publish.
The fastest way to write a first version of a site, or to rework one: everything a first version needs, in one request. Read the content model first for the fields.
name: the site’s name in Atelier201.singletons:business,theme,navigation… Each is merged onto what the draft holds, key by key at the top level; a nested group you give (such asheroorcolors) replaces that group.entries: up to 200 entries to create, update or delete, as Save many entries takes them.images: up to 12 pictures, as Put a picture in an image field takes them:target,alt, and one ofquery,stock_idormedia_path. A picture that cannot be found comes back with awarning, and the rest of the plan is still applied.keep_samples: the starter’s sample entries (service-one,service-two) are deleted unless the plan writes them or this istrue.
Everything is validated before anything is written. If any part is refused, nothing is saved and the 400 lists every part to fix, so you correct them all in one pass. On success it is one history entry and the build starts: the response carries build. Review the publish afterwards: it refuses while any of the starter’s sample text is left.
Authorizations
Authorizationbearerin headerrequiredPath parameters
site_idstringrequiredThe site's id, or its slug (the address before .atelier201.page).
Body
application/jsonrequirednamestringlength: 1–80 charsThe site's name in Atelier201 (the business name).
singletonsRecord<string, Record<string, object>>business, theme, navigation...: each merged onto what the draft holds (top-level keys; a nested group given here replaces that group). Fields as get_content_model defines them.
entriesobject[]items: 1–200 itemsEntries to create, update or delete (delete: true), as save_entries takes them, up to 200.
imagesobject[]items: ≤ 12 itemsPictures to put in image fields, as place_image takes them (target, alt, and one of query, stock_id, media_path). A picture that cannot be found is a warning; the rest is still applied.
keep_samplesbooleanKeep the starter's sample entries (service-one, service-two). Default: they are deleted unless the plan writes them.
summarystringlength: ≤ 200 charsOne sentence for the history.
Response
Apply a site plan
dataRecord<string, object>requiredrequest_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