Draft & publish

Undo one change

Puts back the version each file had before this change, as a draft — publish to make it live. It works on a change that is still a draft and on one that is already published, and it never overwrites a later edit: a page edited since is skipped (changed_since) and the rest are still undone. Send keys to undo only some files of a change; omit it to undo all.

Some changes cannot be undone here: a page that was created and is live now (delete it instead), a delete that also removed routes, the site brief, and a change that touched too many files. The undo is recorded as a revert event. An agent on "Drafts only" AI access may use this; one on "Read only" may not.

post/api/v1/sites/{slug}/activity/{id}/revert

Request

  • Base URL: https://api.dotsy.ai
  • URL: https://api.dotsy.ai/api/v1/sites/{slug}/activity/{id}/revert
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

slugstring required
Example:acme-studio

Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.

idstring required
Example:7c0e5d3a-1f4b-4b0a-9a55-2f6d1e8b3c90

An event id from the activity list.

Request body

keysstring[]

Undo only these keys of the change. Default: every key.

reasonstring

Why — shown next to 'Reverted by …'. Visible to everyone on the site.

Response

At least one file was put back (staged as a draft).

revertedstring[] required

Content keys put back. They are staged as a draft — publish to make them live.

eventIdstring nullable required

The id of the new revert event when at least one file was written back. Null when the audit insert failed, or when nothing was written (every key was already at the requested version — the source change may still be marked reverted).

warningsstring[]

Non-blocking notes about tags that will not compose, one per problem, each as <key>: <code> — <what to change>. Codes: fragment_unclosed, fragment_bad_name, fragment_full_document, fragment_self_reference, fragment_attr_hyphen, legacy_paige_tag, layout_missing_content, unknown_dotsy_syntax. The write still happened. At most 50 are listed.

Changes

No recorded changes to this operation across all 1 revision of this API.