Stage many content writes and deletes at once
Stages writes and deletes (with their routes and menu items) to the draft in one call. Nothing is live until you publish.
The request is checked as a whole before anything is staged: a bad write, a reserved key, a CSS or JS file or an invalid menu item rejects the lot. Each write carries exactly one of body or bodyStaging. Bodies too big to send inline are uploaded in chunks first and referenced by bodyStaging.
A small changeset answers 200 with what was staged. A large one (many writes or many bytes; the server decides) is queued: the answer is 202 with a job, and you poll GET /api/v1/sites/{slug}/jobs/{id} until it succeeds or fails. A write whose ifMatch no longer matches is not applied and is listed in conflicts, with status 200. With atomic: true one stale ifMatch writes nothing instead, and the answer is 409 changeset_conflict.
Request
- Base URL: https://api.dotsy.ai
- URL: https://api.dotsy.ai/api/v1/sites/{slug}/changeset
- Auth: one of:
- HTTP bearer
- HTTP bearer
Path parameters
Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.
Request body
Example request
{
"writes": [
{
"key": "about.html",
"body": "<h1>About us</h1><p>We make good things.</p>",
"bodyStaging": "stg_9c1f0a",
"route": {
"path": "/about"
}
}
],
"deletes": [
"old-page.html",
{
"key": "older-page.html",
"ifMatch": "9f2c…"
}
],
"message": "Add About page",
"atomic": true
}Response
Staged.
Changes
No recorded changes to this operation across all 1 revision of this API.