Netlify Forms – enable form detection through API

Hi,

It seems something has changed recently with the way newly created sites deal with Netlify forms.

I’m creating sites through the API, and I noticed ‘Form detection’ is disabled by default. I need to manually go to the UI to enable it, redeploy, and only then it detects my forms.

How can I change this? Is there a property in the Netlify API I can send to enable forms whenever I create/update a site?

Hi @nvdb31, welcome and thanks for the post.
Based on the API documentation links below you cannot enable form detection via the API. You have to manually go to the UI to enable it.

Thanks.

That’s not true, @clarnx. Almost everything done by UI is basically something that can be handled by API. The relevant payload would be:

{
  "processing_settings": {
    "ignore_html_forms": false
  }
}

updateSite should work: Netlify API documentation

1 Like

Thank you so much @hrishikesh! That seemed to work. :slight_smile:

@hrishikesh, thanks for the correction.
However I honestly feel the Netlify Open API documentation needs an update as it’s very difficult to find information.
Most of the parameters are not explained and you can’t tell what it does.

Even the option "ignore_html_forms": false you provided is not available in the documentation. Correct me if I am wrong as I have searched the whole documentation.

I have raised it internally once or twice regarding the Open API spec being incomplete, but as far as I know there’s just not enough motivation and bandwidth to keep it up-to-date. I could be wrong though. This is why our most relevant guideline says, reverse-engineer the API endpoint by checking our UI: [Support Guide] Understanding and using Netlify’s API - Support / Support Guides - Netlify Support Forums

1 Like