Quick Start
Get started with Hookbase in 5 minutes.
Prerequisites
- A Hookbase account
- A destination URL to receive webhooks (your application)
Step 1: Create an Organization
After signing up, you'll be prompted to create an organization. The organization slug becomes part of your webhook URLs.
Step 2: Create a Source
Sources are endpoints that receive incoming webhooks.
Using the Dashboard
- Navigate to Sources in the sidebar
- Click Add Source
- Enter a name (e.g., "GitHub Webhooks")
- Enter a slug (e.g., "github") - this becomes part of your webhook URL
- Optionally configure signature verification
- Click Create
Using the API
bash
curl -X POST https://api.hookbase.app/api/sources \
-H "Authorization: Bearer whr_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub Webhooks",
"slug": "github",
"verificationConfig": {
"type": "github",
"secret": "your-webhook-secret"
}
}'javascript
const response = await fetch('https://api.hookbase.app/api/sources', {
method: 'POST',
headers: {
'Authorization': 'Bearer whr_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'GitHub Webhooks',
slug: 'github',
verificationConfig: {
type: 'github',
secret: 'your-webhook-secret'
}
})
});
const source = await response.json();
console.log(source.webhookUrl);
// → https://api.hookbase.app/ingest/{orgSlug}/githubpython
import requests
response = requests.post(
'https://api.hookbase.app/api/sources',
headers={
'Authorization': 'Bearer whr_your_api_key',
'Content-Type': 'application/json'
},
json={
'name': 'GitHub Webhooks',
'slug': 'github',
'verificationConfig': {
'type': 'github',
'secret': 'your-webhook-secret'
}
}
)
source = response.json()
print(source['webhookUrl'])
# → https://api.hookbase.app/ingest/{orgSlug}/githubYour webhook URL is now:
https://api.hookbase.app/ingest/{orgSlug}/githubStep 3: Create a Destination
Destinations are where webhooks get delivered.
Using the Dashboard
- Navigate to Destinations in the sidebar
- Click Add Destination
- Enter a name (e.g., "Production API")
- Enter the URL where webhooks should be sent
- Configure retry policy (optional)
- Click Create
Using the API
bash
curl -X POST https://api.hookbase.app/api/destinations \
-H "Authorization: Bearer whr_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API",
"url": "https://api.yourapp.com/webhooks",
"headers": {
"X-Custom-Header": "value"
},
"retryPolicy": {
"maxRetries": 5,
"initialDelay": 1000,
"maxDelay": 60000
}
}'javascript
const response = await fetch('https://api.hookbase.app/api/destinations', {
method: 'POST',
headers: {
'Authorization': 'Bearer whr_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Production API',
url: 'https://api.yourapp.com/webhooks',
headers: {
'X-Custom-Header': 'value'
},
retryPolicy: {
maxRetries: 5,
initialDelay: 1000,
maxDelay: 60000
}
})
});
const destination = await response.json();python
import requests
response = requests.post(
'https://api.hookbase.app/api/destinations',
headers={
'Authorization': 'Bearer whr_your_api_key',
'Content-Type': 'application/json'
},
json={
'name': 'Production API',
'url': 'https://api.yourapp.com/webhooks',
'headers': {
'X-Custom-Header': 'value'
},
'retryPolicy': {
'maxRetries': 5,
'initialDelay': 1000,
'maxDelay': 60000
}
}
)
destination = response.json()Step 4: Create a Route
Routes connect sources to destinations.
Using the Dashboard
- Navigate to Routes in the sidebar
- Click Add Route
- Select your source
- Select one or more destinations
- Optionally add transforms or filters
- Click Create
Using the API
bash
curl -X POST https://api.hookbase.app/api/routes \
-H "Authorization: Bearer whr_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "GitHub to Production",
"sourceId": "src_...",
"destinationIds": ["dst_..."],
"enabled": true
}'javascript
const response = await fetch('https://api.hookbase.app/api/routes', {
method: 'POST',
headers: {
'Authorization': 'Bearer whr_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'GitHub to Production',
sourceId: 'src_...',
destinationIds: ['dst_...'],
enabled: true
})
});
const route = await response.json();python
import requests
response = requests.post(
'https://api.hookbase.app/api/routes',
headers={
'Authorization': 'Bearer whr_your_api_key',
'Content-Type': 'application/json'
},
json={
'name': 'GitHub to Production',
'sourceId': 'src_...',
'destinationIds': ['dst_...'],
'enabled': True
}
)
route = response.json()Step 5: Configure Your Webhook Provider
Point your webhook provider to your Hookbase source URL:
https://api.hookbase.app/ingest/{orgSlug}/{sourceSlug}For example, in GitHub:
- Go to your repository Settings > Webhooks
- Click Add webhook
- Enter your Hookbase URL as the Payload URL
- Set Content type to
application/json - Enter your secret (if using signature verification)
- Select events and click Add webhook
Step 6: Test Your Setup
Using the Dashboard
- Navigate to Testing in the sidebar
- Select your source
- Enter a test payload or use a sample
- Click Send Test
- Check Event History to see the result
Using the API
bash
curl -X POST https://api.hookbase.app/ingest/{orgSlug}/{sourceSlug} \
-H "Content-Type: application/json" \
-d '{"test": true, "message": "Hello from Hookbase!"}'javascript
const response = await fetch(
'https://api.hookbase.app/ingest/{orgSlug}/{sourceSlug}',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
test: true,
message: 'Hello from Hookbase!'
})
}
);
// 200 OK — event acceptedpython
import requests
response = requests.post(
'https://api.hookbase.app/ingest/{orgSlug}/{sourceSlug}',
headers={'Content-Type': 'application/json'},
json={
'test': True,
'message': 'Hello from Hookbase!'
}
)
# 200 OK — event acceptedStep 7: View Delivery Logs
After sending a test event, check the delivery status:
Using the Dashboard
Navigate to Events in the sidebar to see your test event. Click it to view delivery details including status, response code, and latency.
Using the API
bash
# List recent events
curl https://api.hookbase.app/api/events?limit=5 \
-H "Authorization: Bearer whr_your_api_key"
# Get deliveries for a specific event
curl https://api.hookbase.app/api/events/{eventId}/deliveries \
-H "Authorization: Bearer whr_your_api_key"javascript
// List recent events
const events = await fetch('https://api.hookbase.app/api/events?limit=5', {
headers: { 'Authorization': 'Bearer whr_your_api_key' }
}).then(r => r.json());
// Get deliveries for the first event
const deliveries = await fetch(
`https://api.hookbase.app/api/events/${events.data[0].id}/deliveries`,
{ headers: { 'Authorization': 'Bearer whr_your_api_key' } }
).then(r => r.json());
console.log(deliveries.data[0].statusCode); // 200
console.log(deliveries.data[0].duration); // 145 (ms)python
import requests
headers = {'Authorization': 'Bearer whr_your_api_key'}
# List recent events
events = requests.get(
'https://api.hookbase.app/api/events?limit=5',
headers=headers
).json()
# Get deliveries for the first event
event_id = events['data'][0]['id']
deliveries = requests.get(
f'https://api.hookbase.app/api/events/{event_id}/deliveries',
headers=headers
).json()
print(deliveries['data'][0]['statusCode']) # 200
print(deliveries['data'][0]['duration']) # 145 (ms)Example Delivery Response
json
{
"data": [
{
"id": "dlv_abc123",
"eventId": "evt_xyz789",
"destinationId": "dst_...",
"statusCode": 200,
"duration": 145,
"status": "success",
"attempt": 1,
"createdAt": "2024-01-15T10:30:00Z"
}
]
}Next Steps
- Sources - Advanced source configuration
- Transforms - Modify payloads before delivery
- Filters - Control which webhooks get delivered
- Tunnels - Receive webhooks on localhost
- Testing Guide - Simulate events, replay deliveries, and test locally