Skip to main content

Testing webhooks

Once you've created a webhook and deployed the endpoint, you can test the webhook by using the simple CLI that's bundled with @indent/webhook. You can create a test/config.json file that can be used to send events to your webhook with a given signing secret like this example or the general structure:

{
"hook": {
"secret": "...",
"headers": { "Content-Type": "application/json" }
},
"entries": [
{ "events": [ ... ] },
{
"delay": 5000,
"events": [ ... ]
}
]
}

You can either install the webhook package globally or use npx like this:

npx @indent/webhook -c ./test/config.json https://example.com/api/v1/webhook

Coming soon: an official Indent CLI to make testing webhooks even easier and safer.