Skip to main content

API Reference

Base URL & Headers

https://<your-auth-service-domain>

All requests and responses use JSON:

Content-Type: application/json

Endpoint Summary

MethodEndpointAuthDescription
POST/auth/users/registerJWTRegister new user
GET/auth/devices/challenge/:device_verifying_keyJWTGet challenge for device registration
POST/auth/devices/registerJWT + Device Signature + Face (conditional)Register device verifying key
POST/auth/face/registerJWTRegister face biometric
GET/v2/keysJWTList user's MPC keys
GET/v2/devicesJWTList user's devices
POST/v2/keyshare/backupJWTSave encrypted keyshares
POST/v2/keyshare/recoverJWT + FaceFetch encrypted keyshares
GET/transactionsJWTGet transaction history
GET/v2/faceJWTGet face registration status

Authentication Methods

JWT Authentication

All endpoints require a valid Access Token (JWT) from the External Auth Service (e.g., Auth0).

Authorization: Bearer <access_token>

JWT Claims Used:

ClaimDescription
subUser identifier (auth0_id)
audMust include API identifier
expToken expiration time
scopeGranted permissions

Device Signature Authentication

Device registration endpoints require an additional Device Signature to prove possession of the device's private key (stored in Secure Enclave).

Signature Generation:

  1. Create JSON_MESSAGE containing request body fields
  2. Canonicalize JSON_MESSAGE (sort keys alphabetically, remove whitespace) per RFC 8785
  3. Compute: M = SHA256(bytes(canonicalize(JSON_MESSAGE)))
  4. Generate: DER-encoded ECDSA signature of M (NIST P-256 curve)
  5. Hex-encode the signature

Step-Up Authentication (JWT + Face)

Sensitive operations require JWT + Face Biometric verification:

  • POST /auth/devices/register — required if user has already registered a face
  • POST /v2/keyshare/recover — always required

FaceTec Fields:

FieldTypeDescription
face_scanstringBase64-encoded face scan from FaceTec SDK
audit_trail_imagestringBase64-encoded high-quality audit image
low_quality_audit_trail_imagestringBase64-encoded low-quality audit image
user_agentstringClient's user-agent string (required by FaceTec)

Error Codes

All errors follow this format:

{
"error": {
"code": 100101,
"message": "Human-readable error description"
}
}