58ca4e68db
- Go backend API with full CRUD for all modules (CRM, Sales, Finance, HR, Legal, Marketing, Support, Purchase, Inventory, Projects, Automation, Analytics) - Rust analytics service with parallel report generation - C runtime with POSIX shared memory IPC - PostgreSQL schema with 30+ tables, full migrations - Redis cache, sessions, pub/sub - Kafka event streaming with Zookeeper - WebSocket hub for real-time updates - Automation engine with cron jobs, workflows, event triggers - JWT authentication, multi-tenant from start - Docker Compose with all services - Nginx reverse proxy with rate limiting - Integration tests passing - Feature gap analysis against Fortnox/Odoo/Visma Refs: BOC-001
319 lines
22 KiB
HTML
319 lines
22 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>KYZ API — AAMOS API Docs</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
<style>
|
|
:root {
|
|
--navy: #0A2540; --blue: #635BFF; --blue-faint: #F0EFFF;
|
|
--text: #1a2332; --text-muted: #5a6880; --border: #e2e8f0;
|
|
--bg: #ffffff; --bg-sidebar: #f8fafc; --bg-code: #f1f5f9;
|
|
--sidebar-w: 260px; --header-h: 60px;
|
|
}
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.6; }
|
|
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
|
|
.header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); background: var(--navy); display: flex; align-items: center; padding: 0 24px; z-index: 100; gap: 16px; }
|
|
.header-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; }
|
|
.header-logo-mark { width: 32px; height: 32px; background: var(--blue); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; }
|
|
.header-badge { background: rgba(99,91,255,0.25); color: #a5a0ff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; letter-spacing: 0.05em; }
|
|
.header-nav { margin-left: auto; display: flex; gap: 24px; align-items: center; }
|
|
.header-nav a { color: rgba(255,255,255,0.75); font-size: 14px; font-weight: 500; }
|
|
.header-nav a:hover { color: #fff; text-decoration: none; }
|
|
.btn-primary { background: var(--blue); color: #fff; padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; }
|
|
.hamburger { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 4px; }
|
|
.layout { display: flex; margin-top: var(--header-h); min-height: calc(100vh - var(--header-h)); }
|
|
.sidebar { width: var(--sidebar-w); background: var(--bg-sidebar); border-right: 1px solid var(--border); position: fixed; top: var(--header-h); bottom: 0; overflow-y: auto; padding: 24px 0; transition: transform 0.25s ease; }
|
|
.sidebar-section { margin-bottom: 8px; }
|
|
.sidebar-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); padding: 8px 20px 4px; text-transform: uppercase; }
|
|
.sidebar-link { display: flex; align-items: center; gap: 8px; padding: 7px 20px; color: var(--text-muted); font-size: 13.5px; font-weight: 500; transition: all 0.15s; border-left: 3px solid transparent; }
|
|
.sidebar-link:hover { color: var(--navy); background: var(--blue-faint); text-decoration: none; }
|
|
.sidebar-link.active { color: var(--blue); background: var(--blue-faint); border-left-color: var(--blue); }
|
|
.sidebar-link .icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
|
|
.main { margin-left: var(--sidebar-w); flex: 1; padding: 48px 56px; max-width: calc(900px + var(--sidebar-w)); }
|
|
.page-header { margin-bottom: 40px; }
|
|
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
|
|
.breadcrumb a { color: var(--text-muted); } .breadcrumb a:hover { color: var(--blue); }
|
|
h1 { font-size: 32px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
|
|
.page-desc { font-size: 16px; color: var(--text-muted); }
|
|
h2 { font-size: 20px; font-weight: 700; color: var(--navy); margin: 40px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
|
|
h3 { font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.06em; }
|
|
p { color: var(--text-muted); margin-bottom: 12px; }
|
|
.endpoint-card { border: 1px solid var(--border); border-radius: 12px; margin: 24px 0; overflow: hidden; }
|
|
.endpoint-header { display: flex; align-items: center; gap: 12px; padding: 18px 24px; background: var(--bg-sidebar); border-bottom: 1px solid var(--border); }
|
|
.method-badge { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 6px; }
|
|
.method-post { background: #dcfce7; color: #15803d; }
|
|
.method-get { background: #dbeafe; color: #1d4ed8; }
|
|
.endpoint-path { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--navy); font-weight: 500; }
|
|
.endpoint-body { padding: 24px; }
|
|
.endpoint-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
|
|
.params-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 8px 0 20px; }
|
|
.params-table th { text-align: left; padding: 8px 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 2px solid var(--border); text-transform: uppercase; }
|
|
.params-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
|
|
.params-table tr:last-child td { border-bottom: none; }
|
|
.param-name { font-family: 'JetBrains Mono', monospace; color: var(--navy); font-size: 13px; }
|
|
.param-type { font-family: 'JetBrains Mono', monospace; color: var(--blue); font-size: 12px; }
|
|
.param-req { display: inline-block; background: #fef3c7; color: #92400e; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; }
|
|
.param-opt { display: inline-block; background: var(--bg-code); color: var(--text-muted); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; }
|
|
.param-desc { color: var(--text-muted); }
|
|
.code-wrap { position: relative; margin: 12px 0; }
|
|
.code-lang { position: absolute; top: 10px; right: 44px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.05em; font-family: 'Inter', sans-serif; }
|
|
.copy-btn { position: absolute; top: 8px; right: 10px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); border-radius: 6px; padding: 4px 8px; font-size: 11px; cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 500; transition: all 0.15s; }
|
|
.copy-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
|
|
.copy-btn.copied { color: #4ade80; border-color: #4ade80; }
|
|
pre { background: #0f1923; color: #e2e8f0; border-radius: 10px; padding: 18px 20px; overflow-x: auto; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.7; }
|
|
code { font-family: 'JetBrains Mono', monospace; }
|
|
.inline-code { background: var(--bg-code); color: #c2410c; padding: 2px 6px; border-radius: 4px; font-size: 13px; font-family: 'JetBrains Mono', monospace; }
|
|
.tok-kw { color: #c792ea; } .tok-str { color: #c3e88d; } .tok-num { color: #f78c6c; } .tok-cmt { color: #546e7a; }
|
|
.tok-url { color: #80cbc4; } .tok-key { color: #89ddff; } .tok-bool { color: #ff5572; }
|
|
.info-box { background: var(--blue-faint); border: 1px solid #d4d0ff; border-radius: 10px; padding: 16px 20px; display: flex; gap: 12px; margin: 20px 0; }
|
|
.info-box.warning { background: #fffbeb; border-color: #fde68a; }
|
|
.info-box-icon { font-size: 18px; flex-shrink: 0; }
|
|
.info-box-body { font-size: 13.5px; color: var(--text); }
|
|
.info-box-body strong { color: var(--navy); }
|
|
/* Flow comparison */
|
|
.flow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
|
|
.flow-card { border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
|
|
.flow-card h4 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
|
|
.flow-card p { font-size: 13px; }
|
|
.flow-tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-bottom: 10px; }
|
|
.flow-hosted { background: var(--blue-faint); color: var(--blue); }
|
|
.flow-api { background: #dcfce7; color: #15803d; }
|
|
@media (max-width: 768px) {
|
|
.sidebar { transform: translateX(-100%); z-index: 50; }
|
|
.sidebar.open { transform: translateX(0); }
|
|
.main { margin-left: 0; padding: 24px 20px; }
|
|
.hamburger { display: flex; }
|
|
.header-nav { display: none; }
|
|
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 40; }
|
|
.overlay.visible { display: block; }
|
|
.flow-grid { grid-template-columns: 1fr; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header class="header">
|
|
<button class="hamburger" id="hamburger" aria-label="Menu">
|
|
<svg width="22" height="22" viewBox="0 0 22 22" fill="none"><rect y="4" width="22" height="2" rx="1" fill="white"/><rect y="10" width="22" height="2" rx="1" fill="white"/><rect y="16" width="22" height="2" rx="1" fill="white"/></svg>
|
|
</button>
|
|
<a href="/docs/" class="header-logo"><div class="header-logo-mark">A</div>AAMOS</a>
|
|
<span class="header-badge">API DOCS</span>
|
|
<nav class="header-nav">
|
|
<a href="https://aamos.ai">Home</a>
|
|
<a href="/docs/">Docs</a>
|
|
<a href="https://aamos.ai/signup/" class="btn-primary">Get API Key</a>
|
|
</nav>
|
|
</header>
|
|
<div class="overlay" id="overlay"></div>
|
|
<div class="layout">
|
|
<nav class="sidebar" id="sidebar">
|
|
<div class="sidebar-section">
|
|
<div class="sidebar-label">Getting Started</div>
|
|
<a href="/docs/" class="sidebar-link"><svg class="icon" viewBox="0 0 16 16" fill="currentColor"><path d="M2 2h12v2H2zm0 4h12v2H2zm0 4h8v2H2z"/></svg>Overview</a>
|
|
<a href="/docs/authentication/" class="sidebar-link"><svg class="icon" viewBox="0 0 16 16" fill="currentColor"><path d="M8 1a4 4 0 110 8A4 4 0 018 1zm0 10c-4 0-7 2-7 3v1h14v-1c0-1-3-3-7-3z"/></svg>Authentication</a>
|
|
</div>
|
|
<div class="sidebar-section">
|
|
<div class="sidebar-label">APIs</div>
|
|
<a href="/docs/vims/" class="sidebar-link"><svg class="icon" viewBox="0 0 16 16" fill="currentColor"><path d="M1 3h14v2H1zm2 4h10v2H3zm2 4h6v2H5z"/></svg>VIMS</a>
|
|
<a href="/docs/reality-alerts/" class="sidebar-link"><svg class="icon" viewBox="0 0 16 16" fill="currentColor"><path d="M8 1L1 14h14L8 1zm0 3l5 9H3l5-9zm-1 3v3h2V7H7zm0 4v2h2v-2H7z"/></svg>Reality Alerts</a>
|
|
<a href="/docs/kyz/" class="sidebar-link active"><svg class="icon" viewBox="0 0 16 16" fill="currentColor"><path d="M8 1a4 4 0 110 8A4 4 0 018 1zm0 10c-4 0-7 2-7 3v1h14v-1c0-1-3-3-7-3z"/></svg>KYZ</a>
|
|
<a href="/docs/modules/" class="sidebar-link"><svg class="icon" viewBox="0 0 16 16" fill="currentColor"><path d="M2 2h5v5H2zm7 0h5v5H9zm-7 7h5v5H2zm7 0h5v5H9z"/></svg>AAMOS Modules</a>
|
|
</div>
|
|
<div class="sidebar-section">
|
|
<div class="sidebar-label">On this page</div>
|
|
<a href="#flows" class="sidebar-link" style="font-size:12.5px">Verification Flows</a>
|
|
<a href="#create-session" class="sidebar-link" style="font-size:12.5px">Create Session</a>
|
|
<a href="#get-session" class="sidebar-link" style="font-size:12.5px">Get Session</a>
|
|
<a href="#submit" class="sidebar-link" style="font-size:12.5px">Submit Documents</a>
|
|
</div>
|
|
</nav>
|
|
<main class="main">
|
|
<div class="page-header">
|
|
<div class="breadcrumb"><a href="/docs/">Docs</a> / KYZ API</div>
|
|
<h1>KYZ API Reference</h1>
|
|
<p class="page-desc">Know Your Zone — identity verification with liveness detection, document scanning, and flexible hosted or API-native flows.</p>
|
|
</div>
|
|
|
|
<div class="info-box">
|
|
<span class="info-box-icon">📍</span>
|
|
<div class="info-box-body"><strong>Base path:</strong> <code class="inline-code">https://api.aamos.ai/v1/kyz/</code></div>
|
|
</div>
|
|
|
|
<h2 id="flows">Verification Flows</h2>
|
|
<p>KYZ supports two verification flows. Choose based on your integration needs:</p>
|
|
<div class="flow-grid">
|
|
<div class="flow-card">
|
|
<span class="flow-tag flow-hosted">Hosted</span>
|
|
<h4>Hosted Flow</h4>
|
|
<p>Redirect your user to a AAMOS-hosted verification page. No frontend work required. Best for quick integration and compliance.</p>
|
|
</div>
|
|
<div class="flow-card">
|
|
<span class="flow-tag flow-api">API Flow</span>
|
|
<h4>API Flow</h4>
|
|
<p>Submit documents and selfies programmatically via multipart upload. Full control over UX. Best for custom verification experiences.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 id="create-session">POST /v1/kyz/sessions</h2>
|
|
<div class="endpoint-card">
|
|
<div class="endpoint-header">
|
|
<span class="method-badge method-post">POST</span>
|
|
<span class="endpoint-path">/v1/kyz/sessions</span>
|
|
</div>
|
|
<div class="endpoint-body">
|
|
<p class="endpoint-desc">Create a new verification session. Returns a session ID and, for hosted flow, a URL to redirect the user to.</p>
|
|
<h3>Request — application/json</h3>
|
|
<table class="params-table">
|
|
<thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td class="param-name">user_ref</td><td class="param-type">string</td><td><span class="param-req">Required</span></td><td class="param-desc">Your internal user identifier. Used to correlate results back to your system.</td></tr>
|
|
<tr><td class="param-name">flow</td><td class="param-type">string</td><td><span class="param-req">Required</span></td><td class="param-desc">Verification flow: <code class="inline-code">hosted</code> or <code class="inline-code">api</code>.</td></tr>
|
|
<tr><td class="param-name">redirect_url</td><td class="param-type">string</td><td><span class="param-opt">Optional</span></td><td class="param-desc">Where to redirect after hosted flow completes. Required when flow=hosted.</td></tr>
|
|
<tr><td class="param-name">webhook_url</td><td class="param-type">string</td><td><span class="param-opt">Optional</span></td><td class="param-desc">Receive a POST notification when verification is complete.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<h3>Example — Hosted Flow</h3>
|
|
<div class="code-wrap">
|
|
<span class="code-lang">bash</span>
|
|
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
|
|
<pre><span class="tok-kw">curl</span> -X POST <span class="tok-str">https://api.aamos.ai/v1/kyz/sessions</span> \
|
|
-H <span class="tok-str">"Authorization: Bearer ak_live_YOUR_KEY"</span> \
|
|
-H <span class="tok-str">"Content-Type: application/json"</span> \
|
|
-d <span class="tok-str">'{
|
|
"user_ref": "user_123456",
|
|
"flow": "hosted",
|
|
"redirect_url": "https://your-app.example.com/verification-complete",
|
|
"webhook_url": "https://your-app.example.com/hooks/kyz"
|
|
}'</span></pre>
|
|
</div>
|
|
<h3>Response — 201 Created</h3>
|
|
<div class="code-wrap">
|
|
<span class="code-lang">json</span>
|
|
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
|
|
<pre>{
|
|
<span class="tok-key">"session_id"</span>: <span class="tok-str">"kyz_5e2a8f1c7d"</span>,
|
|
<span class="tok-key">"hosted_url"</span>: <span class="tok-str">"https://verify.aamos.ai/kyz_5e2a8f1c7d"</span>,
|
|
<span class="tok-key">"expires_at"</span>: <span class="tok-str">"2025-01-15T11:00:00Z"</span>
|
|
}</pre>
|
|
</div>
|
|
<p>For hosted flow, redirect the user to <code class="inline-code">hosted_url</code>. The session expires after 30 minutes.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 id="get-session">GET /v1/kyz/sessions/:session_id</h2>
|
|
<div class="endpoint-card">
|
|
<div class="endpoint-header">
|
|
<span class="method-badge method-get">GET</span>
|
|
<span class="endpoint-path">/v1/kyz/sessions/:session_id</span>
|
|
</div>
|
|
<div class="endpoint-body">
|
|
<p class="endpoint-desc">Retrieve the current status and result of a verification session.</p>
|
|
<h3>Path Parameters</h3>
|
|
<table class="params-table">
|
|
<thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td class="param-name">session_id</td><td class="param-type">string</td><td class="param-desc">The session ID returned by POST /v1/kyz/sessions.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="code-wrap">
|
|
<span class="code-lang">bash</span>
|
|
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
|
|
<pre><span class="tok-kw">curl</span> <span class="tok-str">https://api.aamos.ai/v1/kyz/sessions/kyz_5e2a8f1c7d</span> \
|
|
-H <span class="tok-str">"Authorization: Bearer ak_live_YOUR_KEY"</span></pre>
|
|
</div>
|
|
<h3>Response — 200 OK</h3>
|
|
<div class="code-wrap">
|
|
<span class="code-lang">json</span>
|
|
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
|
|
<pre>{
|
|
<span class="tok-key">"session_id"</span>: <span class="tok-str">"kyz_5e2a8f1c7d"</span>,
|
|
<span class="tok-key">"status"</span>: <span class="tok-str">"approved"</span>,
|
|
<span class="tok-key">"decision"</span>: <span class="tok-str">"approved"</span>,
|
|
<span class="tok-key">"confidence"</span>: <span class="tok-num">0.97</span>,
|
|
<span class="tok-key">"liveness"</span>: <span class="tok-bool">true</span>,
|
|
<span class="tok-key">"document_country"</span>: <span class="tok-str">"SE"</span>,
|
|
<span class="tok-key">"document_type"</span>: <span class="tok-str">"passport"</span>,
|
|
<span class="tok-key">"completed_at"</span>: <span class="tok-str">"2025-01-15T10:45:00Z"</span>
|
|
}</pre>
|
|
</div>
|
|
<h3>Session Status Values</h3>
|
|
<table class="params-table">
|
|
<thead><tr><th>Status</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td class="param-name">pending</td><td class="param-desc">Session created, awaiting user action.</td></tr>
|
|
<tr><td class="param-name">in_progress</td><td class="param-desc">User has started verification.</td></tr>
|
|
<tr><td class="param-name">processing</td><td class="param-desc">Documents submitted, verification in progress.</td></tr>
|
|
<tr><td class="param-name">approved</td><td class="param-desc">Verification successful.</td></tr>
|
|
<tr><td class="param-name">rejected</td><td class="param-desc">Verification failed — document invalid, liveness failure, or fraud signal.</td></tr>
|
|
<tr><td class="param-name">expired</td><td class="param-desc">Session expired before completion.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 id="submit">POST /v1/kyz/sessions/:session_id/submit</h2>
|
|
<div class="endpoint-card">
|
|
<div class="endpoint-header">
|
|
<span class="method-badge method-post">POST</span>
|
|
<span class="endpoint-path">/v1/kyz/sessions/:session_id/submit</span>
|
|
</div>
|
|
<div class="endpoint-body">
|
|
<p class="endpoint-desc">Submit identity documents and selfie for API-flow verification. Only available when the session was created with <code class="inline-code">flow: "api"</code>.</p>
|
|
<div class="info-box warning">
|
|
<span class="info-box-icon">⚠️</span>
|
|
<div class="info-box-body"><strong>API flow only.</strong> This endpoint returns <code class="inline-code">403 Forbidden</code> for sessions created with <code class="inline-code">flow: "hosted"</code>.</div>
|
|
</div>
|
|
<h3>Request — multipart/form-data</h3>
|
|
<table class="params-table">
|
|
<thead><tr><th>Parameter</th><th>Type</th><th>Required</th><th>Description</th></tr></thead>
|
|
<tbody>
|
|
<tr><td class="param-name">id_front</td><td class="param-type">file</td><td><span class="param-req">Required</span></td><td class="param-desc">Front of the identity document. JPEG or PNG. Max 10 MB.</td></tr>
|
|
<tr><td class="param-name">id_back</td><td class="param-type">file</td><td><span class="param-opt">Optional</span></td><td class="param-desc">Back of the identity document. Required for most national ID cards.</td></tr>
|
|
<tr><td class="param-name">selfie</td><td class="param-type">file</td><td><span class="param-req">Required</span></td><td class="param-desc">Live selfie photo for liveness and biometric matching. JPEG or PNG.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<h3>Example Request</h3>
|
|
<div class="code-wrap">
|
|
<span class="code-lang">bash</span>
|
|
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
|
|
<pre><span class="tok-kw">curl</span> -X POST <span class="tok-str">https://api.aamos.ai/v1/kyz/sessions/kyz_5e2a8f1c7d/submit</span> \
|
|
-H <span class="tok-str">"Authorization: Bearer ak_live_YOUR_KEY"</span> \
|
|
-F <span class="tok-str">"id_front=@/path/to/passport_front.jpg"</span> \
|
|
-F <span class="tok-str">"id_back=@/path/to/passport_back.jpg"</span> \
|
|
-F <span class="tok-str">"selfie=@/path/to/selfie.jpg"</span></pre>
|
|
</div>
|
|
<h3>Response — 202 Accepted</h3>
|
|
<div class="code-wrap">
|
|
<span class="code-lang">json</span>
|
|
<button class="copy-btn" onclick="copyCode(this)">Copy</button>
|
|
<pre>{
|
|
<span class="tok-key">"session_id"</span>: <span class="tok-str">"kyz_5e2a8f1c7d"</span>,
|
|
<span class="tok-key">"status"</span>: <span class="tok-str">"processing"</span>,
|
|
<span class="tok-key">"message"</span>: <span class="tok-str">"Documents received. Verification will complete in 10-30 seconds."</span>
|
|
}</pre>
|
|
</div>
|
|
<p>Poll <code class="inline-code">GET /v1/kyz/sessions/:session_id</code> or wait for your webhook to receive the final result.</p>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
<script>
|
|
function copyCode(btn) {
|
|
const pre = btn.closest('.code-wrap').querySelector('pre');
|
|
navigator.clipboard.writeText(pre.innerText || pre.textContent).then(() => {
|
|
btn.textContent = 'Copied!'; btn.classList.add('copied');
|
|
setTimeout(() => { btn.textContent = 'Copy'; btn.classList.remove('copied'); }, 2000);
|
|
});
|
|
}
|
|
const hamburger = document.getElementById('hamburger');
|
|
const sidebar = document.getElementById('sidebar');
|
|
const overlay = document.getElementById('overlay');
|
|
hamburger.addEventListener('click', () => { sidebar.classList.toggle('open'); overlay.classList.toggle('visible'); });
|
|
overlay.addEventListener('click', () => { sidebar.classList.remove('open'); overlay.classList.remove('visible'); });
|
|
</script>
|
|
</body>
|
|
</html>
|