Webhook setup
Create, update, authorize, and test webhooks via https://deepsy.fr/api/v1 with Authorization: Bearer deepsy-dev-{your-api-key}. Actions are attributed to the key's creator (Authentication).
You'll need an API key with ADMINISTRATOR on every company you subscribe, plus a public https:// URL (use ngrok or similar locally).
1. Check available events
curl "https://deepsy.fr/api/v1/webhooks/events" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here"
Returns { "events": [...] } with all 16 supported event names (see Events).
2. Create a webhook
POST /webhooks
Requires ADMINISTRATOR on every company in company_ids.
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
name | string | Yes | - | Max 255 chars |
url | string (URI) | Yes | - | Public https:// URL, max 500 chars |
events | string[] | Yes | - | At least 1 event from GET /webhooks/events |
company_ids | uuid[] | Yes | - | At least 1 company UUID |
description | string / null | No | - | Max 1000 chars |
metadata | object / null | No | - | Arbitrary JSON |
signature_enabled | boolean | No | false | When true, generates a whsec_ secret returned once |
max_retries | integer | No | 0 | 0–5 |
curl -X POST "https://deepsy.fr/api/v1/webhooks" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"name": "Assessment integration",
"description": "Campaign and candidate evaluation events",
"url": "https://example.com/webhooks/deepsy",
"events": ["campaign.created", "candidate.evaluation_completed"],
"company_ids": ["c193a06f-1c25-4e65-84a7-95faaae7ae7b"],
"metadata": { "environment": "production" },
"signature_enabled": true,
"max_retries": 3
}'
Response (201 Created):
{
"webhook_id": "2b1f5a4e-6c3d-4c2a-9f10-3e4d5c6b7a89",
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"api_key_id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
"name": "Assessment integration",
"description": "Campaign and candidate evaluation events",
"url": "https://example.com/webhooks/deepsy",
"events": ["campaign.created", "candidate.evaluation_completed"],
"metadata": { "environment": "production" },
"status": "active",
"companies_id": [
{
"company_id": "c193a06f-1c25-4e65-84a7-95faaae7ae7b",
"authorized": true,
"events": ["campaign.created", "candidate.evaluation_completed"],
"updated_by_last": "550e8400-e29b-41d4-a716-446655440000",
"updated_at": "2026-01-10T10:00:00+00:00",
"company_name": "Acme Corporation",
"company_logo": null,
"company_status": "active"
}
],
"signature_enabled": true,
"max_retries": 3,
"created_at": "2026-01-10T10:00:00+00:00",
"updated_at": "2026-01-10T10:00:00+00:00",
"secret": "whsec_abcd1234..."
}
secret right awaysecret is only returned once, at creation (when signature_enabled: true) or on POST /webhooks/{webhook_id}/regenerate-secret. Later GET calls won't include it.
3. Manage your webhooks
All five endpoints require the owning API key:
| Method | Path | Parameters / body | Notes |
|---|---|---|---|
GET | /webhooks/list | page, limit (1–100), query (name, description, URL) | Returns { items, count, pages } |
GET | /webhooks/{webhook_id} | - | Returns the Webhook object (no secret) |
PUT | /webhooks/{webhook_id} | Any subset of name, description, url, events, metadata, status (active / inactive / suspended), signature_enabled, max_retries | Does not update company_ids and does not return a new secret |
DELETE | /webhooks/{webhook_id} | - | Deletes the webhook |
POST | /webhooks/{webhook_id}/regenerate-secret | None | Issues a new whsec_ secret and enables signatures (400 if suspended) |
4. Manage company authorizations
All five endpoints require an API key authorized for {company_id} with ADMINISTRATOR:
| Method | Path | Body | Effect |
|---|---|---|---|
GET | /companies/{company_id}/webhooks | - | Lists webhooks linked to {company_id} (accepts page, limit, query, order_by) |
POST | /companies/{company_id}/webhooks/{webhook_id}/authorize | { "events": [...] } (min 1) | Authorizes the webhook for this company |
PUT | /companies/{company_id}/webhooks/{webhook_id}/events | { "events": [...] } | Updates subscribed events for an already-authorized company (400 if not authorized) |
DELETE | /companies/{company_id}/webhooks/{webhook_id}/revoke | - | Sets authorized: false while keeping the company link so you can re-authorize later |
DELETE | /companies/{company_id}/webhooks/{webhook_id}/deny | - | Removes the company link, and deletes the webhook automatically if no authorized company remains |
# Authorize an existing webhook for a company
curl -X POST "https://deepsy.fr/api/v1/companies/{company_id}/webhooks/{webhook_id}/authorize" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{ "events": ["candidate.evaluation_completed"] }'
# Pause delivery for a company without deleting the webhook
curl -X DELETE "https://deepsy.fr/api/v1/companies/{company_id}/webhooks/{webhook_id}/revoke" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here"
5. Send a test event & check logs
# Trigger a test delivery
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"
}'
# Inspect delivery logs
curl "https://deepsy.fr/api/v1/webhooks/logs/list?webhook_id={webhook_id}" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here"
# Replay a failed delivery (log_id is an integer)
curl -X POST "https://deepsy.fr/api/v1/webhooks/logs/42/retry" \
-H "Authorization: Bearer deepsy-dev-your-api-key-here"
retry runs synchronously, ignores max_retries, resets retry_count to 0, and returns 502 if your receiver still fails. See Testing for the full schemas.
Delivery format at a glance
DeePsy sends an HTTP POST (Content-Type: application/json) with these headers:
| Header | Value |
|---|---|
X-Webhook-Event | Event name (e.g. candidate.evaluation_completed) |
X-Webhook-ID | Webhook UUID |
X-Webhook-Delivery | Unique UUID for this delivery chain (use for deduplication) |
User-Agent | DeePsy-Webhooks/1.0 |
X-Webhook-Signature | sha256=<hex> HMAC-SHA256 of the raw body (when signatures are enabled) |
Any 2xx counts as success. Timeouts are 30s, redirects aren't followed, and response bodies are saved in logs truncated to 8,000 characters.
For error responses (400, 401, 403, 404, 422, 502), see Common HTTP errors and Error handling.