Skip to content

Forms

Undo an AI fix

POST/v1/forms/{formId}/fix/undo

Put the draft back exactly as it was before the latest AI fix. This works only while the draft is still the one the fix left, as canUndo shows. Any later change to the draft or theme overrides, or a publish, ends it, and undo answers 409 undo_unavailable with the reason. hasUnpublishedChanges goes back to what it was, so undoing to exactly the live version leaves nothing to publish. Returns the fix with undone set to true.

Path parameters

  • formIdstringrequired

    The form's id.

Response

  • fixIdstringrequired

    The fix's id.

  • statusenumrequired

    fixing while AI works. done when it finished; changes and errorsLeft say what it did. failed when it couldn't; error says why and the draft is unchanged.

    One of "fixing", "done", "failed"

  • errorsBeforeintegerrequired

    How many errors the draft had when the fix started.

    -9007199254740991–9007199254740991

  • errorsLeftinteger or nullrequired

    How many errors are left after the fix. 0 means the form is ready to publish. Null until it's done.

  • changesarray of stringrequired

    What the fix changed, in plain words.

  • errorstring or nullrequired

    Why the fix failed. Null unless it failed.

  • canUndobooleanrequired

    Whether POST /v1/forms/{formId}/fix/undo can still put the draft back. That stops being possible once the draft or theme overrides change again, or the form is published.

  • undonebooleanrequired

    Whether the fix was undone.

  • startedAtnumberrequired

    When the fix started, in milliseconds since the epoch.

  • endedAtnumber or nullrequired

    When the fix ended, in milliseconds since the epoch. Null while it's running.

Errors answer with a status and the error shape.