API Reference

Complete API documentation for programmatic access

Welcome to the HooksDash API documentation. This API provides programmatic access to webhook endpoint management, request inspection, and replay functionality.

API Overview

The HooksDash API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Authentication

HooksDash supports two authentication methods:

  1. JWT Bearer Token - For web application access
  2. API Key - For CLI and programmatic access

See Authentication for detailed information.

API Sections

  • Authentication - CLI session management and API key validation
  • Endpoints - Create and manage webhook endpoints
  • Requests - Inspect and replay webhook requests
  • Webhooks - Receive webhooks (public endpoint)

Rate Limits

Rate limits are applied per-endpoint based on your tier:

TierRequests per Minute
Free10
Starter60
Pro300
Enterprise1000

When rate limit is exceeded, the API returns a 429 Too Many Requests response.

Error Codes

HooksDash uses conventional HTTP response codes to indicate the success or failure of an API request.

Status CodeMeaning
200OK - Request successful
201Created - Resource created successfully
400Bad Request - Invalid request format or validation error
401Unauthorized - Missing or invalid authentication
403Forbidden - Authenticated but not authorized (e.g., tier limit)
404Not Found - Resource doesn't exist
409Conflict - Resource already exists (e.g., duplicate slug)
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Something went wrong on our end

Error Response Format

All error responses follow this format:

{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request"
}

For validation errors, additional details are included:

{
  "statusCode": 400,
  "message": [
    "name must be longer than or equal to 1 characters",
    "slug must match the required pattern"
  ],
  "error": "Bad Request"
}

Pagination

List endpoints support pagination using page and limit query parameters:

GET /api/endpoints?page=1&limit=20

Paginated responses include metadata:

{
  "data": [...],
  "meta": {
    "total": 42,
    "page": 1,
    "limit": 20,
    "totalPages": 3
  }
}

Default values:

  • page: 1
  • limit: 20
  • Maximum limit: 100

Tier Limits

Different tiers have different resource limits:

ResourceFreeStarterProEnterprise
Max Endpoints32050Unlimited
Max Requests/Endpoint1001,0005,000Unlimited
Request Retention24h7 days7 days30 days
Max Tunnels1310Unlimited

Webhooks

The public webhook receiver is available at:

POST https://hooksdash.ibadsiddiqui.dev/api/h/{slug}

This endpoint accepts all HTTP methods (GET, POST, PUT, DELETE, PATCH, etc.) and captures:

  • Request method
  • Headers
  • Query parameters
  • Request body
  • IP address
  • Timestamp

See Webhooks for detailed information.

SDK and Tools

Official CLI

npm install -g hooksdash

# Authenticate
hooksdash login

# Forward webhooks to localhost
hooksdash forward --port 3000 --endpoint my-endpoint

cURL Examples

Create an endpoint:

curl -X POST https://hooksdash-api.ibadsiddiqui.dev/api/endpoints \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Webhook",
    "description": "Receives Stripe events"
  }'

Send a test webhook:

curl -X POST https://hooksdash.ibadsiddiqui.dev/api/h/my-webhook \
  -H "Content-Type: application/json" \
  -d '{"event": "test"}'

Support

For API support, please:

Changelog

See CHANGELOG.md for API version history and breaking changes.