API Referansı
Complete reference for the HookSniff REST API. Base URL: https://hooksniff-api-1046140057667.europe-west1.run.app/v1
Endpoint'ler
GET
/endpointsKimliği doğrulanmış hesap için tüm endpoint'leri listeler.
Yanıt
[
{
"id": "ep_abc123",
"url": "https://myapp.com/webhook",
"description": "Order notifications",
"is_active": true,
"created_at": "2026-01-15T10:30:00Z"
}
]POST
/endpointsYeni bir endpoint oluşturur.
İstek
{
"url": "https://myapp.com/webhook",
"description": "Order notifications" // optional
}Yanıt
{
"id": "ep_abc123",
"url": "https://myapp.com/webhook",
"description": "Order notifications",
"signing_secret": "whsec_abc123xyz789...",
"is_active": true,
"created_at": "2026-01-15T10:30:00Z"
}DELETE
/endpoints/:idBir endpoint'i siler. Bu endpoint'e bekleyen tüm teslimatlar iptal edilir.
Yanıt
{ "deleted": true }Webhook'lar
POST
/webhooksBir endpoint'e webhook gönderir.
İstek
{
"endpoint_id": "ep_abc123",
"event": "order.created", // optional
"data": { // your payload
"order_id": "12345",
"total": 99.99
}
}Yanıt
{
"id": "wh_xyz789",
"endpoint_id": "ep_abc123",
"event": "order.created",
"status": "pending",
"attempt_count": 0,
"created_at": "2026-01-15T10:30:00Z"
}GET
/webhooksİsteğe bağlı filtreleme ve sayfalama ile webhook teslimatlarını listeler.
İstek
// Query Parameters: // ?page=1 — page number // ?per_page=20 — results per page // ?status=delivered — filter by status // ?event=order.created — filter by event type
Yanıt
{
"deliveries": [
{
"id": "wh_xyz789",
"endpoint_id": "ep_abc123",
"event": "order.created",
"status": "delivered",
"attempt_count": 1,
"response_status": 200,
"created_at": "2026-01-15T10:30:00Z"
}
],
"total": 142,
"page": 1,
"per_page": 20
}GET
/webhooks/:idDeneme geçmişi dahil belirli bir webhook teslimatının ayrıntılarını alır.
Yanıt
{
"id": "wh_xyz789",
"endpoint_id": "ep_abc123",
"event": "order.created",
"status": "delivered",
"attempt_count": 2,
"response_status": 200,
"attempts": [
{ "attempt": 1, "status": 500, "timestamp": "2026-01-15T10:30:00Z" },
{ "attempt": 2, "status": 200, "timestamp": "2026-01-15T10:35:00Z" }
],
"created_at": "2026-01-15T10:30:00Z"
}İstatistikler
GET
/statsKimliği doğrulanmış hesap için toplu teslimat istatistiklerini alır.
Yanıt
{
"total_deliveries": 12847,
"delivered": 12453,
"failed": 127,
"pending": 267,
"success_rate": 96.93,
"endpoints_count": 8
}docs.errorCodes
| Kod | Anlamı | Açıklama |
|---|---|---|
| 400 | Geçersiz İstek | Geçersiz istek gövdesi veya parametreler |
| 401 | Yetkisiz | Eksik veya geçersiz API anahtarı |
| 403 | Yasak | Yetersiz izin veya plan limiti aşıldı |
| 404 | Bulunamadı | Kaynak mevcut değil |
| 429 | Hız Sınırı | Too many requests — check Retry-After header |
| 500 | Sunucu Hatası | Internal error — contact support if persistent |
Hata Yanıt Formatı
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Try again in 30 seconds."
}
}