Quickstart
Send your first webhook event in 5 minutes
This guide walks you through sending your first event with Nahook. By the end, you'll have an endpoint receiving signed webhook deliveries.
Prerequisites
- A Nahook account (sign up)
- A workspace (created automatically on signup)
Step 1: Create an Endpoint
In the Nahook dashboard, select your environment (every workspace starts with Production), go to Endpoints and click Create Endpoint.
Enter a URL that can receive POST requests. For testing, you can use a service like webhook.site to get a temporary URL. Select the environment for this endpoint.
After creation, note the Endpoint ID (e.g., ep_abc123) and the Signing Secret (e.g., whsec_...). You'll need the secret to verify signatures later.
Step 2: Create an API Key
Go to API Keys and click Create API Key. Give it a name like "My First Key" and select the same environment as your endpoint.
API keys and endpoints must be in the same environment for delivery to work. Events ingested with a staging key only reach staging endpoints.
Copy the API key immediately — it's only shown once. The key looks like nhk_us_ followed by a long hex string.
Step 3: Send Your First Event
curl -X POST https://api.nahook.com/api/ingest/ep_YOUR_ENDPOINT_ID \
-H "Authorization: Bearer nhk_us_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"payload": {
"type": "order.created",
"data": {
"orderId": "ord_123",
"amount": 99.99,
"currency": "USD"
}
}
}'const response = await fetch(
"https://api.nahook.com/api/ingest/ep_YOUR_ENDPOINT_ID",
{
method: "POST",
headers: {
Authorization: "Bearer nhk_us_YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
payload: {
type: "order.created",
data: {
orderId: "ord_123",
amount: 99.99,
currency: "USD",
},
},
}),
},
);
const result = await response.json();
console.log(result);
// { deliveryId: "del_xxx", idempotencyKey: "...", status: "accepted" }You'll receive a 202 Accepted response:
{
"deliveryId": "del_abc123",
"idempotencyKey": "generated-key",
"status": "accepted"
}Step 4: Check the Delivery
Go to your endpoint's detail page in the dashboard. You'll see the delivery with its status, response code, and timing.
The webhook was delivered to your endpoint with these headers:
Content-Type: application/json
webhook-id: msg_{idempotencyKey}
webhook-timestamp: 1711843200
webhook-signature: v1,{base64_signature}