Skip to main content

Webhooks

⚠️ COMING SOON - NOT YET IMPLEMENTED

This feature is currently under development and is not available for use.

The webhook system documented on this page has not yet been implemented. Attempting to configure webhooks or use the endpoints described below will result in 404 errors.

Expected Release: Q1 2026

If you need real-time notifications about vault events, please contact support to discuss alternative solutions or be notified when webhooks become available.

Base URL: https://api.torvussecurity.com/v1 (when available)

Webhooks will allow you to receive real-time HTTP notifications when events occur in your vaults.


Webhook Events​

Subscribe to the following events:

EventDescription
vault.createdNew vault created
vault.updatedVault settings updated
vault.releasedVault released to recipients
vault.deletedVault permanently deleted
document.uploadedNew document added to vault
document.deletedDocument removed from vault
recipient.addedRecipient added to vault
recipient.removedRecipient removed from vault
checkin.completedCheck-in completed
checkin.missedCheck-in deadline missed
policy.updatedRelease policy changed

Webhook Payload Format​

All webhook POST requests use this format:

{
"id": "evt_abc123xyz",
"type": "vault.released",
"created_at": "2025-10-08T17:30:00Z",
"data": {
"vault_id": "vault_abc123",
"vault_name": "Digital Legacy Vault",
"released_at": "2025-10-08T17:30:00Z",
"recipient_count": 3
},
"metadata": {
"user_id": "user_def456",
"account_id": "acct_ghi789"
}
}

Create Webhook​

POST /webhooks

Register a new webhook endpoint.

Request Body​

{
"url": "https://yourserver.com/webhooks/torvus",
"events": ["vault.released", "checkin.missed"],
"secret": "your_webhook_secret_key",
"enabled": true
}

Parameters:

FieldTypeRequiredDescription
urlstringYesHTTPS URL to receive webhook POSTs
eventsarrayYesList of events to subscribe to
secretstringNoSecret for HMAC signature verification
enabledbooleanNoEnable webhook (default: true)

Example Request​

curl -X POST https://api.torvussecurity.com/v1/webhooks \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourserver.com/webhooks/torvus",
"events": ["vault.released", "checkin.missed"],
"secret": "your_webhook_secret"
}'

Success Response (201 Created)​

{
"id": "webhook_xyz789",
"url": "https://yourserver.com/webhooks/torvus",
"events": ["vault.released", "checkin.missed"],
"enabled": true,
"created_at": "2025-10-08T17:35:00Z",
"secret_set": true
}

List Webhooks​

GET /webhooks

Get all registered webhooks.

Example Request​

curl -X GET https://api.torvussecurity.com/v1/webhooks \
-H "Authorization: Bearer your_api_key"

Success Response (200 OK)​

{
"data": [
{
"id": "webhook_xyz789",
"url": "https://yourserver.com/webhooks/torvus",
"events": ["vault.released", "checkin.missed"],
"enabled": true,
"created_at": "2025-10-08T17:35:00Z",
"last_delivery": "2025-10-08T18:00:00Z",
"delivery_success_rate": 100
}
],
"total": 1
}

Update Webhook​

PATCH /webhooks/{webhook_id}

Update webhook configuration.

Request Body​

{
"events": ["vault.released", "vault.deleted", "checkin.missed"],
"enabled": true
}

Example Request​

curl -X PATCH https://api.torvussecurity.com/v1/webhooks/webhook_xyz789 \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"events": ["vault.released", "vault.deleted"],
"enabled": true
}'

Success Response (200 OK)​

{
"id": "webhook_xyz789",
"url": "https://yourserver.com/webhooks/torvus",
"events": ["vault.released", "vault.deleted"],
"enabled": true,
"updated_at": "2025-10-08T17:40:00Z"
}

Delete Webhook​

DELETE /webhooks/{webhook_id}

Remove a webhook.

Example Request​

curl -X DELETE https://api.torvussecurity.com/v1/webhooks/webhook_xyz789 \
-H "Authorization: Bearer your_api_key"

Success Response (204 No Content)​

No response body.


Verify Webhook Signatures​

All webhook POST requests include an X-Torvus-Signature header with HMAC-SHA256 signature:

X-Torvus-Signature: sha256=abc123def456...

Verification Example (Node.js)​

const crypto = require('crypto');

function verifyWebhookSignature(payload, signature, secret) {
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.digest('hex');

return `sha256=${expectedSignature}` === signature;
}

// Express.js example
app.post('/webhooks/torvus', (req, res) => {
const signature = req.headers['x-torvus-signature'];
const isValid = verifyWebhookSignature(req.body, signature, 'your_webhook_secret');

if (!isValid) {
return res.status(401).send('Invalid signature');
}

// Process webhook
console.log('Event:', req.body.type);
res.status(200).send('OK');
});

Retry Policy​

If webhook delivery fails, Torvus will retry:

AttemptDelay
1Immediate
21 minute
35 minutes
430 minutes
52 hours
66 hours

After 6 failed attempts, the webhook event is marked as failed. You can view failed deliveries in the dashboard.


Webhook Delivery Logs​

GET /webhooks/{webhook_id}/deliveries

Get delivery history for a webhook.

Query Parameters​

ParameterTypeRequiredDescription
limitintegerNoNumber of records (default: 50, max: 200)
statusstringNoFilter by: success, failed, pending

Example Request​

curl -X GET "https://api.torvussecurity.com/v1/webhooks/webhook_xyz789/deliveries?limit=10" \
-H "Authorization: Bearer your_api_key"

Success Response (200 OK)​

{
"webhook_id": "webhook_xyz789",
"deliveries": [
{
"id": "delivery_abc123",
"event_type": "vault.released",
"attempted_at": "2025-10-08T18:00:00Z",
"status": "success",
"response_code": 200,
"response_time_ms": 145,
"attempts": 1
},
{
"id": "delivery_def456",
"event_type": "checkin.missed",
"attempted_at": "2025-10-07T12:00:00Z",
"status": "failed",
"response_code": 500,
"attempts": 6,
"last_error": "Connection timeout"
}
],
"pagination": {
"limit": 10,
"total": 24
}
}

Rate Limits​

EndpointRate Limit
POST /webhooks20/minute
GET /webhooks100/minute
PATCH /webhooks/{id}50/minute
DELETE /webhooks/{id}20/minute

Webhook Delivery Limits:

  • Maximum 100 webhook deliveries per minute per endpoint
  • If exceeded, deliveries are queued and delayed

Best Practices​

  1. Acknowledge Quickly: Respond with 200 OK within 5 seconds
  2. Process Async: Queue webhook payload for background processing
  3. Verify Signatures: Always verify HMAC signatures
  4. Use HTTPS: Webhook URLs must use HTTPS
  5. Monitor Failures: Check delivery logs regularly
  6. Idempotent Handling: Use event IDs to prevent duplicate processing

Last Updated: October 8, 2025