Forms
Fix errors with AI
/v1/forms/{formId}/fixHave 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
formIdstringrequiredThe form's id.
Response
fixIdstringrequiredThe fix's id.
statusenumrequiredfixingwhile AI works.donewhen it finished;changesanderrorsLeftsay what it did.failedwhen it couldn't;errorsays why and the draft is unchanged.One of
"fixing","done","failed"errorsBeforeintegerrequiredHow many errors the draft had when the fix started.
-9007199254740991–9007199254740991
errorsLeftinteger or nullrequiredHow many errors are left after the fix. 0 means the form is ready to publish. Null until it's done.
changesarray of stringrequiredWhat the fix changed, in plain words.
errorstring or nullrequiredWhy the fix failed. Null unless it failed.
canUndobooleanrequiredWhether
POST /v1/forms/{formId}/fix/undocan still put the draft back. That stops being possible once the draft or theme overrides change again, or the form is published.undonebooleanrequiredWhether the fix was undone.
startedAtnumberrequiredWhen the fix started, in milliseconds since the epoch.
endedAtnumber or nullrequiredWhen the fix ended, in milliseconds since the epoch. Null while it's running.
Errors answer with a status and the error shape.