Prompt
how to verify identity api
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
To verify identity with an API, the typical flow is:
-
Collect user data
- Full name
- Date of birth
- Address
- Government ID details
- Sometimes a selfie or liveness check
-
Send data to an identity verification provider
- Examples: Stripe Identity, Onfido, Persona, Jumio, Veriff
- You usually create a verification session or check via API
-
User completes verification
- Often through a hosted link, SDK, or mobile flow
- They upload documents and/or take a selfie
-
API returns status
pendingverifiedfailedrequires_review
-
Handle webhooks
- Your backend should listen for events like:
- verification completed
- verification failed
- document needs review
- Your backend should listen for events like:
Example pattern
1. Create a verification session
POST /identity/verifications
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"user_id": "user_123",
"callback_url": "https://yourapp.com/webhooks/identity"
}
2. Provider responds
{
"verification_id": "ver_abc123",
"status": "pending",
"redirect_url": "https://provider.com/verify/ver_abc123"
}
3. User completes verification
4. Your webhook receives result
{
"verification_id": "ver_abc123",
"user_id": "user_123",
"status": "verified"
}
Important security points
- Use HTTPS only
- Never store raw ID images unless required
- Encrypt sensitive data at rest
- Verify webhook signatures
- Follow KYC/AML/privacy regulations for your region
If you want, I can also give you:
- a Node.js example
- a Python example
- a full API design
- or a sample workflow with Stripe Identity / Onfido