Wallet API
Provision and manage user-controlled digital identity wallets.
The 1K-Wallet service provisions and manages each user's digital identity wallet — the secure, user-controlled container for their credentials, keys and verified attributes.
19 endpoints
across 8 resource groups.
ECDSA-signed
every request is signed with your key pair.
JSON over HTTPS
predictable REST, conventional status codes.
OpenAPI 3.0
Base URL
All Wallet endpoints are relative to your environment host. Examples on this page use the 1Kosmos pilot environment — swap in your production root when you go live.
Content type
Requests and responses use application/json.
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/healthz' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN'
Authentication
Wallet uses ECDSA key-pair authentication. Each request carries your credentials as
HTTP headers; verification-grade calls additionally sign the request body. Retrieve the system signing
key from /publickeys.
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/healthz' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/healthz", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/healthz",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json())Errors
Wallet uses conventional HTTP status codes: 2xx success, 4xx a problem
with the request, 5xx a service-side error.
| Status | Meaning | Description |
|---|---|---|
| 200 / 204 | OK | The request succeeded. |
| 400 | Bad Request | Validation failed. |
| 401 | Unauthorized | Missing or invalid credentials. |
| 403 | Forbidden | Authenticated, but not permitted. |
| 404 | Not Found | The resource does not exist. |
| 500 | Server Error | Something went wrong on our side. |
{
"statusCode": 400,
"error": "Bad Request",
"message": "Validation error"
}Wallet
Provision and manage identity wallets.
[DEPRECATED] Fetch sessionInfo and store into DB, then redirect to authentication page
DEPRECATED: This endpoint is deprecated and has been removed. Use /v2/authenticate instead.
Sunset date: 2026-02-02
| Name | Type | Description |
|---|---|---|
| sessionrequired | string | Base64 encoded session URL |
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/authenticate?session=<session>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/authenticate?session=<session>", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/authenticate?session=<session>",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"error": "string",
"message": "string",
"sunset": "string"
}Fetch sessionInfo and store into DB, then redirect to v2 authentication page
Fetches sessionInfo, stores it in the DB, extracts dvcID from privateInfo, retrieves verification config including selfieCaptureMode, and redirects the user to the v2 authentication page with session data.
| Name | Type | Description |
|---|---|---|
| sessionrequired | string | Base64 encoded session URL |
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/v2/authenticate?session=<session>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/v2/authenticate?session=<session>", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/v2/authenticate?session=<session>",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json())// no response body
// no response body
// no response body
// no response body
[DEPRECATED] Authenticate with LiveID[V2 CP]
DEPRECATED: This endpoint is deprecated and has been removed. Use /v2/authenticate_with_liveid instead.
Sunset date: 2026-02-02
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/authenticate_with_liveid' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/authenticate_with_liveid", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/authenticate_with_liveid",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={},
)
print(res.json()){
"error": "string",
"message": "string",
"sunset": "string"
}Check user enrollment of wallet
Check user enrollment of wallet
- any valid license key
- Atleast 1 entry in list is required
- Either DID or PublicKey or BOTH can be provided.
- Any time both are provided, that a single record in DB must match both did and publicKey in order to call it a "MATCH"
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
list (required)
list of user's did and publicKey
Returns
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
{
"list": [{"did": string}, {"publicKey": string}, {"did": string, "publicKey": string}]
}| Field | Type | Description |
|---|---|---|
| list | array<object> | — |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/check_enrollment' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"list": [{"did": "xxxx", "publicKey": "xxxx"}]}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/check_enrollment", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"list": [
{
"did": "xxxx",
"publicKey": "xxxx"
}
]
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/check_enrollment",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"list": [
{
"did": "xxxx",
"publicKey": "xxxx"
}
]
},
)
print(res.json()){
"list": [
{
"did": "xxxxxxxxxxx",
"publicKey": "xxxxxxxxxxx",
"createdTS": "xxxxxxxxxxx"
}
]
}// no response body
// no response body
// no response body
// no response body
Identify selfie using dvcId to get a faceKey
Accepts a selfie image, dvcId, communityId and tenantId. Fetches the verification config and verifier from docuverify, performs face search.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds
publickey (required)
Public key
Request Body
data (required)
ECDSA encrypted payload containing selfie, dvcId, communityId and tenantId
Returns
Returns faceKey (sha512 hash of the matched faceId) in encrypted response.
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains selfie, dvcId, communityId, tenantId and optionally dns.
{
"data": {
"selfie": "base64_encoded_selfie_image",
"dvcId": "device_verification_config_id_or_tag",
"communityId": "community_id",
"tenantId": "tenant_id",
"dns": "optional_community_dns_url"
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/identify_selfie' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"selfie": "string", "dvcId": "string", "communityId": "string", "tenantId": "string", "dns": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/identify_selfie", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"selfie": "string",
"dvcId": "string",
"communityId": "string",
"tenantId": "string",
"dns": "string"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/identify_selfie",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"selfie": "string",
"dvcId": "string",
"communityId": "string",
"tenantId": "string",
"dns": "string"
}
},
)
print(res.json()){
"data": "string",
"publicKey": "string"
}// no response body
// no response body
// no response body
// no response body
Get session result by UWL session ID
Fetches session_info using uwl_session_id and returns success, failure, or pending status. Allows deviceId in request body.
| Name | Type | Description |
|---|---|---|
| sessionrequired | string | UWL session ID |
| Name | Type | Description |
|---|---|---|
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| deviceId | string | Device ID to check device trust |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/session_result?session=<session>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'Content-Type: application/json' \
-d '{"deviceId": "string"}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/session_result?session=<session>", {
method: "POST",
headers: {
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"Content-Type": "application/json"
},
body: JSON.stringify({
"deviceId": "string"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/session_result?session=<session>",
headers={
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID"
},
json={
"deviceId": "string"
},
)
print(res.json()){
"status": "success",
"message": "string"
}// no response body
// no response body
Add User-Device Info into Login Attemp DB
Add User-Device Info into Login Attemp DB
Request Body
sessionId (required)
sessionId
deviceInfo (optional)
deviceInfo
userInfo (optional)
userInfo
Returns
"data": {
"sessionId": "",
"deviceInfo": "",
"userInfo": ""
},
"publicKey": ""| Field | Type | Description |
|---|---|---|
| sessionId | string | — |
| deviceInfo | object | — |
| userInfo | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/userDeviceInfo' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Content-Type: application/json' \
-d '{"sessionId": "xxxx", "deviceInfo": {}, "userInfo": {}}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/userDeviceInfo", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Content-Type": "application/json"
},
body: JSON.stringify({
"sessionId": "xxxx",
"deviceInfo": {},
"userInfo": {}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/userDeviceInfo",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
},
json={
"sessionId": "xxxx",
"deviceInfo": {},
"userInfo": {}
},
)
print(res.json()){
"message": "string"
}// no response body
// no response body
// no response body
Authenticate with LiveID [V2 CP].
Authenticate with LiveID [V2 CP].
| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/v2/authenticate_with_liveid' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"tenantId": "string", "communityId": "string", "dns": "string", "dvcID": "string", "context": "string", "userAgent": "string", "purpose": "string", "scopes": "string", "authType": "string", "deviceInfo": {}, "userInfo": {}, "selfie": "string", "pin": "string", "user_token": "string", "isTrustedDevice": true, "skip_liveid": true}}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/v2/authenticate_with_liveid", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"tenantId": "string",
"communityId": "string",
"dns": "string",
"dvcID": "string",
"context": "string",
"userAgent": "string",
"purpose": "string",
"scopes": "string",
"authType": "string",
"deviceInfo": {},
"userInfo": {},
"selfie": "string",
"pin": "string",
"user_token": "string",
"isTrustedDevice": true,
"skip_liveid": true
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/v2/authenticate_with_liveid",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"tenantId": "string",
"communityId": "string",
"dns": "string",
"dvcID": "string",
"context": "string",
"userAgent": "string",
"purpose": "string",
"scopes": "string",
"authType": "string",
"deviceInfo": {},
"userInfo": {},
"selfie": "string",
"pin": "string",
"user_token": "string",
"isTrustedDevice": true,
"skip_liveid": true
}
},
)
print(res.json()){
"status": "success",
"message": "Authentication successful",
"data": {}
}Submit face for verification and enrolling
Submits a selfie for face verification and enrolling.
Headers
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
sessionId (required)
Session ID
selfie (required)
Base64 encoded selfie image
deviceId (required)
Device ID
cameraIndicator (optional)
Camera indicator object containing various metrics related to the camera and environment
Returns
Returns session status, pin requirement, and message.
This API throws an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to submit face.
{
"data": {
"sessionId": "session-123",
"selfie": "base64string...",
"deviceId": "device-456",
"cameraIndicator": {
"overallConfidence": 0.09,
"riskLevel": "LOW",
"label": "facetime hd camera (c4e1:9bfb)",
"detectionTiers": {},
"recommendations": [],
"browserCompatibility": {}
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/v2/submit_face' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Content-Type: application/json' \
-d '{"data": {"sessionId": "string", "selfie": "string", "deviceId": "string", "cameraIndicator": {}}}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/v2/submit_face", {
method: "POST",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"sessionId": "string",
"selfie": "string",
"deviceId": "string",
"cameraIndicator": {}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/v2/submit_face",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
},
json={
"data": {
"sessionId": "string",
"selfie": "string",
"deviceId": "string",
"cameraIndicator": {}
}
},
)
print(res.json()){
"data": {
"success": true,
"sessionId": "string",
"status": "string",
"pinRequired": true,
"message": "string"
}
}// no response body
// no response body
// no response body
// no response body
Verify user PIN for authentication
Verifies the user PIN and device trust, returns isAuthenticated in encrypted response.
Headers
authorization (required)
Authorization token
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
ECDSA encrypted payload with pin and isTrustedDevice
Returns
Returns isAuthenticated in encrypted response. This API throws an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| authorizationrequired | string | Authorization token |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to verify PIN.
{
"data": {
"pin": "1234",
"isTrustedDevice": true
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/verify_pin' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'Content-Type: application/json' \
-d '{"data": {"pin": "string", "isTrustedDevice": true}}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/verify_pin", {
method: "POST",
headers: {
"authorization": "Bearer YOUR_TOKEN",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"pin": "string",
"isTrustedDevice": true
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/verify_pin",
headers={
"authorization": "Bearer YOUR_TOKEN",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET"
},
json={
"data": {
"pin": "string",
"isTrustedDevice": true
}
},
)
print(res.json()){
"data": "string"
}// no response body
// no response body
// no response body
// no response body
[DEPRECATED] PID webhook callback for UWL session
DEPRECATED: This endpoint is deprecated and has been removed. Use /v2/submit_face instead.
Sunset date: 2026-02-02
| Name | Type | Description |
|---|---|---|
| uwl_session_idrequired | string | UWL session ID |
| Field | Type | Description |
|---|---|---|
| sessionId | string | PID session ID |
| transactionID | string | Transaction ID |
| status | string | Status of the PID session One of: SUCCESS |
| puid | string | — |
| guid | string | — |
| selfie | string | Base64 encoded selfie image (if required) |
| message | string | Message for the PID session |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/webhooks/<uwl_session_id>' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"sessionId": "string", "transactionID": "string", "status": "SUCCESS", "puid": "string", "guid": "string", "selfie": "string", "message": "string"}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/webhooks/<uwl_session_id>", {
method: "POST",
headers: {
"authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"sessionId": "string",
"transactionID": "string",
"status": "SUCCESS",
"puid": "string",
"guid": "string",
"selfie": "string",
"message": "string"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/webhooks/<uwl_session_id>",
headers={
"authorization": "Bearer YOUR_TOKEN"
},
json={
"sessionId": "string",
"transactionID": "string",
"status": "SUCCESS",
"puid": "string",
"guid": "string",
"selfie": "string",
"message": "string"
},
)
print(res.json()){
"error": "string",
"message": "string",
"sunset": "string"
}Service Key
Service Key endpoints.
Get service keys
This endpoint returns available service keys. The license you are using must be of authLevel 'system'
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns array with service keys
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/servicekeys' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/servicekeys", {
method: "GET",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/servicekeys",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"tag": "xxxxx",
"keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"type": "xxxxx",
"debug": false
}
]// no response body
// no response body
// no response body
// no response body
Reset Service Key
This endpoint resets service key for given keyId. Deletes current one and recreates a new one. The license you are using must be of authLevel 'system'
Parameters
keyId (required)
The keyId of service key to reset
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns re-created service key
| Name | Type | Description |
|---|---|---|
| keyIdrequired | string | keyId of service key to reset |
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/walletapi/servicekey/<keyId>' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/servicekey/<keyId>", {
method: "DELETE",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/walletapi/servicekey/<keyId>",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"tag": "xxxxx",
"keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"type": "xxxxx",
"debug": false
}
]// no response body
// no response body
// no response body
ECDSA Helper
ECDSA Helper endpoints.
Encrypt and decrypt the data string by public key and private key.
Encrypt and decrypt the data string by public key and private key.
Parameters
method (optional)
The method parameter is type of enum. Default value is encrypt.
This parameter only accepts following values
encrypt, decrypt
Request Body
data (optional)
The data key is type of String.
publicKey (required)
The publicKey is type of string.
privateKey (required)
The privateKey is type of string.
Returns
Returns the encrypted/decrypted string.
This API throw an error if something goes wrong. A common source of error is public or private key is not valid.
| Name | Type | Description |
|---|---|---|
| method | string | — |
| Field | Type | Description |
|---|---|---|
| data | string | — |
| publicKey | string | — |
| privateKey | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/walletapi/ecdsa_helper/<method>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"data": "Hey, This is example data string.", "publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=", "privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/walletapi/ecdsa_helper/<method>", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "Hey, This is example data string.",
"publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=",
"privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/walletapi/ecdsa_helper/<method>",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
},
json={
"data": "Hey, This is example data string.",
"publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=",
"privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json())"xxxxxxxxxxxxxxxxxxxxxx"
Environment
Environment endpoints.
/environment
Provide details regarding the environments.
Returns
Returns an environment object
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/environment' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/environment", {
method: "GET",
headers: {
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/environment",
headers={
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
Healthz
Healthz endpoints.
Get healthz.
Get healthz
Returns
Returns a healthz object
- ``
version = <git-tag>.<commit-id>.<dob>``
- ``
git-tag``: When code is compiled from a git-tag, this must carry the tag name. This should match one of the git tags. - ``
commit-id``: This is the git-commit-id. eg: When code is built from this, the hex code, in the end, is the commit it. - ``
dob``: Date Of Build. This is epoc-time-in-se conds that tell the time when the build was created. - if the code is not built from a git-tag, then the ``
version =<commit-id>.<dob>``
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/healthz' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/healthz", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/healthz",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"status": "all services operational",
"publicKey": "//same as <service>/publickeys endpoint",
"code": "200",
"version": "xxxx.xxxx.xxxx"
}Public Key
Public Key endpoints.
Get system's public key.
Get system's public key.
Returns
Returns a public key object
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/publickeys' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/publickeys", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/publickeys",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"publicKey": ""
}// no response body
Service Directory
Service Directory endpoints.
Get all service directories.
Get all service directories.
Returns
Returns all service directories.
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/sd' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/sd", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/sd",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"name1": "https://xxx.xxxxxx.xxx/xxxxx",
"name2": "https://xxx.xxxxxx.xxx/xxxxx",
"name3": "https://xxx.xxxxxx.xxx/xxxxx"
}Well Known config
Well Known config endpoints.
Get well known config.
Get well known config
Returns
Returns an object
curl -X GET 'https://pilot-root.1kosmos.net/walletapi/.well-known' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY' \ -H 'authorization: Bearer YOUR_TOKEN'
const res = await fetch("https://pilot-root.1kosmos.net/walletapi/.well-known", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/walletapi/.well-known",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"authorization": "Bearer YOUR_TOKEN"
}
)
print(res.json()){
"auth_endpoint": "https://$dns/walletapi/authenticate",
"enrollment_check_endpoint": "https://$dns/walletapi/check_enrollment",
"public_key": "//same as <service>/publickeys endpoint",
"purpose_supported": [
"authenticate",
"enroll"
],
"scopes_supported": [
"wallet",
"liveness_score",
"selfie",
"face_compare_score"
]
}