API Reference

Complete reference for the WebhookBox API v1. Use our API to programmatically manage webhooks, retrieve requests, and more.

Authentication

All API requests require authentication using an API key. You can generate API keys from your dashboard.

Security Best Practice

Never expose your API key in client-side code. Use environment variables and make API calls from your backend.

Using API Keys

Include your API key in the X-API-Key header:

curl -H "X-API-Key: your_api_key_here" \
  https://webhookbox.io/api/v1/endpoints
bash

Response Format

All API responses are JSON formatted:

{
  "success": true,
  "data": {...},
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 100
  }
}
json

Endpoints

List Endpoints

GET
/api/v1/endpoints

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (max: 100)
is_activebooleanFilter by active status

Create Endpoint

POST
/api/v1/endpoints

Request Body

{
  "name": "Production Webhook",
  "slug": "prod-webhook",
  "response_config": {
    "status": 200,
    "body": "{"success": true}",
    "headers": {
      "X-Custom-Header": "value"
    }
  }
}
json

Update Endpoint

PUT
/api/v1/endpoints/:id

Delete Endpoint

DELETE
/api/v1/endpoints/:id

Requests

List Requests

GET
/api/v1/requests

Query Parameters

ParameterTypeDescription
endpoint_idstringFilter by endpoint ID
methodstringFilter by HTTP method
fromdatetimeStart date (ISO 8601)
todatetimeEnd date (ISO 8601)

Get Request Details

GET
/api/v1/requests/:id

Rate Limiting

API requests are rate limited based on your subscription tier:

TierRequests/HourWebhooks/Hour
Free100100 per endpoint
Pro1,0001,000 per endpoint
Business10,00010,000 per endpoint

Rate Limit Headers

Every API response includes rate limit information:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 2024-01-01T13:00:00Z
http

Error Handling

The API uses standard HTTP status codes and returns detailed error messages:

400 Bad RequestINVALID_REQUEST

The request was invalid or malformed

401 UnauthorizedUNAUTHORIZED

Missing or invalid API key

403 ForbiddenPERMISSION_DENIED

Insufficient permissions for this resource

404 Not FoundNOT_FOUND

Resource not found

429 Too Many RequestsRATE_LIMIT_EXCEEDED

Rate limit exceeded

Error Response Format

{
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Invalid endpoint ID",
    "details": {
      "field": "endpoint_id",
      "reason": "Must be a valid UUID"
    }
  }
}
json