Commit the workspace
Saves every uncommitted change of the workspace as ONE history entry, through the commit guard (no secrets, no .env, no server code, valid JSON). Nothing to commit: changed is false.
POST/v1/sites/{site_id}/workspace:commit
Requires sites:write. Costs no credits. The path ends in /workspace:commit. Changes the draft only. Visitors see nothing until you publish.
All the workspace’s uncommitted changes become one history entry, whatever the number of files. summary is required, at most 500 characters: one sentence on what the change does, which is what people read in the history.
The same commit guard applies as for every other change. A secret, a .env file, server code or invalid JSON is refused with 400 and the reason, and nothing is saved: fix the file in the workspace and commit again. Every finding is listed at once, with its file and line.
A file the project’s .gitignore lists (a .env.local, a key file) is never part of a commit, so it is never refused either: it is left out. When such a file looks like a secret, the answer names it in not_committed with a warning: it was not saved, never reaches the site, and is gone when the workspace restarts.
With nothing uncommitted, the call succeeds with changed: false and no new entry. Otherwise revision is the new entry, parent the one before it and changes the paths it touched. If another change landed on the draft in the meantime, your edits are carried over and note says so.
Next, start a build to see it in a preview.
Authorizations
Authorizationbearerin headerrequiredPath parameters
site_idstringrequiredThe site's id, or its slug (the address before .atelier201.page).
Body
application/jsonrequiredsummarystringrequiredlength: 1–500 charsWhat the change does, in a sentence: the history entry people read.
Response
Commit the workspace's changes
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