Skip to content

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

  1. Navigate to Sources in the sidebar
  2. Click Add Source
  3. Enter a name (e.g., "GitHub Webhooks")
  4. Enter a slug (e.g., "github") - this becomes part of your webhook URL
  5. Optionally configure signature verification
  6. 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}/github
python
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}/github

Your webhook URL is now:

https://api.hookbase.app/ingest/{orgSlug}/github

Step 3: Create a Destination

Destinations are where webhooks get delivered.

Using the Dashboard

  1. Navigate to Destinations in the sidebar
  2. Click Add Destination
  3. Enter a name (e.g., "Production API")
  4. Enter the URL where webhooks should be sent
  5. Configure retry policy (optional)
  6. 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

  1. Navigate to Routes in the sidebar
  2. Click Add Route
  3. Select your source
  4. Select one or more destinations
  5. Optionally add transforms or filters
  6. 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:

  1. Go to your repository Settings > Webhooks
  2. Click Add webhook
  3. Enter your Hookbase URL as the Payload URL
  4. Set Content type to application/json
  5. Enter your secret (if using signature verification)
  6. Select events and click Add webhook

Step 6: Test Your Setup

Using the Dashboard

  1. Navigate to Testing in the sidebar
  2. Select your source
  3. Enter a test payload or use a sample
  4. Click Send Test
  5. 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 accepted
python
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 accepted

Step 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

Released under the MIT License.