# How to trigger a Netlify build using Storyblok webhooks

Build hooks are unique URLs used to trigger a build on the Netlify. They can be used to refresh the content on your website after you’ve published or unpublished content in your Storyblok space.

## Getting the hook URL from Netlify

To create one, open your site’s dashboard on Netlify and navigate to the settings section:

Under **Settings > Build & deploy > Continuous deployment > Build hooks.**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1672416859513/cvoqlCffz.png)Click **Add build hook** to create a new hook. The hook name is for you to identify that hook, select a branch to build when a deploy is triggered.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1672416861115/4yulawEtk.png)After clicking **Save**, you’ll get a URL which you need to send `POST` requests to in order to trigger a build.

The URLs typically look like this:

[`https://api.netlify.com/build_hooks/XXXXXXXXXXXXXXX`](https://api.netlify.com/build_hooks/XXXXXXXXXXXXXXX "https://api.netlify.com/build_hooks/XXXXXXXXXXXXXXX")

You can also add parameters to the URL to change the default trigger branch and trigger message. To know more, [check out the official documentation](https://docs.netlify.com/configure-builds/build-hooks/#parameters).

## Setting the hook URL on your Storyblok space

To add the hook URL to your Storyblok space so your new content will be deployed when you click **publish** or **unpublish.**

Open the space you want to configure the hook for and navigate to the settings section of the space:

Under **Settings > Webhooks.**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1672416862656/Tv2AfKQ6i.png)Paste the copied hook URL in the input field and you should see a toast indicating you’ve successfully added the URL.

Now you can **publish** new content or **unpublish** existing content on your Storyblok space to test. When you go back to your Netlify site’s deploys section, you should see a build in process.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1672416864294/rndEM_41q.png)A payload in JSON format is sent with the `POST` request from Storyblok, this can be accessed during build on Netlify as an environment variable `INCOMING_HOOK_BODY`

To know more about the nature of the payload, check out [How to use Storyblok webhooks](https://www.storyblok.com/docs/Guides/using-storyblok-webhooks) in the documentation.
