Skip to main content

Get status

Retrieve the current dead man’s switch configuration, trusted recipients, recent activity logs, and countdown status.
GET /api/dead-man-switch
Authentication: Required Response 200 OK:
{
  "switch": {
    "id": "dms_abc123",
    "user_id": "usr_xyz",
    "enabled": true,
    "inactivity_days": 90,
    "notify_at_days": [30, 14, 7, 3, 1],
    "notify_via": ["email", "push"],
    "last_check_in": "2026-03-01T10:00:00Z",
    "next_trigger_at": "2026-05-30T10:00:00Z",
    "status": "idle",
    "confirmation_required": true,
    "secret_phrase": null
  },
  "recipients": [
    {
      "id": "rcpt_abc",
      "user_id": "usr_xyz",
      "recipient_email": "trusted@example.com",
      "recipient_name": "Trusted Friend",
      "status": "active",
      "wrapped_recovery_key": "base64-wrapped-key"
    }
  ],
  "recent_logs": [
    {
      "action": "check_in",
      "timestamp": "2026-03-01T10:00:00Z",
      "details": "Manual check-in"
    }
  ],
  "days_remaining": 87,
  "is_warning": false
}
StatusDescription
idleNormal operation, timer running
warningApproaching inactivity threshold
disabledSwitch is turned off

Configure switch

Create or update the dead man’s switch configuration. Requires step-up authentication.
POST /api/dead-man-switch
Authentication: Required CSRF: Required Step-up auth: 90 seconds Rate limit: 10 requests per 60 seconds (fail-closed) Request body:
{
  "enabled": true,
  "inactivity_days": 90,
  "notify_at_days": [30, 14, 7, 3, 1],
  "notify_via": ["email", "push"],
  "confirmation_required": true,
  "secret_phrase": "blue ocean sky"
}
FieldTypeRequiredDescription
enabledbooleanNoEnable or disable the switch
inactivity_daysintegerNoDays of inactivity before trigger (7-365)
notify_at_daysinteger[]NoDays before trigger to send reminders
notify_viastring[]NoNotification channels: email, push
confirmation_requiredbooleanNoRequire confirmation before transfer
secret_phrasestringNoSecret phrase for recipient verification
Response 201 Created (new) or 200 OK (update):
{
  "success": true,
  "switch": { ... }
}

Delete switch

Remove the dead man’s switch configuration and all pending transfers.
DELETE /api/dead-man-switch
Authentication: Required CSRF: Required Step-up auth: 90 seconds Response 200 OK:
{
  "success": true
}

Manual check-in

Reset the inactivity timer by performing a manual check-in.
POST /api/dead-man-switch/check-in
Authentication: Required CSRF: Required Rate limit: 10 requests per 60 seconds per user Response 200 OK:
{
  "success": true,
  "next_trigger_at": "2026-06-02T12:00:00Z",
  "days_until_trigger": 90
}
Regular logins to PassAgent also reset the inactivity timer automatically. Manual check-in is available for users who want to explicitly confirm their activity.

Emergency access

Endpoints for trusted recipients to retrieve vault access keys after the switch triggers.

Get access key

GET /api/vault/emergency/access?contact_id={id}
Authentication: Required (recipient only) Access conditions:
  • Recipient status must be access_granted
  • Access must not be expired
Response 200 OK:
{
  "wrapped_access_key": "base64-wrapped-key",
  "invite_salt": "base64-salt"
}
Errors:
  • 403 Forbidden — access not granted or expired
  • 404 Not Found — contact record not found
  • 410 Gone — access window expired