Policies API
Base URL: https://api.torvussecurity.com/v1
Configure when and how vaults automatically release to recipients.
Get Vault Policy
GET /vaults/{vault_id}/policy
Retrieve the current release policy for a vault.
Example Request
curl -X GET https://api.torvussecurity.com/v1/vaults/vault_abc123/policy \
-H "Authorization: Bearer your_api_key"
Success Response (200 OK)
Inactivity Policy:
{
"type": "inactivity",
"frequency": "monthly",
"grace_period_days": 14,
"next_checkin_due": "2025-11-01T10:00:00Z",
"last_checkin": "2025-10-01T10:00:00Z",
"reminder_days_before": 3,
"backup_policy": null,
"created_at": "2025-10-01T10:00:00Z",
"updated_at": "2025-10-01T10:00:00Z"
}
Date-Based Policy:
{
"type": "date_based",
"release_date": "2026-01-01T00:00:00Z",
"timezone": "America/New_York",
"pre_release_notification_days": 7,
"created_at": "2025-10-01T10:00:00Z"
}
Manual Policy:
{
"type": "manual",
"backup_policy": {
"type": "inactivity",
"frequency": "quarterly",
"grace_period_days": 30
},
"created_at": "2025-10-01T10:00:00Z"
}
Configure Policy
PUT /vaults/{vault_id}/policy
Set or update the vault release policy.
Inactivity Policy Request
{
"type": "inactivity",
"frequency": "monthly",
"grace_period_days": 14,
"reminder_days_before": 3
}
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | inactivity |
frequency | string | Yes | daily, weekly, biweekly, monthly, quarterly |
grace_period_days | integer | Yes | Days after missed check-in (1-90) |
reminder_days_before | integer | No | Days before check-in to send reminder (1-7) |
Date-Based Policy Request
{
"type": "date_based",
"release_date": "2026-01-01T00:00:00Z",
"timezone": "America/New_York",
"pre_release_notification_days": 7
}
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | date_based |
release_date | string | Yes | ISO 8601 datetime |
timezone | string | Yes | IANA timezone identifier |
pre_release_notification_days | integer | No | Notify recipients before release (0-30) |
Manual Policy Request
{
"type": "manual",
"backup_policy": {
"type": "inactivity",
"frequency": "quarterly",
"grace_period_days": 30
}
}
Example Request
curl -X PUT https://api.torvussecurity.com/v1/vaults/vault_abc123/policy \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"type": "inactivity",
"frequency": "monthly",
"grace_period_days": 14,
"reminder_days_before": 3
}'
Success Response (200 OK)
{
"type": "inactivity",
"frequency": "monthly",
"grace_period_days": 14,
"next_checkin_due": "2025-11-08T16:30:00Z",
"last_checkin": null,
"reminder_days_before": 3,
"created_at": "2025-10-08T16:30:00Z",
"updated_at": "2025-10-08T16:30:00Z"
}
Error Responses
| Status Code | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid policy configuration |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | No permission to configure policies |
| 422 | Unprocessable Entity | Vault already released |
Delete Policy
DELETE /vaults/{vault_id}/policy
Remove the vault policy (reverts to manual release only).
Example Request
curl -X DELETE https://api.torvussecurity.com/v1/vaults/vault_abc123/policy \
-H "Authorization: Bearer your_api_key"
Success Response (204 No Content)
No response body. Vault reverts to manual release policy.
Pause Policy
POST /vaults/{vault_id}/policy/pause
Temporarily pause an inactivity policy (useful during travel or hospital stays).
Request Body
{
"pause_until": "2025-11-01T00:00:00Z",
"reason": "Traveling abroad"
}
Example Request
curl -X POST https://api.torvussecurity.com/v1/vaults/vault_abc123/policy/pause \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"pause_until": "2025-11-01T00:00:00Z",
"reason": "Traveling abroad"
}'
Success Response (200 OK)
{
"type": "inactivity",
"frequency": "monthly",
"grace_period_days": 14,
"paused": true,
"pause_until": "2025-11-01T00:00:00Z",
"pause_reason": "Traveling abroad",
"paused_at": "2025-10-08T16:45:00Z"
}
Resume Policy
POST /vaults/{vault_id}/policy/resume
Resume a paused policy.
Example Request
curl -X POST https://api.torvussecurity.com/v1/vaults/vault_abc123/policy/resume \
-H "Authorization: Bearer your_api_key"
Success Response (200 OK)
{
"type": "inactivity",
"frequency": "monthly",
"grace_period_days": 14,
"paused": false,
"next_checkin_due": "2025-11-08T16:50:00Z",
"resumed_at": "2025-10-08T16:50:00Z"
}
Rate Limits
| Endpoint | Rate Limit |
|---|---|
GET /vaults/{id}/policy | 100/minute |
PUT /vaults/{id}/policy | 20/minute |
POST /vaults/{id}/policy/pause | 10/minute |
POST /vaults/{id}/policy/resume | 10/minute |
Last Updated: October 8, 2025