VANITYPASS
White-label APIAuth

Login

Authenticate users and issue JWT tokens.

Login

Authenticate users and issue JWT tokens. Login is an email passcode flow. The X-App-Id header establishes app context and keeps authentication rate limits scoped to the requesting application.

Initiate Login

POST /v1/auths/login/initiate

Start login by requesting an email passcode. The response is deliberately generic and does not reveal whether the email belongs to an account: If an account matches, login instructions will be sent.

FieldTypeRequiredDescription
emailstringyesUser's email address.
Sandbox-only. Try-it requests target https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.
POST/v1/auths/login/initiate

Sandbox credentials

Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.

curl -X POST 'https://cloud.vanitypass.com/v1/auths/login/initiate' \
  -H 'Content-Type: application/json' \
  -H 'X-Environment: Sandbox' \
  -d '{"email":"user@example.com"}'

Complete Login

POST /v1/auths/login

Complete login with the emailed passcode. Returns access_token and refresh_token on success. Use email; user_id remains an optional legacy identifier and must not be sent together with email.

FieldTypeRequiredDescription
emailstringconditionallyUser's email address. Preferred; required when user_id is omitted.
user_idstring (uuid)conditionallyLegacy account identifier; required when email is omitted.
passcodestringyesThe emailed six-digit passcode.
Sandbox-only. Try-it requests target https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.
POST/v1/auths/login

Sandbox credentials

Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.

curl -X POST 'https://cloud.vanitypass.com/v1/auths/login' \
  -H 'Content-Type: application/json' \
  -H 'X-Environment: Sandbox' \
  -d '{"email":"user@example.com","passcode":"123456"}'

Authentication attempts are limited to 5 per 10 minutes per normalized identifier and application. A 429 response includes a dynamic Retry-After header.

Refresh Token

POST /v1/auths/refresh

Refresh an access token using a valid refresh token. Access tokens are short-lived; use this endpoint to obtain a new one without requiring the user to log in again.

FieldTypeRequiredDescription
refresh_tokenstringyesThe refresh token issued at login.
Sandbox-only. Try-it requests target https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.
POST/v1/auths/refresh

Sandbox credentials

Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.

curl -X POST 'https://cloud.vanitypass.com/v1/auths/refresh' \
  -H 'Content-Type: application/json' \
  -H 'X-Environment: Sandbox' \
  -d '{"refresh_token":"rt_example"}'

Logout

POST /v1/auths/logout

Revoke tokens and end the session. Both the access token and refresh token are invalidated. Subsequent requests using these tokens will receive 401 Unauthorized.

Sandbox-only. Try-it requests target https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.
POST/v1/auths/logout

Sandbox credentials

Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.

curl -X POST 'https://cloud.vanitypass.com/v1/auths/logout' \
  -H 'Content-Type: application/json' \
  -H 'X-Environment: Sandbox' \