Prompt

How do I verify a user's identity before account creation with an API?

Legal / Compliance & Regulatory1 observationLast seen Oct 28, 2026

Latest observation

Oct 28, 2026OpenAI APIWeb search: off

To verify a user’s identity before creating an account via an API, you typically add an identity verification step in your signup flow and only create the account after verification succeeds.

Common approach

  1. Collect basic signup info

    • Email / phone
    • Legal name, date of birth, address
    • Optional ID document info depending on your requirements
  2. Create a “pending” signup record

    • Store the user as pending_verification
    • Do not activate the account yet
  3. Send a verification challenge

    • Email verification link/code
    • SMS OTP
    • Government ID check
    • Selfie/liveness check
    • Knowledge-based or other identity checks if needed
  4. Verify the response

    • Your API receives the code/document/selfie
    • Validate it server-side
    • If using a third-party identity provider, call their verification API
  5. Create the account only after success

    • Mark the user as verified
    • Issue auth tokens / activate account
    • Reject or expire pending signups if verification fails

API design pattern

Example flow

  • POST /signup/start
    • Creates a pending verification session
    • Returns a verification_id
  • POST /signup/verify
    • Accepts OTP or verification result
    • Confirms identity
  • POST /signup/complete
    • Creates the actual user account after verification passes

Example with email/phone OTP

1. Start signup

POST /signup/start
Content-Type: application/json

{
  "email": "user@example.com",
  "phone": "+15551234567",
  "name": "Jane Doe"
}

Response:

{
  "verification_id": "verif_123",
  "status": "pending"
}

2. Verify code

POST /signup/verify
Content-Type: application/json

{
  "verification_id": "verif_123",
  "code": "482911"
}

Response:

{
  "status": "verified"
}

3. Create account

POST /signup/complete
Content-Type: application/json

{
  "verification_id": "verif_123",
  "password": "StrongPassword123!"
}

Response:

{
  "user_id": "user_456",
  "status": "active"
}

If you need stronger identity verification

For regulated or higher-risk use cases, use a third-party identity verification service such as:

  • Persona
  • Stripe Identity
  • Onfido
  • Veriff
  • Trulioo

Typical API pattern:

  1. Your backend creates a verification session with the provider
  2. User submits ID/selfie through the provider’s UI or SDK
  3. Provider sends a webhook to your backend with the result
  4. Your backend creates the account if the result is approved

Important security practices

  • Verify on the server side, not the client
  • Use short-lived codes/tokens
  • Rate-limit verification attempts
  • Expire pending verification sessions
  • Store sensitive data encrypted at rest
  • Minimize what you store unless legally required
  • Use webhooks with signature verification if using third-party providers

Recommended model

If you want a clean architecture, use:

  • pending_verification
  • verified
  • active
  • rejected

This prevents account creation until identity checks pass.

If you want, I can also show:

  1. a REST API design
  2. a Node.js/Express example
  3. a Python/FastAPI example
  4. or a flow using a third-party KYC provider

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.