Quick Start
This guide will walk you through sending your first webhook in 5 minutes. You'll create an application, define an event type, and deliver your first webhook to a test endpoint.
Step 1: Get your API key
After signing up, navigate to Settings → API Keys and create a new API key. Copy it immediately - you won't see it again.
export HOOKMESH_API_KEY="sk_test_abc123..."Step 2: Create an application
Applications represent your product or environment (e.g., "Production App", "Staging App"). Each application has its own endpoints and event types.
curl -X POST https://api.hookmesh.com/v1/applications \
-H "Authorization: Bearer ${HOOKMESH_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "My SaaS Product",
"description": "Production webhooks"
}'Response:
{
"id": "app_2Zy3X8qP9rK5mN1vB",
"name": "My SaaS Product",
"description": "Production webhooks",
"created_at": "2026-01-20T15:30:00Z"
}Save the id - you'll need it for the next steps.
Step 3: Define an event type
Event types define what kinds of webhooks you'll send. Use dot notation with past tense (e.g., "user.created", "invoice.paid").
curl -X POST https://api.hookmesh.com/v1/event-types \
-H "Authorization: Bearer ${HOOKMESH_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"application_id": "app_2Zy3X8qP9rK5mN1vB",
"name": "user.created",
"description": "Fired when a new user signs up"
}'Step 4: Create a test endpoint
For testing, we'll use webhook.site, a free service that captures HTTP requests:
- Go to webhook.site
- Copy your unique URL (e.g.,
https://webhook.site/abc123...) - Create an endpoint in Hook Mesh:
curl -X POST https://api.hookmesh.com/v1/endpoints \
-H "Authorization: Bearer ${HOOKMESH_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"application_id": "app_2Zy3X8qP9rK5mN1vB",
"url": "https://webhook.site/your-unique-id",
"description": "Test endpoint",
"subscribed_events": ["user.created"]
}'Response includes the endpoint secret:
{
"id": "ep_8mK3pL9qR2vN5xZ",
"url": "https://webhook.site/your-unique-id",
"secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLa",
"status": "active",
"subscribed_events": ["user.created"],
"created_at": "2026-01-20T15:35:00Z"
}Step 5: Send your first webhook
Now let's send a webhook event! This will be delivered to your webhook.site endpoint.
curl -X POST https://api.hookmesh.com/v1/webhook-jobs \
-H "Authorization: Bearer ${HOOKMESH_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"application_id": "app_2Zy3X8qP9rK5mN1vB",
"event_type": "user.created",
"payload": {
"user_id": "usr_xyz789",
"email": "alice@example.com",
"name": "Alice Johnson",
"created_at": "2026-01-20T15:40:00Z"
}
}'Response:
{
"id": "job_5nM8pQ1rK3vL9xB",
"application_id": "app_2Zy3X8qP9rK5mN1vB",
"event_type": "user.created",
"status": "created",
"created_at": "2026-01-20T15:40:00Z",
"expires_at": "2026-01-22T15:40:00Z"
}Step 6: Verify delivery
Check your webhook.site page - you should see the webhook request with:
Webhook-Id, Webhook-Timestamp, Webhook-SignatureThe JSON you sent in the request bodyUsed to verify webhook authenticityUsing the SDK (Optional)
For a better developer experience, use our official SDKs in Node.js, Python, Go, or PHP:
JavaScript / Node.js
npm install @hookmesh/nodeimport { HookMesh } from '@hookmesh/node';
const hookmesh = new HookMesh({
apiKey: process.env.HOOKMESH_API_KEY,
});
// Create application
const app = await hookmesh.applications.create({
name: 'My SaaS Product',
description: 'Production webhooks',
});
// Define event type
await hookmesh.eventTypes.create({
applicationId: app.id,
name: 'user.created',
description: 'Fired when a new user signs up',
});
// Send webhook
await hookmesh.webhookJobs.create({
applicationId: app.id,
eventType: 'user.created',
payload: {
user_id: 'usr_xyz789',
email: 'alice@example.com',
name: 'Alice Johnson',
created_at: new Date().toISOString(),
},
});Python
pip install hookmeshfrom hookmesh import HookMesh
hookmesh = HookMesh(api_key=os.environ.get('HOOKMESH_API_KEY'))
# Create application
app = hookmesh.applications.create(
name='My SaaS Product',
description='Production webhooks'
)
# Define event type
hookmesh.event_types.create(
application_id=app.id,
name='user.created',
description='Fired when a new user signs up'
)
# Send webhook
hookmesh.webhook_jobs.create(
application_id=app.id,
event_type='user.created',
payload={
'user_id': 'usr_xyz789',
'email': 'alice@example.com',
'name': 'Alice Johnson',
'created_at': datetime.now().isoformat()
}
)Go
go get github.com/hookmesh/hookmesh-gopackage main
import (
"context"
"fmt"
"os"
"time"
"github.com/hookmesh/hookmesh-go"
)
func main() {
client := hookmesh.New(os.Getenv("HOOKMESH_API_KEY"))
// Create application
app, err := client.Applications.Create(context.Background(), &hookmesh.ApplicationCreate{
Name: "My SaaS Product",
Description: "Production webhooks",
})
if err != nil {
panic(err)
}
// Define event type
err = client.EventTypes.Create(context.Background(), &hookmesh.EventTypeCreate{
ApplicationID: app.ID,
Name: "user.created",
Description: "Fired when a new user signs up",
})
if err != nil {
panic(err)
}
// Send webhook
job, err := client.WebhookJobs.Create(context.Background(), &hookmesh.WebhookJobCreate{
ApplicationID: app.ID,
EventType: "user.created",
Payload: map[string]interface{}{
"user_id": "usr_xyz789",
"email": "alice@example.com",
"name": "Alice Johnson",
"created_at": time.Now().Format(time.RFC3339),
},
})
if err != nil {
panic(err)
}
fmt.Printf("Webhook job created: %s\n", job.ID)
}PHP
composer require hookmesh/hookmesh-php<?php
require 'vendor/autoload.php';
use HookMesh\HookMeshClient;
$client = new HookMeshClient($_ENV['HOOKMESH_API_KEY']);
// Create application
$app = $client->applications->create([
'name' => 'My SaaS Product',
'description' => 'Production webhooks'
]);
// Define event type
$client->eventTypes->create([
'application_id' => $app->id,
'name' => 'user.created',
'description' => 'Fired when a new user signs up'
]);
// Send webhook
$job = $client->webhookJobs->create([
'application_id' => $app->id,
'event_type' => 'user.created',
'payload' => [
'user_id' => 'usr_xyz789',
'email' => 'alice@example.com',
'name' => 'Alice Johnson',
'created_at' => date('c')
]
]);
echo "Webhook job created: " . $job->id . "\n";Production deployment
You've successfully sent your first webhook! To move from this 5-minute test to a production-ready integration (about 30 minutes total), follow these steps:
- Implement signature verification on your webhook endpoints
- Add idempotency handling to prevent duplicate processing
- Configure retry strategy and circuit breakers
- Set up proper error handling and logging
- Test with your actual application endpoints
Next steps
Now that you've sent your first webhook, here's what to explore next:
Verify Webhook Signatures
Learn how to verify webhooks are from Hook Mesh using HMAC-SHA256 signatures. Includes code samples for Node.js, Python, Go, and PHP.
Customer Portal
Give your customers a self-service UI to manage their webhook endpoints without contacting support.
Understand Retries
Learn about Hook Mesh's retry strategy with exponential backoff and how the circuit breaker works.
API Reference
Explore the complete API documentation with detailed examples for all endpoints.