API Documentation
Complete guide to WebhookLab API v1
Authentication
All API requests require an API key in the Authorization header.
curl -X GET https://webhooks.platphormnews.com/api/v1/events \
-H "x-api-key: pk_pnn_..."Events API
Create and manage webhook events.
POST /api/v1/events
Create a new webhook event
{
"eventType": "user.created",
"payload": {
"userId": "123",
"email": "user@example.com"
},
"endpointId": "ep_123",
"simulated": true
}GET /api/v1/events
List webhook events with optional filtering
GET /api/v1/events?eventType=user.created&limit=50Endpoints API
Manage webhook receiver endpoints.
POST /api/v1/endpoints
Create a new webhook endpoint
{
"name": "Production Webhook",
"url": "https://your-domain.com/webhooks",
"events": ["user.created", "payment.completed"],
"signingAlgorithm": "sha256"
}Signatures API
Generate and verify webhook signatures.
POST /api/v1/signatures/generate
Generate an HMAC signature for a payload
{
"payload": {"test": "data"},
"secret": "your-webhook-secret",
"algorithm": "sha256"
}POST /api/v1/signatures/verify
Verify a webhook signature
{
"signature": "t=1234567890,v1=abc123...",
"payload": {"test": "data"},
"secret": "your-webhook-secret",
"tolerance": 300
}Replays API
Replay webhook events to different endpoints.
POST /api/v1/replays
Create a replay of an existing event
{
"eventId": "evt_123",
"endpointId": "ep_456"
}Contracts API
Define and validate webhook contracts.
POST /api/v1/contracts
Create a new webhook contract
{
"name": "User Event Contract",
"description": "Schema for user events",
"contractData": {
"type": "object",
"properties": {
"userId": {"type": "string"}
}
}
}Error Handling
Standard error response format:
{
"error": {
"code": "validation_error",
"message": "Invalid request parameters"
}
}Support
Need help? Check out our resources: