Token VaultDocs
ReferenceWebhook Protocol

Health and Tests

Check your webhook from Settings > Webhook > Health with Verify Connection and Webhook Tests, and the API routes behind them.

Token Vault checks your bound webhook from Settings > Webhook. The Health tab has two tools: a connection check and a protocol test run.

Verify Connection

Verify Connection sends a signed POST /v1/health to your webhook and records the result. The card shows a badge (Healthy, or the status your webhook returned) and, on failure, a Connection Issue note with the status and HTTP code. A successful check also refreshes the capability list that Token Vault stores for your webhook.

POST /api/vault/webhook/health HTTP/1.1
Authorization: Bearer <Firebase ID token>

Token Vault also checks health in the background. Each check follows the retry and circuit-breaker policy.

Webhook Tests

Webhook Tests > Run Now runs the whole protocol against your webhook and saves the result. The card shows "Last run" with the time, and pass, fail or warning for each step.

# the same run, as a request
curl -X POST https://api.tokenvault.uk/api/vault/webhook/test-all \
  -H "Authorization: Bearer $FIREBASE_ID_TOKEN"

The run needs a signed-in human and an unlocked vault. It does not accept API keys, and Stop all access stops it. It writes only its own test data (keys that start with __tv_test_, and vault_config/_debug_test_all) and removes it. Your real credentials are not touched.

The steps

Health. POST /v1/health.

List tokens. POST /v1/storage list, to take a baseline.

Store a test entry through /v1/storage set.

Read it back with get and validate the response shape.

Batch list. list_batch over tokens and audit.

Browser-direct store. A real store ticket is sent to POST /v1/store with a test value, as the browser would.

Verify the direct store persisted.

Clean up the direct-store entry (__tv_test_store_direct).

Security checks. Three tests, described below.

Delete the test entry.

Verify deletion. Reading it back must return null.

Security checks

CheckSent toExpectedIf it fails
Forged credential ticketGET /v1/credential401 or 403: a ticket signed with a random key is rejectedAnyone who finds your webhook URL could bypass Token Vault and read credentials
Real ticket from the Token Vault IPGET /v1/credentialRejected if you filter by IP. A warning if acceptedNo network-level isolation. HMAC still protects the request
Forged store ticketPOST /v1/store401 or 403An attacker could overwrite stored credentials

The IP check only means something if you allowlist the Token Vault egress IP as described there. A webhook without IP filtering shows a warning, not a failure.

TOTP migration

POST /api/vault/webhook/migrate asks your webhook to run POST /v1/admin/migrate. It moves any stored totpUri into an encrypted secret and returns counts only (scanned, migrated, failed). It needs the ticketConstraints capability. Without a bound webhook or the capability, the route answers 412.

Update banner

If your webhook lacks a capability that the latest reference release has, the dashboard shows an update banner. The list is on Tickets and capabilities. To update, see Update your webhook.

API routes

All routes are under /api/vault and require a signed-in human. Scoped API keys cannot call them.

RouteNeeds unlocked vaultDescription
POST /webhook/healthnoProbe the webhook and record the result
POST /webhook/testnoTime a probe of the main paths
POST /webhook/test-endpointyesTest one endpoint
POST /webhook/test-allyesRun the full workflow above
GET /webhook/test-resultsnoThe last saved test-all results
POST /webhook/migrateyesRun the TOTP sweep

Ready to try it?

Sign in with Google or email. Your credentials stay on your own webhook, and the quickstart gets Claude Code making its first MCP tool call in about 15 minutes.

On this page