Api to set webhook for forms

Hello,

I couldn’t find api docs to set webhook for form notification via code. Can you please let me know if it is possible?

Thank you

Hi, @s-kris. We have a support guide about exploring our API here:

To summarize the solution for undocumented endpoints, just make whatever the change is using our web UI and then examine the network tab in developer tools to see exactly how the API call was made and how the JSON data sent to it is structured.

Here is an example using curl:

curl 'https://api.netlify.com/api/v1/hooks' -H 'Content-Type: application/json' \
 -H 'Authorization: Bearer <REDACTED>'  \
 --data-raw '{"site_id":"<SITE_ID_HERE>","event":"submission_created","type":"url","data":{"url":"https://example.com/abc"},"form_id":"<FORM_ID_HERE>"}'
1 Like

Thank you @luke

Now I can work with undocumented endpoints.

2 Likes