API Reference

Hookbase provides a RESTful API for managing all aspects of your webhook infrastructure.

Interactive API Explorer

Try out endpoints directly from your browser with the API Explorer. Browse schemas, view examples, and send test requests — no setup required.

Postman Collection

Download the Postman Collection for quick API exploration.

OpenAPI Specification

Download the OpenAPI 3.0 Spec for SDK generation, API testing tools, and automated documentation.

Compatible with tools like Swagger UI, Redocly, and any OpenAPI code generator.

Base URL

https://api.hookbase.app

Authentication

All API requests require authentication. See Authentication for details.

URL Patterns

Hookbase supports two URL patterns for API requests:

When using an API key, the organization is inferred automatically from the key — no need to include an organization ID in the URL:

curl
curl https://api.hookbase.app/api/sources \
  -H "Authorization: Bearer whr_your_api_key"

JWT Authentication

When using JWT tokens (e.g. from the dashboard), you must include the organization ID in the path:

curl
curl https://api.hookbase.app/api/organizations/{orgId}/sources \
  -H "Authorization: Bearer your_jwt_token"

Tip

All examples in this documentation use the simplified API key pattern. If you're using JWT authentication, prefix the resource path with /api/organizations/{orgId}.

Request Format

  • All requests should use Content-Type: application/json
  • Request bodies should be JSON-encoded
  • URL parameters should be URL-encoded

Response Format

All responses are JSON-encoded with the following structure:

Success Response

{
  "id": "src_abc123",
  "name": "My Source",
  "createdAt": "2024-01-15T10:30:00Z"
}

Or for lists:

{
  "data": [...],
  "pagination": {
    "total": 100,
    "page": 1,
    "pageSize": 20
  }
}

Error Response

{
  "error": "Not found",
  "message": "Source with ID src_xyz not found",
  "code": "RESOURCE_NOT_FOUND"
}

HTTP Status Codes

CodeDescription
200Success
201Created
204No Content (successful deletion)
400Bad Request (invalid input)
401Unauthorized (missing or invalid auth)
403Forbidden (insufficient permissions)
404Not Found
409Conflict (duplicate resource)
422Unprocessable Entity (validation error)
429Too Many Requests (rate limited)
500Internal Server Error

Rate Limits

Rate limits vary by plan:

PlanRequests/minute
Free60
Starter300
Pro1,000
Business3,000

Rate limit headers are included in every response:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1705312800

Pagination

List endpoints support pagination:

GET /api/sources?page=1&pageSize=20
ParameterDefaultMax
page1-
pageSize20100

Filtering

Many list endpoints support filtering:

GET /api/events?status=delivered&sourceId=src_abc

Sorting

Sort results using the sort parameter:

GET /api/events?sort=-createdAt

Prefix with - for descending order.

API Endpoints

Core Resources

ResourceDescription
SourcesWebhook receive endpoints
DestinationsDelivery targets
RoutesSource to destination mappings
EventsReceived webhook events
DeliveriesDelivery attempts and status

Webhook Ingest

EndpointDescription
Webhook IngestPublic endpoint for receiving webhooks

Authentication & Access

ResourceDescription
AuthenticationJWT tokens and session management
API KeysProgrammatic access tokens

Development Tools

ResourceDescription
TunnelsLocal development tunnels

Advanced Features

ResourceDescription
TransformsPayload transformation functions
FiltersConditional routing rules
SchemasPayload validation schemas
Cron JobsScheduled webhook triggers

SDKs

Official SDKs are available for:

  • JavaScript/TypeScript: npm install @webhookrelay/sdk
  • Python: pip install webhookrelay
  • Go: go get github.com/webhookrelay/go-sdk

Quick Examples

Create a Source

curl
curl -X POST https://api.hookbase.app/api/sources \
  -H "Authorization: Bearer whr_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "GitHub", "slug": "github"}'

List Events

curl
curl https://api.hookbase.app/api/events \
  -H "Authorization: Bearer whr_your_api_key"

Replay an Event

curl
curl -X POST https://api.hookbase.app/api/events/{eventId}/replay \
  -H "Authorization: Bearer whr_your_api_key"