Save many entries
Up to 200 entries across collections in one history entry: an import or a clean-up. Validated as a whole: if one is refused, nothing is written and the 400 lists every entry to fix. New entries of collections with a draft field start as drafts.
POST/v1/sites/{site_id}/content:batch
Requires sites:write. Costs no credits. The path ends in /content:batch. Changes the draft only. Visitors see nothing until you publish.
For an import or a clean-up. changes holds 1 to 200 items, each with a collection and a slug (lowercase letters, digits and hyphens). Give data for the fields and body for the Markdown of a content collection (at most 500000 characters), or delete: true to remove the entry. summary, at most 200 characters, is the sentence in the history.
The batch is validated as a whole. If one change is refused, nothing is written and the 400 lists every entry to fix, so you correct them all in one pass. On success it is one history entry, and the response gives the saved and deleted counts. A new entry in a collection with a draft field starts as a draft.
To change a single entry, use Create or update an entry, which also offers create_only and expected_hash.
Authorizations
Authorizationbearerin headerrequiredPath parameters
site_idstringrequiredThe site's id, or its slug (the address before .atelier201.page).
Body
application/jsonrequiredsummarystringlength: ≤ 200 charsOne sentence for the history.
changesobject[]requireditems: 1–200 itemsResponse
Create, update or delete many entries
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