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
Response Format
All API responses are JSON formatted:
{
"success": true,
"data": {...},
"meta": {
"page": 1,
"limit": 20,
"total": 100
}
}
Endpoints
List Endpoints
GET/api/v1/endpoints
Query Parameters
Parameter | Type | Description |
---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (max: 100) |
is_active | boolean | Filter 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"
}
}
}
Update Endpoint
PUT/api/v1/endpoints/:id
Delete Endpoint
DELETE/api/v1/endpoints/:id
Requests
List Requests
GET/api/v1/requests
Query Parameters
Parameter | Type | Description |
---|---|---|
endpoint_id | string | Filter by endpoint ID |
method | string | Filter by HTTP method |
from | datetime | Start date (ISO 8601) |
to | datetime | End date (ISO 8601) |
Get Request Details
GET/api/v1/requests/:id
Rate Limiting
API requests are rate limited based on your subscription tier:
Tier | Requests/Hour | Webhooks/Hour |
---|---|---|
Free | 100 | 100 per endpoint |
Pro | 1,000 | 1,000 per endpoint |
Business | 10,000 | 10,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
Error Handling
The API uses standard HTTP status codes and returns detailed error messages:
INVALID_REQUEST
The request was invalid or malformed
UNAUTHORIZED
Missing or invalid API key
PERMISSION_DENIED
Insufficient permissions for this resource
NOT_FOUND
Resource not found
RATE_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"
}
}
}