Is it possible to send POST request to Netlify Functions?

Can Netlify Functions listen for POST requests? I’d like to create a Netlify Function that listens for a web hook from a third party service, in order to trigger a new Netlify build and deploy.

I haven’t read anything about this in the Netlify Functions docs. Is this something that is possible to do?

If it is possible, what is the Netlify Function endpoint that a third party webhook can send a request to?

Hey @brianzelip,
Yes, that’s definitely possible! You’d write a Netlify Function, deploy it with your site, and then the endpoint would be /.netlify/functions/{function_name}, relative to the root directory of your site. So if your site is, endpoint would be{function_name}.

This is a great resource with lots of sample code:

Want to take a look and let us know what other questions you have?

1 Like