Persona

Persona

Build a production integration with Persona KYC

Build a production integration with Persona KYC

Jun 8, 20263 min readBy Persona Examples

Integrating KYC verification into production requires coordinating inquiry workflows, managing case statuses, and handling real-time verification results reliably. Persona provides a comprehensive KYC and IDV platform that your backend can orchestrate via REST APIs and webhooks to streamline identity verification at scale. This tutorial walks you through production-ready patterns for generating verification links, marking inquiries for review, and tracking case status using Persona's API surface.

What this tutorial covers

  • Outcome: You will build a TypeScript integration that creates inquiry sessions, handles manual review escalations, and tracks verification lifecycle events.
  • Endpoints used: `POST /api/v1/inquiries/%7Binquiry-id%7D/generate-one-time-link`, `POST /api/v1/inquiries/%7Binquiry-id%7D/mark-for-review`, `POST /api/v1/cases/%7Bcase-id%7D/set-status`, `GET /api/v1/accounts/%7Baccount-id%7D/relations`
  • Language: typescript
  • Auth: API key (Authorization: Bearer header)
  • Estimated implementation time: ~18 minutes

Step 1: Generate a one-time verification link with Persona

Persona inquiry links are short-lived tokens that route your users to the verification flow. Generating a fresh link for each session prevents session replay and simplifies state management.

Create inquiry verification session

Response:

json
1const url = 'https://api.withpersona.com/api/v1/inquiries/inquiry-id/generate-one-time-link';
2const options = {
3  method: 'POST',
4  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
5  body: '{}'
6};
7
8try {
9  const response = await fetch(url, options);
10  const data = await response.json();
11  console.log(data);
12} catch (error) {
13  console.error(error);
14}

Step 2: Mark an inquiry for manual review in Persona

When automated checks are inconclusive, escalating to your compliance team via Persona's review queue ensures human oversight. This is critical for edge cases and fraud signals.

Escalate inquiry to manual review

Response:

json
1const url = 'https://api.withpersona.com/api/v1/inquiries/inquiry-id/mark-for-review';
2const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
3
4try {
5  const response = await fetch(url, options);
6  const data = await response.json();
7  console.log(data);
8} catch (error) {
9  console.error(error);
10}

Step 3: Track case status updates from Persona

Cases wrap inquiry outcomes and store approval decisions. Updating case status in Persona synchronizes your records and triggers downstream notifications to users and compliance systems.

Set case verification outcome

Response:

json
1const url = 'https://api.withpersona.com/api/v1/cases/case-id/set-status';
2const options = {
3  method: 'POST',
4  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
5  body: '{"meta":{"status":"Approved"}}'
6};
7
8try {
9  const response = await fetch(url, options);
10  const data = await response.json();
11  console.log(data);
12} catch (error) {
13  console.error(error);
14}

Step 4: Fetch account relations for holistic compliance

Persona's relations endpoint maps connected accounts (spouses, signatories, beneficial owners) for comprehensive KYC. Fetching these early in onboarding catches multi-entity risk patterns.

Retrieve linked account relations

Response:

json
1const url = 'https://api.withpersona.com/api/v1/accounts/account-id/relations?filter=%7B%22key%22%3A%22string%22%7D';
2const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
3
4try {
5  const response = await fetch(url, options);
6  const data = await response.json();
7  console.log(data);
8} catch (error) {
9  console.error(error);
10}

Step 5: Implement event-driven updates via webhook handlers

Polling Persona repeatedly drains quota and adds latency. Instead, set up webhook handlers that react to Persona events (inquiry completed, case reviewed, relations added) in real time. This pattern reduces API overhead by 70–90% compared to full-refresh polling, and keeps your user-facing status fresh without delay.

Listen for Persona webhook events

Your integration now responds instantly to Persona events without polling overhead, reducing latency and API usage while keeping user status synchronized.

Common pitfalls when using Persona

  • Ignoring one-time link expiration. Generated links expire in minutes. Always issue fresh links per session and validate expiration timestamps before redirecting users. Reusing stale links will cause verification failures in production.
  • Relying on polling instead of webhooks. Polling full inquiry datasets on a schedule consumes quota rapidly and introduces latency. Production integrations should register webhook subscriptions in Persona and handle async events to keep queries incremental.
  • Skipping pre-production environment validation. Test your integration against Persona's sandbox environment first. Validate error handling, edge cases, and all four endpoints before promoting to production. Missing even one test scenario can cause deployment failure.
  • Not normalizing upstream account data early. If you support multiple customers with custom fields or localized names, normalize data before sending to Persona. This reduces downstream breakage when Persona APIs update or when you support new data sources.

You now have the foundations for a robust Persona integration. Ready to ship this? Get started with Persona by configuring webhooks and testing against the sandbox.

Documentation references

The code examples in this tutorial are grounded in the following docs pages:

Want to streamline identity verification?

See how top tech teams use Withpersona to automate KYC, reduce fraud, and accelerate onboarding securely.

Read More Blog Posts

PersonaPersona

Actionable identity tips for technical leaders

© 2026 Persona. All rights reserved.