Persona
Use Persona for MainSDK identity checks with configurable flows - API key, main.yaml per market, sandbox testing and swapping.
Persona runs identity verification flows you configure, such as a government ID check with a selfie. Behind verify, it runs verify.identity() in the markets you route to it. Pick it when you want to shape the verification steps per use case without changing app code.
Interfaces it serves
Pick Persona in main.yaml for any of these. Your calls stay the same, and you can swap later.
verifyBuilding for 0.7Driver persona Persona
identity
verify:
driver: personaSwap to another provider
Before you start
- Get a Persona account. It has a sandbox and a production environment.
- Build an inquiry template for the checks your flow needs.
- Create an API key for each environment and keep it in your secrets manager.
Configure
verify:
driver: twilio-verify # phone and email checks
identity: { us: persona } # market to identity driver
require: { us: high } # persona reaches high
drivers:
persona:
key: secret:PERSONA_API_KEY # the API key of the environment
template: itmpl_123 # the inquiry template that runs the checksUse it
import { verify } from "mainsdk/verify";
export async function startCheck(user: string) {
const started = await verify.identity({
level: "high",
market: "us",
claims: ["age_over_18"],
purpose: "Open an account",
user,
consent: { policy: "privacy-2026-10" },
});
return started.url; // Persona's one-time link; later verify.identity.complete({ id: started.id })
}Local development and testing
Use Persona's sandbox with a sandbox key. In tests, set verify.identity.default: local: the local fake approves with code: "approve" and keeps nothing but the asked claims.
What MainSDK adds on top
One call for identity checks in every market, routed by identity, and swappable with no code change. Only the claims you ask for are kept, each labelled, with a consent record; a level the driver cannot reach fails with MAIN-VERIFY-0004 before the person is sent anywhere.
See Phone, email and identity checks.
Limits and notes
- Built
verifydriver (specverify). It declares its own host,withpersona.com, sonetwork.allowdoes not change. - Persona reaches the
highlevel; the template you name decides which checks run. - Identity results are personal data; label the fields that store them in
db.
Swap to or from it
verify:
identity: { us: onfido } # was { us: persona }Results you keep live in your own db. Inquiries already run stay in Persona.
FAQ
Can I use Persona in one market and DigiLocker in India? Yes. Route each market in identity, for example { us: persona, in: digilocker }.
Next
Was this page helpful?