Webhook testing
Send test events through the real dispatch pipeline, check delivery logs, and replay failed deliveries. All calls use https://deepsy.fr/api/v1 with Authorization: Bearer deepsy-dev-{your-api-key}.
Send a test event
POST /webhooks/{webhook_id}/test
Your webhook must be owned by the calling key (404), active (400), authorized for company_id (403), subscribed to event_type (400), and pointing to a public HTTPS URL (403 if blocked).
curl -X POST "https://deepsy.fr/api/v1/webhooks/{webhook_id}/test" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"event_type": "candidate.evaluation_completed",
"company_id": "c193a06f-1c25-4e65-84a7-95faaae7ae7b"
}'
Swap event_type for any of the 16 events your webhook is subscribed to (see Events).
Response (200 OK):
{
"success": true,
"message": "Test event dispatched",
"event_type": "candidate.evaluation_completed",
"company_id": "c193a06f-1c25-4e65-84a7-95faaae7ae7b",
"data_sent": {},
"command_output": "",
"data_source": "real_campaign",
"timestamp": "2026-01-10T10:05:00+00:00"
}
data_source tells you where the test data came from (real_campaign, real_candidate, fake_data, fallback, or unknown), and data_sent shows the exact payload sent.
Check delivery logs
Test deliveries show up in the same logs as production deliveries. Both endpoints require the owning API key.
List logs (GET /webhooks/logs/list)
Optional params: webhook_id (UUID), page (default 1), limit (default 10, max 100), query (matches event type or webhook name). Returns { items, count, pages } of WebhookLog objects (Delivery log fields).
curl "https://deepsy.fr/api/v1/webhooks/logs/list?webhook_id={webhook_id}&page=1&limit=10" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here"
Get one log (GET /webhooks/logs/{log_id})
Note: log_id is an integer (id from the list), not a UUID.
curl "https://deepsy.fr/api/v1/webhooks/logs/42" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here"
Replay a failed delivery
curl -X POST "https://deepsy.fr/api/v1/webhooks/logs/42/retry" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here"
- Works on any log whose
statusisn't"success"(400if it already succeeded). - Runs synchronously, ignores
max_retries, resetsretry_countto0, and clearsnext_retry_at. - Returns
200({"message": "Webhook delivered successfully", "status": "success"}) or502({"message": "Webhook delivery failed", "status": "failed"}).
Quick local receiver
Run this behind an HTTPS tunnel (like ngrok http 3000) and register the tunnel URL to inspect live payloads locally:
const express = require('express');
const app = express();
app.post('/webhooks/deepsy', express.raw({ type: 'application/json' }), (req, res) => {
console.log('Headers:', req.headers);
console.log('Raw body:', req.body.toString('utf8'));
res.status(200).send('ok');
});
app.listen(3000, () => console.log('Listening on :3000'));
Using express.raw keeps the untouched body buffer so you can verify X-Webhook-Signature before parsing JSON (see The signature header).