Skip to main content

Creating your first webhook

In order to test webhooks deliveries locally, you can use Webhook.site or RequestBin. They are free tools that allow you to inspect the webhook payloads and responses. We’ll use Webhook.site in this guide.
1

Prepare to receive webhook deliveries

Go to https://webhook.site/ and copy the webhook URL.Webhook.site URL copy
2

Create a new webhook

Currently, you can only create webhooks via the API, but we’re working on adding an interface for it soon.Paste the following command in your terminal to create a new webhook via the API.
   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"}]}'
Remember to replace YOUR_API_KEY with your API key, and <webhook-url> with the webhook URL you copied from webhook.site.
3

Trigger a delivery event

Go to your workspace and create a new person in any of your groups.Person creation
4

Now go back to webhook.site and you should see a request in the webhook deliveries.Webhook person created event
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.
I