Feel free to reach techsupport@surepass.io for any technical support or guidance.
Authorization
header as Bearer TOKEN
.https://sandbox.surepass.app
https://kyc-api.surepass.app
Header | Required | Description |
---|---|---|
Authorization | Yes | Bearer token (JWT) for API authentication |
Content-Type | Yes | Must be application/json |
Parameter | Type | Required | Description |
---|---|---|---|
data.prefill_options | Object | No | User information to prefill in the DigiLocker form |
data.prefill_options.full_name | String | No | User's full name to prefill (max 250 characters) |
data.prefill_options.mobile_number | String | No | User's mobile number to prefill |
data.prefill_options.user_email | String | No | User's email address to prefill |
data.signup_flow | Boolean | Yes | Set to true for new users (they must provide a PIN during registration). Set to false for existing DigiLocker users (proceeds with login). |
data.auth_type | String | No | Authentication type: 'web' or 'app' (default: 'web') |
data.verify_phone | Boolean | No | Whether to verify user's phone number (default: false) |
data.verify_email | Boolean | No | Whether to verify user's email address (default: false) |
data.allow_selection | Boolean | No | Allow document selection (readonly, default: false) |
data.redirect_url | String | No | URL to redirect user after DigiLocker authentication |
data.webhook_url | String | No | Webhook URL for receiving verification callbacks |
data.state | String | No | Custom state parameter for tracking the session (max 100 characters) |
data.local_frontend_url | String | No | Local frontend URL for development purposes |
data.aadhaar_xml | Boolean | No | Whether to include Aadhaar XML data (default: false) |
data.send_sms | Boolean | No | Whether to send SMS notifications to user (default: false) |
data.send_email | Boolean | No | Whether to send email notifications to user (default: false) |
data.expiry_minutes | Integer | No | Session expiry time in minutes (min: 5, max: 30, default: 30) |
data.voice_assistant | Boolean | No | Enable voice assistant feature (default: false) |
data.voice_assistant_lang | String | No | Voice assistant language: 'hi', 'en', or 'both' (default: 'en') |
data.retry_count | Integer | No | Number of retry attempts allowed (min: 1, max: 5, default: 1) |
data.skip_main_screen | Boolean | No | Skip the main introduction screen (default: false) |
data.logo_url | String | No | Custom logo URL for branding |
{
"data": {
"signup_flow": true,
"logo_url": "https://yourcompany.com/logo.png",
"voice_assistant_lang": "hi",
"voice_assistant": true,
"retry_count": 3,
"skip_main_screen": false
}
}
{
"data": {
"signup_flow": true,
"redirect_url": "https://google.com",
"webhook_url": "https://webhook.site/a6f4fcec-5ac8-4c82-96ea-7eded59fd59a"
}
}
Parameter | Type | Description |
---|---|---|
data | object | Contains session credentials for SDK initialization |
data.client_id | string | Unique client identifier for the session |
data.token | string | JWT token for SDK initialization (expires in 10 minutes) |
data.expiry_seconds | number | Token validity duration in seconds (default: 600) |
status_code | integer | HTTP status code (200 for success) |
message_code | string | Status message code ("success" on success) |
message | string | Human-readable status message |
success | boolean | Indicates if the request was successful |
{
"data": {
"client_id": "digilocker_cntWpMxWHbcvgghtyvxw",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiry_seconds": 600.0
},
"status_code": 200,
"message_code": "success",
"message": "Success",
"success": true
}
Note: This is the response sent to your webhook URL, not the API response.
{
"client_id": "digilocker_lbsfmoudALfjHnrowLCl",
"status": "success",
"type": "digilocker"
}
{
"status_code": 401,
"message_code": "invalid_token",
"message": "The provided token is invalid or expired.",
"success": false
}
skip_main_screen
to streamline the onboarding flow if your UX requires it.