Nyota ID
Creating Sessions
How to generate a secure KYC/KYB session from your backend.
To begin a verification flow, your backend must negotiate a session with the Nyota API. This request reserves funds from your Nyota Wallet and generates a unique launcher URL for your frontend SDK.
Session creation must always occur on your secure backend. Never embed your Nyota API Key in client-side code.
Creating a KYC (Individual) Session
Make a POST request to the /v1/verify/sessions endpoint:
curl -X POST https://backend.nyotaimara.com/v1/verify/sessions \
-H "x-nyota-api-key: ny_live_abcdef123456_YOUR_SECRET_KEY" \
-H "x-idempotency-key: unique-uuid-here" \
-H "Content-Type: application/json" \
-d '{
"type": "kyc",
"externalEndUserId": "user_987654321",
"appName": "Acme Finance",
"callbackUrl": "https://api.yourdomain.com/nyota-webhooks"
}'Creating a KYB (Business) Session
If you are verifying a corporate entity, simply change the type to kyb. The system will adapt the document requirements dynamically.
{
"type": "kyb",
"externalEndUserId": "corp_88776655",
"appName": "Acme B2B Services",
"callbackUrl": "https://api.yourdomain.com/nyota-webhooks"
}The Response
The API will return a payload containing the verificationUrl. This is the exact string you must pass to your frontend SDKs.
{
"success": true,
"message": "Verification session created successfully.",
"data": {
"sessionId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"verificationUrl": "https://verify.nyotaimara.com/session/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "kyc",
"environment": "live",
"status": "pending"
}
}