POST /v3/initialize starts a verification and returns the hosted URL to redirect the user to. It’s the server-side counterpart to the SDK’s vycheck() — reach for it when you want to mint the session from trusted code, for example to link a known user or bind an identity before the user verifies.
Authentication
Accepts a publishable key (pk_…) or a secret key (sk_…). A handful of parameters attach an identity or target a verification directly and therefore require a secret key — they’re marked secret key only below. Sending them with a publishable key returns 400.
Publishable key
From the browser. The SDK uses this. Can pass
origin, return_path,
start_path, external_tracker, pass_params.Secret key
From your server. Can pass everything, including the identity and
target parameters below.
Body parameters
The domain you start the verification from (e.g.
https://yourapp.com). Used to look up which of your verifications to run when verification_id isn’t given.Path on
origin the user is redirected back to after verifying (e.g. /verified). We append the result as ?vyt=<token>&vyc=<0|1>. Requires an origin — passed here or taken from the targeted verification.Path on
origin the user is coming from. Lets one domain host several verification flows. Requires an origin.Secret key only. Target a verification directly instead of resolving by
origin, start_path, and return_path — those then fall back to its saved config.Secret key only. Target a verification by your own external id for it (set when the verification was created), as an alternative to
verification_id. Same fallback behavior.Secret key only. Attach a stable identity to the verification (makes them an account). Fails if that identity is already in use.
Secret key only. Attach a stable identity to the verification. Fails if that identity is already in use.
Secret key only. Link this verification to your own user or record id. See Account linking.
A non-PII label echoed back in your flow webhooks — correlate funnel events with your own analytics.
Extra query parameters to carry through the flow and re-append to the return URL. Reserved
vy* keys are ignored.Response
The hosted verification link with a queued-up session. Redirect the user here.
Examples
Client-side: init() + vycheck()
You don’t have to call this endpoint by hand. In the browser, configure the SDK once with init() and let vycheck() call initialize and redirect for you:
init(config) accepts publishableKey or secretKey, and an optional baseUrl (defaults to production). Use the secret key only on a server.
After the user returns, confirm the token on your
backend. Initializing a session doesn’t verify anyone on its own.