# Setup Guide

Follow these steps to configure a webhook for your workspace:

1. Log in to [UseStencil](https://app.usestencil.com/)
2. Navigate to your Template that you wish to have integration with. This is located under the "Project" tab.
3. Click on the triple-dot menu to bring up the menu options for the template. Choose "Webhooks".\
   ![](https://1726200576-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYeUDPAhozAcUAcc2Lr%2Fuploads%2FvGQOaMYqvMWjQqZZx74X%2Fimage.png?alt=media\&token=3d6f175b-9afa-49ab-8425-534c22865c51)
4. Click "Add Webhook".
5. Fill in the following fields:

<table><thead><tr><th width="187.3828125">Fields</th><th>Description</th></tr></thead><tbody><tr><td>Webhook name</td><td>A friendly name for your reference.</td></tr><tr><td>Webhook URL</td><td>The HTTPS endpoint where UseStencil should send the payload.</td></tr><tr><td>Custom headers (Optional)</td><td><p>Key-value pairs to be included as HTTP headers in the request. Useful for:</p><ul><li>Authentication tokens (e.g., <code>Authorization: Bearer YOUR_TOKEN</code>)</li><li>Source-identification headers (e.g., <code>X-Origin: stencil</code>)</li></ul></td></tr><tr><td>Custom Body (Optional)</td><td><p>Define a custom JSON payload structure under the <code>user_defined</code> field.</p><p></p><p>You can:</p><ul><li>Include static values (e.g., "source": "usestencil")</li><li>Inject dynamic values using handlebars-style templating like:<br><br><code>{</code><br><code>"image_id": "{{data.id}}",</code><br><code>"url": "{{data.url}}",</code><br><code>"created_at": "{{timestamp}}"</code><br><code>}</code></li></ul></td></tr></tbody></table>

Click **Save** and that's it! Isn't that easy?

## Using Custom Headers for Security

Custom headers are a simple yet powerful way to pass authentication tokens or shared secrets to your server. You can configure:

* `Authorization: Bearer abc123`
* `X-Signature: custom-value`
* `X-App-Key: my-service-key`

These headers will be included in every webhook request and can be validated on your backend.

## Managing Webhooks

From the Webhooks dashboard, you can:

* **Pause** or **edit** existing webhooks
* **Delete** unused ones
* View recent **delivery logs** to inspect response codes, headers, and payloads.

> #### ✅ Next Steps
>
> Now that you’ve set up and tested your webhook with custom headers and payloads, you’re ready to explore the [Payload Structure ](https://docs.usestencil.com/integrations/webhook-integration/payload-structure)in detail
