> ## Documentation Index
> Fetch the complete documentation index at: https://developer.folk.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Create webhooks

## Creating your first webhook

In order to test webhooks deliveries locally, you can use [Webhook.site](https://webhook.site/) or [RequestBin](https://requestbin.com/). They are free tools that allow you to inspect the webhook payloads and responses.
We'll use [Webhook.site](https://webhook.site/) in this guide.

<Steps>
  <Step title="Prepare to receive webhook deliveries">
    Go to [https://webhook.site/](https://webhook.site/) and copy the webhook URL.

    <img src="https://mintcdn.com/folk-cf968f5e/BHUI6vljxvF8brJH/assets/webhook-site-url-copy.png?fit=max&auto=format&n=BHUI6vljxvF8brJH&q=85&s=a24233e5b86cad922cf9cf8015bfc69c" alt="Webhook.site URL copy" width="3326" height="1804" data-path="assets/webhook-site-url-copy.png" />
  </Step>

  <Step title="Create a new webhook">
    <AccordionGroup>
      <Accordion title="Create via workspace settings page">
        Go to your [workspace API settings page](https://app.folk.app/apps/contacts/network/settings/api-keys) and create a new webhook. Fill in the following fields:

        * Name: choose any name you want for your webhook
        * URL: use the webhook URL you copied from webhook.site
        * Events: use `person.created`
        * Click on "Create webhook"

                  <img src="https://mintcdn.com/folk-cf968f5e/A8ELs1mxRi6VQ_ez/assets/webhook-creation.png?fit=max&auto=format&n=A8ELs1mxRi6VQ_ez&q=85&s=50703420831db0a7d8ef5f4fa7bcbed1" alt="Webhook creation" width="1186" height="1148" data-path="assets/webhook-creation.png" />
      </Accordion>

      <Accordion title="Create via API">
        Paste the following command in your terminal to create a new webhook via the API.

        ```bash theme={null}
          curl -X POST "https://api.folk.app/v1/webhooks" \
            -H "Authorization: Bearer YOUR_API_KEY" \
            -H "Content-Type: application/json" \
            -d '{"name": "My webhook", "targetUrl": "<webhook-url>", "subscribedEvents": [{"eventType": "person.created"}]}'
        ```

        <Info>
          Remember to replace `YOUR_API_KEY` with your API key, and `<webhook-url>` with the webhook URL you copied from webhook.site.
        </Info>
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Trigger a delivery event">
    Go to your workspace and create a new person in any of your groups.

    <img src="https://mintcdn.com/folk-cf968f5e/BHUI6vljxvF8brJH/assets/webhook-create-person.png?fit=max&auto=format&n=BHUI6vljxvF8brJH&q=85&s=7d7f068f798c651d267d087223f053e7" alt="Person creation" width="2570" height="1318" data-path="assets/webhook-create-person.png" />
  </Step>

  <Step>
    Now go back to [webhook.site](https://webhook.site/) and you should see a request in the webhook deliveries.

    <img src="https://mintcdn.com/folk-cf968f5e/BHUI6vljxvF8brJH/assets/webhook-person-created-event.png?fit=max&auto=format&n=BHUI6vljxvF8brJH&q=85&s=0eb6d73e36068b0f7b9cc755a86bff2c" alt="Webhook person created event" width="3356" height="1804" data-path="assets/webhook-person-created-event.png" />
  </Step>
</Steps>

Congratulations, you created your first webhook integration! folk will now send a notification to the webhook URL every time a new person is created in the workspace.

## Next steps

You can now configure your server to handle webhook deliveries and take action when an event occurs in the workspace. Check out the next section for more information.
