Logo

Reference

API Reference

The EnvVault REST API powers the dashboard, CLI, and SDKs. Base URL: https://api.envvault.com. All endpoints return JSON. Use the CLI's ENVVAULT_API_URL override for self-hosted deployments.

Authentication

Send the API key as a Bearer token:

Authorization: Bearer evk_xxxxxxxxxxxxxxxxx

Create keys at /dashboard/api-keys. The CLI prefix /api/v1/cli serves the CLI/SDK surface. Browser clients use /api/v1 with an authenticated session cookie.

Rate Limits

Default limits per IP:

  • /api/v1/secrets and /api/v1/cli/secrets — 100 requests / 15 minutes
  • All other endpoints — 1000 requests / 15 minutes

Exceeded limits return 429 Too Many Requests with a Retry-After header.

CLI & SDK Endpoints (/api/v1/cli)

MethodPathDescription
GET/cli/verifyValidate the bearer token; returns org and user info.
GET/cli/projectsList projects accessible to the key.
GET/cli/projects/:id/environments/:envList variables in a project + environment.
POST/cli/envSet / update a project variable.
GET/cli/secretsList org secrets metadata (paginated).
GET/cli/secrets/:keyRead a single org secret value.
POST/cli/secretsCreate / update an org secret. Auto-versions.
POST/cli/secrets/batchBatch read up to 100 secret keys.
DELETE/cli/secrets/:keyDelete an org secret.

Browser Endpoints (/api/v1)

These endpoints back the dashboard. They accept session cookies, not bearer tokens.

Auth

MethodPathDescription
POST/auth/registerCreate a new user + organization.
POST/auth/loginSign in. Returns 2FA challenge if enabled.
POST/auth/login/verify-2faSubmit TOTP code to complete login.

Projects

MethodPathDescription
GET/projectsList projects in the active organization.
POST/projectsCreate a project.
PUT/projects/:idRename / update a project.
DELETE/projects/:idDelete a project (and its variables).
GET/projects/:id/environmentsList environments under a project.
POST/projects/:id/environmentsCreate a custom environment.
DELETE/projects/:id/environments/:envIdDelete a custom environment.

Secrets

MethodPathDescription
GET/secretsList org secrets.
POST/secretsCreate / update an org secret.
GET/secrets/:keyRead a secret value.
POST/secrets/batchBatch read.
DELETE/secrets/:keyDelete an org secret.

Team

MethodPathDescription
GET/teams/membersList org members.
POST/teams/invitationsSend invitation by email.
PUT/teams/member/:id/accessChange a member's role.
DELETE/teams/member/:idRemove a member.
DELETE/teams/member/revoke-invitation/:invIdRevoke a pending invite.

API Keys

MethodPathDescription
GET/tokens/list-tokensList API keys.
POST/tokensCreate an API key.
POST/tokens/edit-tokenUpdate key scope or expiry.
DELETE/tokens/revoke-tokenRevoke an API key.

Audit Logs

MethodPathDescription
POST/audit-logsList logs with filters in the body.
GET/audit-logs/categoriesList event categories.

Error Shape

All errors share the same envelope:

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Secret 'STRIPE_SECRET_KEY' not found in environment 'production'",
    "requestId": "req_3hSXh..."
  }
}

Common HTTP statuses: 400 (validation), 401 (auth), 403 (role), 404 (not found), 409 (conflict), 429 (rate limit), 500 (server).

Limits

Secret key length256 chars
Secret value size1 MB
Description length512 chars
Tags per secret20
Batch get size100 keys