Skip to content

API Reference

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

Base URL

https://api.hookbase.app

Postman Collection

Download our Postman collection to quickly get started with the API:

Download Postman Collection

Import the collection into Postman, then:

  1. Run the Login request to authenticate
  2. Your access token and organization IDs will be automatically saved
  3. Start making API calls!

Authentication

All API requests require authentication. See Authentication for details.

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

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

Or for lists:

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

Error Response

json
{
  "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
Pro1000
Business3000
EnterpriseCustom

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:

bash
GET /api/organizations/{orgId}/sources?page=1&pageSize=20
ParameterDefaultMax
page1-
pageSize20100

Filtering

Many list endpoints support filtering:

bash
GET /api/organizations/{orgId}/events?status=delivered&sourceId=src_abc

Sorting

Sort results using the sort parameter:

bash
GET /api/organizations/{orgId}/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

Support Resources

ResourceDescription
TransformsPayload transformation functions
FiltersConditional routing rules
SchemasPayload validation schemas
TunnelsLocal development tunnels

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

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

List Events

bash
curl https://api.hookbase.app/api/organizations/{orgId}/events \
  -H "Authorization: Bearer YOUR_TOKEN"

Replay an Event

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

Released under the MIT License.