API Reference
Мгновенная отладка веб-хуков без туннелей
Authentication
Every request must include a valid API key in the Authorization header. Keys are scoped to your workspace and can be rotated from the Dashboard settings. Example:
curl -X GET https://api.hookly.dev/v1/hooks \
-H "Authorization: Bearer hly_live_8xK2mP9vQr4nLw7jTf"
Invalid or expired keys return 401 Unauthorized. Exceeding your plan's rate limit (e.g., 600 req/min on the Pro tier) returns 429 Too Many Requests with a Retry-After header.
Code Examples
Integrate Hookly into your CI/CD pipelines, test suites, or internal tooling with a few lines of code. Below are real-world patterns used by teams at ShipFast, NeonPay, and Kiteboard.
JavaScript
Create a hook and poll for logs
const { Hookly } = require('hookly-sdk');
const client = new Hookly('hly_live_8xK2mP9vQr4nLw7jTf');
const hook = await client.hooks.create({
name: 'stripe-test-sandbox'
});
console.log('Webhook URL:', hook.url);
const logs = await client.logs.list(hook.id, { limit: 5 });
logs.forEach(l => console.log(l.method, l.path, l.status_code));
Python
Assert webhook payload in tests
import hookly
client = hookly.Client(api_key="hly_live_8xK2mP9vQr4nLw7jTf")
hook = client.hooks.create(name="pytest-events")
# Trigger your Stripe checkout, then verify:
logs = client.logs.list(hook.id, limit=1)
assert logs[0].status_code == 200
assert "checkout.session.completed" in logs[0].body
The Hookly SDK mirrors the REST API surface — every endpoint has a typed client method. Responses include request_id headers for support ticket correlation.
Rate Limits & Error Handling
Free tier: 120 requests per minute. Pro: 600/min. Enterprise: configurable up to 5,000/min. When you hit the limit, Hookly returns 429 with a JSON body like {"error": "rate_limit_exceeded", "retry_after_seconds": 8}. Implement exponential backoff with jitter for resilient clients.
Common errors: 400 for malformed JSON, 404 when a hook or log ID doesn't exist, 403 if the API key lacks scope for the requested workspace. All error responses include a X-Hookly-Request-Id header for traceability.