Skip to content

Configure Cloud Code Webhooks with the New Hooks API

We announced Cloud Code Webhooks earlier this year to allow you to manipulate your data using any language or framework of your choice, with code running on your servers. Today, we're happy to introduce a new API that makes it even easier to take advantage of Cloud Code Webhooks.

The new Hooks API lets you access information and perform actions programmatically that previously you could only do through your Parse dashboard. You can create new webhooks and modify, delete or list the existing webhooks — all quickly and easily via the Hooks API.

Creating a new function webhook is as simple as:

curl -X POST \
-H "X-Parse-Application-Id: ${APPLICATION_ID}" \
-H "X-Parse-Master-Key: ${MASTER_KEY}" \ 
-H "Content-Type: application/json" \ 
-d '{"functionName":"sendMessage","url":"https://api.example.com/sendMessage"}' \
https://api.parse.com/1/hooks/functions

This API opens up several new functionalities to the Parse ecosystem. For instance, it enables you to test your Cloud Code in a local environment before deploying it. You can run your code locally and use a tunneling service like ngrok or ultrahook to map your local http endpoints to public URLs. Then, using the Hooks API, you can dynamically create or modify webhooks (for your app) to be served by your test environment.

The Hooks API comes on the heels of several new APIs we've recently released to make app development even easier — check out the new Apps API and the Schema API, too.

To learn more about how the Hooks API works, check out the documentation, and if you have any questions, please reach out to us here. We're looking forward to seeing what you create!