Skip to content

REST API Reference

https://api.passbox.dev/api/v1

All requests use JSON. Protected endpoints require an Authorization: Bearer <token> header.

MethodPathDescription
POST/auth/registerRegister new account
POST/auth/loginLogin with email + password
POST/auth/refreshRefresh access token
GET/auth/recovery-infoGet recovery key info
POST/auth/recoverRecover account with recovery key
MethodPathDescription
GET/auth/keysGet user’s encryption keys
POST/auth/setup-keysSet up encryption keys (OAuth users)
POST/auth/change-passwordChange password
DELETE/auth/delete-accountDelete account
GET/auth/service-tokensList service tokens
POST/auth/service-tokenCreate service token
DELETE/auth/service-token/:idRevoke service token
MethodPathDescription
GET/vaultsList vaults
POST/vaultsCreate vault
GET/vaults/:idGet vault
DELETE/vaults/:idDelete vault (owner only)
POST /vaults
{
"name": "my-app",
"description": "Production secrets",
"encryptedVaultKey": "{...}"
}
MethodPathDescription
GET/vaults/:vaultId/secretsList secrets
POST/vaults/:vaultId/secretsCreate secret
GET/vaults/:vaultId/secrets/:nameGet secret by name
PUT/vaults/:vaultId/secrets/:nameUpdate secret
DELETE/vaults/:vaultId/secrets/:nameDelete secret
GET/vaults/:vaultId/secrets/:name/versionsGet version history
POST/vaults/:vaultId/secrets/bulkBulk create/update

All secret endpoints accept ?environmentId=<uuid> to target a specific environment.

POST /vaults/:vaultId/secrets
{
"name": "DATABASE_URL",
"encryptedValue": {
"iv": "base64...",
"ciphertext": "base64...",
"tag": "base64...",
"algorithm": "aes-256-gcm"
},
"description": "Main database",
"tags": ["database"],
"environmentId": "uuid"
}
POST /vaults/:vaultId/secrets/bulk
{
"secrets": [
{
"name": "KEY1",
"encryptedValue": { "iv": "...", "ciphertext": "...", "tag": "...", "algorithm": "aes-256-gcm" }
}
],
"environmentId": "uuid"
}

Response:

{
"success": true,
"data": { "created": 3, "updated": 1, "errors": [] }
}
MethodPathDescription
GET/vaults/:vaultId/environmentsList environments
POST/vaults/:vaultId/environmentsCreate environment
PUT/vaults/:vaultId/environments/:envIdUpdate environment
DELETE/vaults/:vaultId/environments/:envIdDelete environment
POST/vaults/:vaultId/environments/:envId/cloneClone from another env
POST /vaults/:vaultId/environments
{
"name": "staging",
"description": "Staging environment"
}
POST /vaults/:vaultId/environments/:envId/clone
{
"fromEnvironmentId": "source-env-uuid"
}
MethodPathDescription
GET/vaults/:vaultId/membersList vault members
POST/vaults/:vaultId/membersAdd member (with encrypted vault key)
PUT/vaults/:vaultId/members/:userIdUpdate member role
DELETE/vaults/:vaultId/members/:userIdRemove member
MethodPathDescription
GET/vaults/:vaultId/webhooksList webhooks
POST/vaults/:vaultId/webhooksCreate webhook
PUT/vaults/:vaultId/webhooks/:idUpdate webhook
DELETE/vaults/:vaultId/webhooks/:idDelete webhook
POST/vaults/:vaultId/webhooks/:id/testSend test event
MethodPathDescription
GET/vaults/:vaultId/secrets/:name/rotationGet rotation config
PUT/vaults/:vaultId/secrets/:name/rotationSet rotation config
DELETE/vaults/:vaultId/secrets/:name/rotationRemove rotation
POST/vaults/:vaultId/secrets/:name/rotateTrigger manual rotation
MethodPathDescription
GET/auditGet audit logs (filtered by plan retention)
MethodPathDescription
GET/billing/subscriptionGet current subscription
POST/billing/checkoutCreate Stripe checkout session
POST/billing/portalCreate Stripe portal session
MethodPathDescription
GET/admin/statsPlatform statistics
GET/admin/usersList users
GET/admin/waitlistList waitlist entries
MethodPathDescription
GET/healthHealth check (DB probe)
POST/waitlistJoin waitlist
POST/webhook/stripeStripe webhook (HMAC verified)
Endpoint GroupLimit
Auth (login/register/recover)5 req/min
Token refresh20 req/min
API (all protected routes)60 req/min
Waitlist10 req/min

All errors follow this format:

{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message"
}
}

Common error codes:

  • UNAUTHORIZED (401)
  • FORBIDDEN (403)
  • NOT_FOUND (404)
  • CONFLICT (409)
  • VALIDATION_ERROR (400)
  • PLAN_LIMIT (403)
  • INTERNAL (500)