Skip to content

Forms

Fix errors with AI

POST/v1/forms/{formId}/fix

Have AI fix the errors that stop the draft from publishing, without publishing it. It starts a pass and returns it right away with status fixing. If a pass is already running, you get that one. Follow it with GET /v1/forms/{formId}/fix and undo it with POST /v1/forms/{formId}/fix/undo. See AI builds and fixes for what a fix may change. A draft with no errors answers 422 nothing_to_fix, and a form that's being built answers 409 form_building. You can start 30 fixes an hour. A guest gets 429 guest_limit after a few.

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.