Как работи
- Имаш Pro/Custom API key.
- Регистрираш
https://URL + сектор (+ опционални филтри). - Cron пуска
send-webhooks.phpи Sectorfeed POSTва JSON с новите items. - Проверяваш подписа
X-Sectorfeed-Signature(HMAC-SHA256).
Създаване
curl -X POST "https://sectorfeed.eu/api/webhooks" \
-H "X-API-Key: sf_…" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/hooks/sectorfeed","feed":"tenders","filters":{"niche":"it"}}'
Сектори: tenders, projects, firms, jobs, cadastre, kevr, cpc, night-market. Отговорът връща secret само веднъж.
Payload
{
"event": "feed.items",
"webhook_id": "wh_…",
"delivery_id": "dl_…",
"feed": "tenders",
"filters": { "niche": "it" },
"delivered_at": "2026-09-26T12:00:00+00:00",
"count": 1,
"items": [
{
"id": "…",
"title": "…",
"meta": "…",
"path": "/tender/…",
"url": "https://sectorfeed.eu/tender/…"
}
]
}
Подпис
X-Sectorfeed-Event: feed.items X-Sectorfeed-Delivery: dl_… X-Sectorfeed-Signature: sha256=<hmac_hex>
Проверка: hash_hmac('sha256', $rawBody, $secret) === substr($header, 7) (след префикса sha256=).
Управление
GET /api/webhooks
POST /api/webhooks/{id}/ping
DELETE /api/webhooks/{id}
След 10 неуспешни доставки webhook-ът се деактивира автоматично.
CLI
php bin/make-webhook.php sf_… https://example.com/hook tenders --niche=it php bin/send-webhooks.php
Нужен API key? Профил (създай ключ) · Docs: /docs · support@sectorfeed.eu