passvak API
One identity for every product. Base URL https://api.passvak.com. JSON in, JSON out. Credentials go in Authorization: Bearer ….
Overview
passvak holds accounts, sessions, teams, API keys and the "Sign in with passvak" server. It does not send anything itself: codes travel through mailvak (email) and linevak (text), so passvak holds no email or SMS credentials. It knows nothing product-specific: your app gets an id, a brand and a plan, and reads /me.
/oauth/authorize or call /signin with product set to your client id, then read /me. Free up to 1,000 active users a month per app; plans above that.| Credential | Prefix | Who holds it | Can do |
|---|---|---|---|
| Session | pvs_ | A person, after typing a code or a "Continue with …" button | Everything on the account page. 30 days, or the sessionTtl your app asked for (5 minutes and up). |
| API key | pvk_live_ | A person's program, for ONE product | Read /me. The product checks key.product is itself. |
| Access token | pvt_ | An app, after "Sign in with passvak" | Read /me and /oauth/userinfo. 24 h, refreshable. |
Only a session may change anything. A key or token that tries gets 403 forbidden.
Sign in by code
POST /signin
{ "identifier": "ana@example.com", "lang": "es", "product": "CelDrive" }
→ { "ok": true, "channel": "email", "to": "a••@example.com", "expiresIn": 600 }
POST /verify
{ "identifier": "ana@example.com", "code": "482913", "device": "CelDrive iOS" }
→ { "ok": true, "token": "pvs_…", "sessionId": "ses_…", "account": { "id": "acct_…", "email": "ana@example.com", … }, "isNew": true, "expiresIn": 2592000 }
identifier is an email address or a phone number (ten US digits are taken as +1). product is your client id (app_…, or a first-party id like celdrive): the code message carries that app's name — and its colour, logo and one-tap link on plans that include them — and the sign-in counts as one of the app's active users. An unregistered string is used as a plain name. lang picks the message's language and is remembered on a new account. A code works once, expires in 10 minutes, and dies after five wrong guesses. GET /channels says which channels can deliver right now; a channel that can't answers 503.
POST /verify and POST /verify-link also take sessionTtl (seconds, 300 to 2,592,000): an app that keeps its own session after reading /me can ask for a short passvak one instead of leaving a 30-day session behind. The answer's expiresIn is the real length, and method says how the person signed in (email, phone, whatsapp, passkey, backup_code, password, google, microsoft, github).
| Field | On | Means |
|---|---|---|
product | /signin | Your client id. Brands the message and meters the sign-in. |
returnTo | /signin | One of your registered redirect addresses. The email then also carries a one-tap "Sign in to app" button that lands there with ?pvt=<token>; your server trades it at POST /verify-link { token, device } for a session. Pro and Business plans. |
method | /signin | "link": the email shows only the button, no code (for pages that take links, not codes). |
purpose | both | "check": prove the address only — see below. |
device | /verify, /verify-link | A label for the session list ("Acme iOS"). Otherwise the browser and system family. |
Check-only codes
To prove a person owns an address without signing anyone up — a private link shared to an email, a recovery contact — add "purpose": "check" to both calls. The email says "Your taxvak code" instead of "sign-in code", no account is created, no session is opened, and the answer is just the proven address.
POST /signin { "identifier": "accountant@example.com", "product": "taxvak", "purpose": "check" }
POST /verify { "identifier": "accountant@example.com", "code": "482913", "purpose": "check" }
→ { "ok": true, "purpose": "check", "channel": "email", "identifier": "accountant@example.com", "email": "accountant@example.com" }
A check code can never open a session, even if purpose is left off /verify. A sign-in code can be downgraded to a check by verifying it with purpose: "check".
If a product's own sender can't deliver (not yet verified on mailvak, or down), the code goes out from passvak's sender instead, so a sign-in never fails because of branding.
Codes by WhatsApp
Add "via": "whatsapp" to POST /signin with a phone number and the code goes by WhatsApp instead of a text. /verify is unchanged; the session's method is whatsapp. Until WhatsApp is switched on the answer is 503 whatsapp_unavailable: offer a text instead.
Passkeys
Sign in with the face, fingerprint or PIN of the person's phone or laptop: no code, no email, no phone needed. A passkey belongs to the site it was made on. Your page runs the browser half; your server passes the result to passvak with the page's origin, which must be the origin of one of your registered return addresses. Ask for the public key and authenticator data with response.getPublicKey() and response.getAuthenticatorData(), and send binary fields as base64url.
POST /passkeys/options (full session) { "origin": "https://yourapp.com", "product": "yourapp" } → { publicKey } for navigator.credentials.create
POST /passkeys (full session) { challenge, id, clientDataJSON, authenticatorData, publicKey, publicKeyAlgorithm, transports?, name? }
GET /passkeys (full session) → { passkeys: [ { id, name, site, createdAt, lastUsedAt } ] }
POST /passkeys/remove (full session) { "id": "…" }
POST /signin/passkey/options { "origin": "https://yourapp.com", "product": "yourapp" } → { publicKey } for navigator.credentials.get
POST /signin/passkey { challenge, id, clientDataJSON, authenticatorData, signature, userHandle?, product?, device?, sessionTtl? } → the same answer as /verify
Face, fingerprint or PIN is required (userVerification: "required"). Each challenge works once and lasts five minutes. Offer a passkey right after the first sign-in.
Backup codes
Ten one-time codes for a lost phone with no laptop. Shown once; making a new set replaces the old one. Each opens a full session once.
POST /me/backup-codes (full session) → { codes: ["ABCDE-FGH23", …] }
GET /me/backup-codes (full session) → { remaining }
POST /signin/backup { "identifier": "ana@example.com", "code": "ABCDE-FGH23" } → the same answer as /verify, plus backupCodesLeft
More emails, a phone, and joining accounts
One account can hold several emails and a phone; each signs in to the same account. Prove a new one with a check code; if it already had its own account, that account is folded into this one (its sessions end, its passkeys move, account.mergedFrom lists the old ids so your app can fold its own records).
POST /signin { "identifier": "+18095550100", "purpose": "check" }
POST /me/identifiers (full session) { "identifier": "+18095550100", "code": "482913" } → { attached } or { joined, mergedFrom }
POST /me/primary (full session) { "email": "hello@yourbusiness.com" } the main email apps see
POST /me/identifiers/remove (full session) { "identifier": "old@example.com" } a second email; never the main one
POST /me/email (full session) { "email": "new@yourbusiness.com", "code": "482913" } change the sign-in email (check code to the new one; the old one stops; 409 email_in_use, never joined)
POST /me/handoff (full session) { "product": "domainsorted", "returnTo": "https://domainsorted.com/start?mine=1" } → { url } one tap into another of our products, already signed in (single-use, 2 min, registered pages only)
/me shows account.email (the main one) and, when there are more, account.emails. A join is refused (409 join_needs_help, nothing changed) when the other account has teams, API keys, apps or connected accounts, or a different phone.
Password: the inbox only
Passwords are the easiest way in for thieves, so a passvak password opens only the email inbox of the address it signs in as: never the account, payments, domains, keys, teams or other apps. It is set from a full session and is accepted only by products that hold mailboxes. Every password sign-in answers with a reminder to add a passkey or use a code; show it.
POST /me/password (full session) { "password": "a short sentence works" } 12 to 200 characters
POST /me/password/remove (full session) → also signs out every password session
POST /signin/password { "identifier": "hello@yourbusiness.com", "password": "…", "product": "mailvak" }
→ { ok, token, access: "inbox", method: "password", expiresIn ≤ 86400, reminder }
An inbox session may only call GET /me and sign itself out (POST /sessions/revoke with its own id). Everything else answers 403 full_signin_needed. Five wrong passwords pause password sign-in for 15 minutes; codes and passkeys keep working.
The /me contract
The one call every product makes. Works with any of the three credentials.
GET /me
Authorization: Bearer pvk_live_…
→ {
"ok": true,
"account": { "id": "acct_…", "email": "ana@example.com", "phone": null, "name": "Ana Pérez", "lang": "es", "createdAt": "…", "lastSignInAt": "…" },
"via": "key",
"key": { "id": "key_…", "product": "celdrive", "scopes": ["*"], "teamId": "team_…", "label": "laptop" },
"teams": [ { "id": "team_…", "name": "Panadería Luna", "role": "owner", "members": 3 } ]
}
With a session, /me also says access (full, or inbox after a password sign-in, with inbox: the one address it opens) and security: { passkeys, password, backupCodes }, so your page can suggest the next way in.
access is inbox, open only that mailbox. Never treat it as a signed-in account.key.product equals its own id. A key minted for celdrive is worthless at Unyplex by design.Sessions
GET /sessions → { sessions: [ { id, device, method, ip, createdAt, lastSeenAt, expiresAt, current } ] }
POST /sessions/revoke { "id": "ses_…" }
POST /sessions/revoke-all { "keepCurrent": true } → also revokes every app token
A full session lasts 30 days and moves forward while it's used, up to a year, like a mail app on your own phone. A password session lasts a day.
ip is shortened (203.0.113.x); the full address is never stored. GET /me/log returns the last 50 sign-ins and account changes.
Teams and roles
GET /teams → { teams: [ { id, name, role, members } ] }
POST /teams { "name": "Panadería Luna" }
GET /teams/:id → { team, members: [ { accountId, role, name, email, phone, joinedAt } ], invites }
POST /teams/:id/invite { "email": "bob@example.com", "role": "admin" } → emails an invitation (7 days)
POST /teams/:id/cancel-invite { "email" }
POST /teams/:id/role { "accountId", "role": "owner" | "admin" | "member" }
POST /teams/:id/remove { "accountId" }
POST /teams/:id/rename { "name" }
POST /teams/:id/leave
POST /invites/accept { "token" } — by the signed-in account whose email was invited
| Role | Can |
|---|---|
| owner | Everything: rename, roles, remove anyone, team keys. A team always keeps at least one owner. |
| admin | Invite, cancel invites, remove members and admins, see and revoke team keys. |
| member | Read the team. |
API keys
GET /keys → { keys: [ { id, product, scopes, label, teamId, createdAt, lastUsedAt } ] }
POST /keys { "product": "celdrive", "label": "laptop", "teamId": "team_…", "scopes": ["files:read"] }
→ { "ok": true, "key": "pvk_live_…", "id": "key_…", … } — the key is shown once
POST /keys/revoke { "id": "key_…" }
GET /teams/:id/keys — owners and admins
Keys are stored hash-only. product is a slug ([a-z0-9-]); scopes are free-form strings the product interprets, default ["*"].
Export and delete
GET /me/export → a JSON file with the account, sessions, teams, keys, apps and log
POST /me/delete { "confirm": true }
Deletion is refused with 409 owns_team_with_members while the person is the only owner of a team that still has other members. Teams they alone are in are deleted with them.
Sign in with passvak — OAuth 2.1
Authorization Code with PKCE (S256), public clients, refresh tokens. Discovery at /.well-known/oauth-authorization-server.
1. Send the person to
GET https://api.passvak.com/oauth/authorize
?response_type=code&client_id=celdrive
&redirect_uri=https://app.celdrive.com/auth/passvak
&code_challenge=<base64url(sha256(verifier))>&code_challenge_method=S256
&scope=openid email teams&state=<random>&ui_locales=es
&resource=https://api.yourapp.com/mcp (optional, RFC 8707: see "Tokens for your API")
passvak shows the consent screen (in their language), signs them in by code
or a "Continue with …" button if they aren't already, and redirects to
redirect_uri?code=pvcode_…&state=…&iss=https://api.passvak.com (iss: RFC 9207)
2. Exchange the code (form-encoded or JSON)
POST /oauth/token
grant_type=authorization_code&code=pvcode_…&code_verifier=…&client_id=celdrive&redirect_uri=…
→ { "access_token": "pvt_…", "token_type": "Bearer", "expires_in": 86400, "refresh_token": "pvr_…", "scope": "openid email teams" }
3. Who is it?
GET /oauth/userinfo (or GET /me)
→ { "sub": "acct_…", "email": "…", "email_verified": true, "phone_number": null, "name": "…", "locale": "es", "teams": [ … ], "client_id": "…", "aud": "https://api.yourapp.com/mcp" }
Later: POST /oauth/token grant_type=refresh_token&refresh_token=pvr_… (rotates both tokens)
POST /oauth/revoke { "token": "pvt_… | pvr_…" }
POST /oauth/introspect { "token": "pvt_… | pvr_…" } → { "active": true, "sub", "aud", "client_id", "scope", "exp" } (RFC 7662)
Scopes: openid profile email phone teams. The person can cut your app off from their account page at any time ("Apps you've allowed"); your token then answers 401 with a WWW-Authenticate header pointing at discovery.
Tokens for your API or MCP server
When your app is a resource server — an API, or an MCP server people add to their AI assistant — the assistant is the OAuth client and passvak is the authorization server. Your server's /.well-known/oauth-protected-resource lists "authorization_servers": ["https://api.passvak.com"]; the assistant registers itself (POST /oauth/register, no secret), walks the person through passvak's consent screen and sends you Bearer pvt_….
Check the token is for you. A pvt_ token a person granted to some other app also names that person, so never accept one on its say-so. Assistants that follow the MCP spec send resource=<your URL> to /oauth/authorize and /oauth/token; passvak binds the token to it (a token exchange that names a different resource answers 400 invalid_target) and returns it as aud from /oauth/userinfo and /oauth/introspect. Your server requires aud to equal its own URL and refuses the token otherwise. The consent screen tells the person what is being opened ("Assistant will use your account at api.yourapp.com").
POST https://api.passvak.com/oauth/introspect
token=pvt_… (form-encoded or JSON)
→ { "active": true, "sub": "acct_…", "aud": "https://api.yourapp.com/mcp", "client_id": "pvc_…", "scope": "openid email teams", "exp": 1760000000, "token_type": "Bearer" }
→ { "active": false } (unknown, expired or revoked)
Product permissions. With resource=, a client may also ask for <product> or <product>:<action>; the consent screen lists them in plain words and introspection returns them in scope. Each permission has one name. Sending texts through linevak is linevak:send_text (linevak's send_text tool; CelVak checks exactly this string). The older name linevak:send is still accepted when asked for, and passvak always hands it back as linevak:send_text, also for tokens issued before the rename. Check for the canonical name only. /.well-known/mcp.json lists the aliases under authorization.scope_aliases.
Dynamic clients (pvc_…) used to die 90 days after registration even when in daily use; now every token exchange or refresh restarts the 90 days, so a connector someone keeps using keeps working. The authorize redirect carries iss (RFC 9207) and discovery says authorization_response_iss_parameter_supported: true, which lets assistants with a fixed callback address use it.
Create an app
Sign in at passvak.com/account, open Your apps, give the app a name and the address to send people back to. You get a client_id (app_…) on the spot; there is no secret, because every client is a public PKCE client. The same page shows this month's active users, lets you set the colour and logo for the code email, change the plan, and delete the app.
Redirect addresses must be https://, or http://localhost / http://127.0.0.1 for development, up to ten per app. An app can belong to a team: its owners and admins manage it, its members don't.
Programs can do the same through the developer API. Anonymous registration still exists for tools that need it: POST /oauth/register (RFC 7591) returns a pvc_… client on the Free plan that expires after 90 days and cannot be upgraded or branded.
Our own products are registered by the operator with a fixed client_id (celdrive, unyplex, mailvak, pentasor, linevak, taxvak, covervoz) on the family plan.
userinfo
Standard shape: sub is the account id. teams is the same array /me returns. Nothing else about the person exists to give.
Branded codes
Every code email names your app ("482913 is your Acme Books sign-in code") and ends with a one-line "Sign-in secured by passvak". On Pro and Business the email also carries your colour and your logo (a 96 px PNG at the URL you set), and returnTo adds the one-tap button. Outside apps' codes are sent from passvak's own address; Business apps can have codes sent from their own domain — write to us and we set it up with you. Our own products send from their own mailvak sender.
Continue with Google, Microsoft, GitHub
People can sign in with an account they already have. passvak is the OpenID Connect client of each provider; your app never talks to a provider, holds no provider secret, and sees the same /me as always. The email code stays as the default and the fallback; the buttons sit above it.
Turn it on per app: on your app's page under Your apps tick the providers you want (or send "providers": ["google","github"] through the developer API). Only providers passvak has credentials for are offered, and an app that lists none shows no button anywhere — a surface carries a provider's name only where you chose it.
1. Which buttons to show
GET /signin/providers?product=app_…
→ { "providers": [ { "id": "google", "label": "Google", "url": "https://api.passvak.com/signin/with/google?product=app_…" } ] }
2. The button is a link
<a href="https://api.passvak.com/signin/with/google?product=app_…&returnTo=https://yourapp.com/app&lang=es&device=yourapp">Continue with Google</a>
returnTo must be one of your registered redirect addresses (exact, or exact + "?…"). Omitted: the first one.
3. The person comes back to returnTo?pvt=<token> — the very same one-tap token the email link uses
POST /verify-link { "token": "<pvt>", "device": "yourapp" }
→ { "ok": true, "token": "pvs_…", "account": { … }, "isNew": false, "method": "google", "expiresIn": 2592000 }
Or returnTo?pv_error=verify_email&pv_email=ana@example.com — the provider couldn't vouch for that email:
prefill your code form with it and call POST /signin as usual. pv_error=cancelled: they backed out. pv_error=unavailable: try a code.
Linking is strict. A provider identity is tied to a passvak account once. The first time, the account is found or created by the provider's email only if the provider says it is verified (Google email_verified; Microsoft personal accounts, or work accounts whose directory sets xms_edov; GitHub's primary, verified address). Otherwise nothing is linked and you get pv_error=verify_email. Never on a name, never on an unverified address. People see and disconnect their connected accounts on passvak.com/account (POST /me/unlink { provider }); the code sign-in always remains.
Sign-ins through a provider count as active users like any other. "Sign in with ChatGPT" is built behind a flag and opens once OpenAI approves passvak.
Plans and usage
Plans are per app and are measured in monthly active users: distinct accounts that signed in to the app in a calendar month, by code, by one-tap link or by "Sign in with passvak". A refresh is not a sign-in. The table is public:
GET /plans
→ { "ok": true, "currency": "USD", "billing": true,
"plans": [ { "id": "free", "usd": 0, "activeUsers": 10000, "textCodes": 100, "apps": 3, "features": ["name"] },
{ "id": "pro", "usd": 19, "activeUsers": 50000, "textCodes": 1000, "apps": 10, "features": ["name","brand","link"] },
{ "id": "business", "usd": 99, "activeUsers": 250000, "textCodes": 5000, "apps": 50, "features": ["name","brand","link","sender","export"] } ] }
| Feature | Means |
|---|---|
name | Your app's name on every code message. |
brand | Your colour and logo on the email. |
link | The one-tap sign-in button (returnTo, method: "link"). |
sender | Codes sent from your own domain (set up with you). |
export | Sign-in log export for your app's users, on request. |
usage.overLimit: true, and we ask for an upgrade. Repeated months over the limit without an upgrade may lead us to close the app, with notice, never silently.textCodes is how many sign-in codes the app may send by text each calendar month (a text costs real money; an email almost nothing). Past it, POST /signin with a phone answers 429 phone_limit until the next month, and codes by email keep working, so ask for an email when you see it.
Upgrades, changes and cancellation happen on your account page, per app, monthly, through Unyplex (the family's payments hub). When billing is false in GET /plans, upgrades are not open yet and the page says so.
Developer API
Everything the account page does with apps, for your scripts. Session (pvs_) only.
GET /developer/apps → { apps: [ { clientId, name, redirectUris, website, brand, plan, teamId, providers, usage, features, billing, canUpgrade } ], plans, billing, providersAvailable }
POST /developer/apps { "name": "Acme Books", "redirect_uris": ["https://acme.example/cb"], "website"?, "color"?: "#336699", "logoUrl"?, "teamId"?, "providers"?: ["google","github"] }
GET /developer/apps/:id → { app: { …, usage: { month, activeUsers, limit, overLimit, history: [ { month, activeUsers } ×6 ] } } }
POST /developer/apps/:id { name?, redirect_uris?, website?, color?, logoUrl?, providers? } (send "" to clear colour or logo; [] to drop the buttons)
POST /developer/apps/:id/checkout { "plan": "pro" | "business" } → { url } (send the person there)
GET /developer/apps/:id/portal → { url } (manage or cancel the plan)
POST /developer/apps/:id/delete → the app stops working immediately; refused with 409 cancel_plan_first while a paid plan is active
Deleting your passvak account is refused with 409 owns_paid_app while an app of yours has a paid plan; cancel it first so nothing keeps billing with nobody to manage it.
Errors and limits
Every error is { "ok": false, "error": "<code>", "message": "<sentence in the caller's language>" }. Show message to the person; branch on error.
| Status | Codes |
|---|---|
| 400 | bad_json invalid_identifier invalid_code code_incorrect (with triesLeft) code_expired confirm_required invite_invalid return_to_invalid link_invalid link_expired; OAuth JSON shape: invalid_target (resource mismatch) |
| 401 | sign_in_first — no or dead credential |
| 403 | forbidden — a key/token tried to manage, or a role can't do that; invite_wrong_account |
| 404 | not_found team_not_found key_not_found session_not_found app_not_found no_billing_yet provider_unavailable provider_not_linked |
| 409 | last_owner owns_team_with_members cancel_plan_first owns_paid_app |
| 422 | team_name_required invite_email_required role_invalid product_required app_name_required redirect_uri_required app_limit plan_invalid |
| 429 | rate_limited (with retryAfter) too_many_attempts |
| 429 | phone_limit — the app used its text codes for the month; send an email code instead |
| 503 | phone_unavailable email_unavailable billing_unavailable — the rail isn't open yet; not a bug |
Limits: /signin 12 per hour per IP and 5 per 15 minutes per address; /signin/with/… 30 per hour per IP. Five wrong codes burn a code. Provider sign-in links and states work once, for ten minutes.
Languages
Every message a person sees exists in English and Spanish. Pass lang in /signin and /verify, or the header x-passvak-lang: es on later calls; otherwise the account's own language is used. The consent screen reads ui_locales, then Accept-Language.
© 2026 Parent Vertical LLC · Terms · Privacy · hello@passvak.com