Getting Started
Quickstart
Publish your first event and receive it on a local endpoint in about five minutes.
Quickstart
By the end of this page you will have published an event and watched Kestrel deliver it to an endpoint running on your laptop.
1. Install the SDK
npm install @kestrel/sdk@2.4.02. Set your API key
Kestrel reads the key from KESTREL_API_KEY if you do not pass one explicitly.
export KESTREL_API_KEY="sk_test_4eC39HqLyjWDarjtT1zdp7dc"3. Publish an event
4. Receive it
Point a subscription at a tunnel to your laptop, then verify the signature on every request:
import express from 'express';
import { verifySignature } from '@kestrel/sdk';
const app = express();
app.post('/webhooks/kestrel', express.raw({ type: 'application/json' }), (req, res) => {
const ok = verifySignature({
payload: req.body,
header: req.get('X-Kestrel-Signature'),
Respond 2xx before doing slow work. Kestrel gives your endpoint 10 seconds to respond
before it counts the delivery as failed.