SurePassID REST API V1
SurePassID Authentication Server
Overview
Base URL
https://<server>/<application-root>/api/mfa/v1
Omit <application-root>/ when installed at the
website root. Both api/mfa/v1 and api/mfa/v1/
route to AuthServer/REST/OATH/OATHServer.aspx.
Use POST with a JSON body. The API checks for a content type
containing json; they do not themselves enforce the HTTP
verb. Responses use application/json; charset=utf-8.
Application errors normally retain HTTP 200: always inspect
errorCode. Hosting/authentication middleware can still
return HTTP errors.
Content Type
Content-Type: application/json
Authentication
Most operations require a tenant API key pair and the
operation-specific permission. Public wrappers accept HTTP Basic
credentials
(Authorization: Basic <base64(login:secret)>) or the
JSON fields below. Use HTTPS; Base64 is not encryption. Do not log keys,
passwords, session/provisioning tokens, QR data, or provisioning
secrets.
Authentication Fields
| Field | Type | Required | Description |
|---|---|---|---|
spAccountLoginName |
string | Yes* | API Key ID |
spAccountLoginKey |
string | Yes* | API Key Secret |
*get_system_time is always exempt from API credentials.
When Server.AllowDirectProvisioning is true (default),
shared processing also exempts provision_oath_device,
provision_device, provision_push_device,
delete_push_user_device, and
update_push_user_device. This does not bypass
device/provision-token validation; provision_push_device is
rejected by its handler. An authenticated portal session supplies its
tenant context instead of following the external-credential path.
The JSON credential extraction path lowercases both credential strings. Basic header parsing uses ISO-8859-1 and splits at the first colon. Missing/malformed Basic headers do not themselves produce a 401; shared processing/handlers report application errors. Use one credential mechanism per request.
Without a portal session, pre_enroll,
pre_sign, delete_key, and
delete_all_keys also require appId; shared
processing lowercases it. Server configuration must supply
Server.AppId even for other operations. A returned
application sessionToken is not a replacement for API key
authentication.
Example Authentication
{
"type": "find_user",
"spAccountLoginName": "api-key-id-here",
"spAccountLoginKey": "api-key-secret-here",
"username": "john.doe"
}Common Request/Response Structure
Standard Request Format
{
"type": "find_user",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe"
}Standard Response Format
Success Response
{
"type": "<api_type>",
"errorCode": 0,
"errorMessage": "OK"
}Error Response
{
"type": "<api_type>",
"errorCode": 9131,
"errorMessage": "<error_description>"
}Enumerations Reference
Request property names and response casing are significant
(tokenID differs from tokenId;
Devices differs from devices).
type is normalized to lowercase. Unknown properties are
generally ignored, not validated as a schema. Missing, JSON-null, empty,
and malformed values are not interchangeable. Supply the documented
types rather than depending on dynamic conversions.
Every operation below includes the common request fields above even
when its table lists only operation-specific inputs. Unless a
specialized success payload is described, success contains only
type, numeric errorCode: 0, and
errorMessage: "OK". Errors normally use that envelope
without success data. Malformed requests/unknown types can return
type: "generic", code 9999; credential/configuration checks
can fail before dispatch. Quiet mode masks diagnostic details. Never
assume response type always echoes the request: U2F
initialization deliberately uses different types, and some legacy error
branches also differ.
DeviceTypesEnum
| Value | Name | Description |
|---|---|---|
| -1 | None | No device type |
| 0 | FOB | Hardware FOB token |
| 1 | Desktop | Desktop software token |
| 4 | ElectronicCard | Electronic card token |
| 5 | SmartCard | Smart card token |
| 6 | MatrixCard | Matrix card token |
| 7 | CellPhoneSMS | SMS-based OTP |
| 8 | GoogleAuthenticator | Google Authenticator compatible |
| 9 | SurePassAuthenticatorMobile | SurePassID Mobile Authenticator |
| 10 | CellPhoneVoice | Voice call OTP |
| 11 | CellPhoneVoiceNoOTP | Voice call confirmation (no OTP) |
| 12 | FIDO | FIDO security key |
| 13 | NymiBand | Nymi Band biometric |
| 14 | Treo | Treo device |
OTPTypesEnum
| Value | Name | Description |
|---|---|---|
| 0 | Event | HOTP (Event-based) |
| 1 | Time | TOTP (Time-based) |
| 2 | TimeAndPassword | TOTP with PIN |
| 3 | OCRA | OCRA challenge-response |
| 4 | OCRAAndPIN | OCRA with PIN |
| 5 | OCRAHiSense | OCRA High Sensitivity |
| 6 | OCRAHiSenseAndPIN | OCRA High Sensitivity with PIN |
| 7 | Matrix | Matrix card |
| 8 | FIDOU2F | FIDO U2F |
| 9 | FIDOUAF | FIDO UAF |
| 10 | DynamicCvcEvent | Dynamic CVC (Event-based) |
| 11 | DynamicCvcTime | Dynamic CVC (Time-based) |
| 12 | DynamicCvcTimeAndPassword | Dynamic CVC with PIN |
| 14 | Event256 | HOTP SHA-256 |
| 15 | Time256 | TOTP SHA-256 |
| 16 | DynamicCvcEvent256 | Dynamic CVC Event SHA-256 |
| 17 | DynamicCvcTime256 | Dynamic CVC Time SHA-256 |
| 18 | Event512 | HOTP SHA-512 |
| 19 | Time512 | TOTP SHA-512 |
| 20 | DynamicCvcEvent512 | Dynamic CVC Event SHA-512 |
| 21 | DynamicCvcTime512 | Dynamic CVC Time SHA-512 |
| 22 | OffLine | Offline codes |
| 24 | FIDO2_UV | FIDO2 with User Verification (passwordless) |
| 25 | FIDO2_2FA | FIDO2 Second Factor |
The enum also retains obsolete values 13 (FIDO_20) and
23 (FIDO2); their presence is not a recommendation to
create new devices using them. Source identifiers for values 2 and 12
contain the legacy spelling Passsword; numeric wire values
above are authoritative.
DeviceEnabledStatusEnum
| Value | Name | Description |
|---|---|---|
| -2 | All | All statuses (filter only) |
| -1 | New | New/unactivated device |
| 0 | Enabled | Device is enabled |
| 1 | Disabled | Device is disabled |
| 2 | TestMode | Device in test mode |
UserStatusEnum
| Value | Name | Description |
|---|---|---|
| 0 | Enabled | User account is enabled |
| 1 | Disabled | User account is disabled |
AdminRoleEnum
| Value | Name | Description |
|---|---|---|
| 0 | SuperAdministrator | Super Administrator role |
| 1 | Administrator | Administrator role |
| 2 | UserManager | User Manager role |
| 3 | HelpDeskSupport | Help Desk Support role |
| 4 | HelpDeskManager / AAO | Help Desk Manager role |
| 20 | None | No administrative role (regular user) |
| 99 | All | All roles (filter only) |
SendOtpDeliveryMethod
| Value | Name | Alias | Description |
|---|---|---|---|
| 0 | Sms | "sms", "s" | Send OTP via SMS |
| 1 | "email", "e" | Send OTP via Email | |
| 2 | Call | "call", "c" | Send OTP via Voice Call |
SendPushMessageDeliveryMethod
| Value | Name | Alias | Description |
|---|---|---|---|
| 0 | PushSmsQuestion | "pushsmsquestion", "pq" | Push SMS question |
| 2 | PushAppQuestion | "pushapp", "pa" | Push App question |
| 4 | PushVoice | "pushvoice", "pv" | Push Voice call |
ApiPermissionsEnum
The table lists active enum names, not proof that a handler uses the
permission suggested by its name. The operation matrix below records
actual checks. Obsolete enum members omitted here are 2
(ValidateCsc), 18 (AddPushAccount), 22
(ProvisionSso), 23 (ProvisionSsoAccount), 46
(CreateCompany), 47 (WriteRestLog), and 48
(WriteLogBypassCode). | Value | Name | Description |
|-------|------|-------------| | 1 | ValidateOtp | Validate OTP codes |
| 3 | ValidateOtpPin | Validate OTP with PIN | | 4 |
CreateServerChallenge | Create server challenge | | 5 |
CreateSessionToken | Create session tokens | | 6 | CheckSessionToken |
Check session token validity | | 7 | ExpireSessionToken | Expire session
tokens | | 8 | FidoU2FEnroll | FIDO U2F enrollment | | 9 | FidoU2FSign |
FIDO U2F signing | | 10 | FidoU2FDelete | Delete FIDO U2F keys | | 11 |
ValidateUser | Validate user credentials | | 12 | AddUser | Add new
users | | 13 | UpdateUser | Update user information | | 14 | DeleteUser
| Delete users | | 15 | ChangeUserPassword | Change user passwords | |
16 | FindUser | Find single user | | 17 | FindUsers | Find multiple
users | | 20 | ProvisionTokenOta | Provision token OTA | | 21 |
ProvisionTokenQr | Provision token QR code | | 24 | SendDeviceActivation
| Send device activation | | 25 | SendPasswordRecovery | Send password
recovery | | 26 | DeviceStatus | Enable/disable devices | | 27 |
DeleteDevice | Delete devices | | 28 | DeviceAssignment |
Assign/unassign devices | | 29 | DeviceActivation | Activate devices | |
30 | FindDevice | Find devices | | 31 | AddU2FDevice | Add U2F devices |
| 32 | AddOathDevice | Add OATH devices | | 33 | SendPushApp | Send push
app notifications | | 34 | SendPushVoice | Send push voice calls | | 35
| SendPushU2FApp | Send push U2F app | | 36 | SendPushOtp | Send push
OTP | | 37 | SendPushSms | Send push SMS | | 38 | SendPushCancel |
Cancel push messages | | 39 | GetVerifyMethods | Get verification
methods | | 40 | SyncOtp | Synchronize OTP device | | 41 | SendOtpSms |
Send OTP via SMS | | 42 | SendOtpEmail | Send OTP via Email | | 43 |
SendOtpVoice | Send OTP via Voice | | 44 | DirectorySync | Directory
synchronization | | 45 | EventLogSync | Event log synchronization | | 49
| Fido2Attestation | FIDO2 attestation | | 50 | Fido2Assertion | FIDO2
assertion | | 51 | Fido2List | FIDO2 list authenticators | | 52 |
Fido2Delete | FIDO2 delete authenticators | | 53 | GetLicense | Get
license information (auto-granted) |
NotificationTransportEnum
Enrollment notificationMethod uses 0/None,
1/Email, 2/Sms, 3/Voice,
4/Push. Names are case-sensitive in the current parser;
empty/unparseable input becomes None. These values are
not the deliveryMethod numbers used by
OTP/push requests. Accepted enum parsing does not guarantee that every
enrollment template supports every transport.
API Endpoints
Authentication APIs
validate_oath_otp
Validates an OTP code for a user.
Type: validate_oath_otp
Permission Required: Any one of
ValidateOtp (1), SendPushApp (33),
SendPushVoice (34), SendPushU2FApp (35), or
SendPushSms (37), via the implied OTP permission group.
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "validate_oath_otp" | |
username | string | Yes | User's login name | |
otp or code | string | Yes | OTP code to
validate; code overrides otp when both are
supplied. Keep leading zeroes. | | psn | string | No |
Printed serial number of specific token | | ocodes | short
| No | Requested count of offline codes after successful validation;
default 0. Invalid parsing retains 0. Actual issuance depends on
backend/device policy. |
Request Example:
{
"type": "validate_oath_otp",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"code": "123456"
}Success Response:
{
"type": "validate_oath_otp",
"errorCode": 0,
"errorMessage": "OK"
}When populated, serverChallengeCode and
offlineCodes are strings, not arrays. Both
are omitted when empty. OTP validation can advance token counters,
update authentication history, and affect failed-attempt/lockout state.
On this path, username can also resolve an existing mobile
session token to its user's login name.
validate_otp_pin_mode
Validates an OTP and then sets the user's credential to the supplied new PIN. This is a PIN-reset workflow, not validation of an existing PIN.
Type: validate_otp_pin_mode
Permission Required: ValidateOtpPin
(3)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "validate_otp_pin_mode"
| | username | string | Yes | User's login name | |
otp or code | string | Yes | OTP to validate;
code takes precedence and the result is trimmed. | |
pin | string | Yes | New credential to store after
successful OTP validation; trimmed. Tenant PIN-reset permission and
credential policy must allow it. | | psn | string | No |
Printed serial number |
Success is the common envelope. Implementation
caveat: the handler does not check the result of its final
UpdateUser call before producing success. Do not interpret
that envelope alone as proof that the new PIN persisted. This
documentation does not change that behavior.
validate_user
Alias: validate_u2f_user. Both use the same handler.
Normal mode validates credentials and creates a session token;
noAuth mode only looks up account status and devices, and
does not authenticate the user.
Type: validate_user
Permission Required: ValidateUser (11)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "validate_user" | |
username | string | Yes | User's login name | |
pw | string | Conditional | Credential for normal
authentication; defaults to empty, and authentication policy decides
acceptance. Ignored in noAuth mode. | |
sessionIp | string | No | IP value passed to creation of
the mobile session token; default empty. | | noAuth |
string | No | Only textual "1" selects lookup-only mode;
default false. API permission is still checked. | |
sessionTokenDurationMinutes | short | No | Requested
lifetime. Current handler only accepts a value whose text is
"1"; every other value leaves the 30-minute
default. Use create_session_token for its separate
duration parser. |
Request Example:
{
"type": "validate_user",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"pw": "password123"
}Success Response (with auth):
{
"type": "validate_user",
"errorCode": 0,
"errorMessage": "OK",
"sessionToken": "abc123-session-token",
"userRole": 20
}Success Response (noAuth=1):
{
"type": "validate_user",
"errorCode": 0,
"errorMessage": "OK",
"userStatus": 0,
"userRole": 20,
"devices": [
{
"psn": "TOKEN001",
"deviceType": 9,
"otpType": 1,
"deviceStatus": 0,
"tokenID": "unique-id"
}
]
}send_oath_otp
Sends an OTP to the user via SMS, Email, or Voice call.
Type: send_oath_otp
Permission Required: SendOtpSms (41),
SendOtpEmail (42), or SendOtpVoice (43)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "send_oath_otp" | |
username | string | Yes | User's login name | |
deliveryMethod | string/int | No | "sms",
"email", "call" or 0, 1, 2 (default: sms) | |
alternateAddress | string | No | Alternate phone/email
address | | templateName | string | No | Selects a custom
notification template for the delivery; absent uses normal template
selection. |
Request Example:
{
"type": "send_oath_otp",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"deliveryMethod": "email"
}Success Response:
{
"type": "send_oath_otp",
"errorCode": 0,
"errorMessage": "OK"
}create_server_challenge
Creates a server challenge for OCRA authentication.
Type: create_server_challenge
Permission Required: CreateServerChallenge
(4)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes |
"create_server_challenge" | | username |
string | Conditional | User login (or resolvable mobile session token);
at least username or psn must be nonempty. | |
psn | string | Conditional | Specific token printed serial
number; required when username is empty. |
Success uses the OTP response shape: optional string
serverChallengeCode and optional string
offlineCodes, omitted when empty. The server persists
challenge state for subsequent validation.
User Management APIs
add_user
Creates a new user account (without device).
Type: add_user
Permission Required: AddUser (12)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "add_user" | |
username | string | Yes | Login name (max 50 chars) | |
firstName | string | No | First name (max 50 chars) | |
lastName | string | No | Last name (max 50 chars) | |
email | string | No | Email address (max 100 chars) | |
pw | string | No | Initial credential, maximum 175
characters at this boundary; backend enrollment and tenant credential
policy still apply. Default empty. | | mobile | string | No
| Mobile number validated and normalized to E.164. Default empty. | |
userStatus | string | No | Defaults to disabled.
DISABLED or 1 disables; another nonempty value
enables (case-insensitive). Use
ENABLED/DISABLED explicitly. | |
group | string | No | Group name to add user to | |
role | string | No | Initial AdminRoleEnum, default
None (20). Only read when
AllowRestApiToSetUserRole is enabled; otherwise ignored. Do
not rely on invalid values being rejected consistently. | |
notificationMethod | string | No |
NotificationTransportEnum name/numeric value selecting enrollment
notification delivery. Empty/unparseable input selects
None; see enumeration notes below. | |
userActivationTemplateName | string | No | Custom
user-activation notification template selector; empty uses backend
selection. | | deviceActivationTemplateName | string | No |
Custom device-activation template selector passed to enrollment;
relevant to device creation. |
ssoIdentity is not read for
add_user; it is read inside the device-creation
branch for the combined/device operations below. Optional names, email,
group, and template selectors default to empty strings. Success includes
string deviceId, empty when no device is created.
Request Example:
{
"type": "add_user",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"mobile": "+1234567890",
"userStatus": "ENABLED"
}Success Response:
{
"type": "add_user",
"errorCode": 0,
"errorMessage": "OK",
"deviceId": ""
}add_oath_user
Creates a new user account with an OATH token.
Type: add_oath_user
Permission Required: AddUser (12) +
AddOathDevice (32)
Request Parameters: All parameters from
add_user plus:
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceType |
int | Yes | DeviceTypesEnum value |
otpType or OtpType |
int | Yes | OTPTypesEnum algorithm; lowercase property wins. Device-type compatibility is checked by backend enrollment. |
otpLength or OtpLength |
int | No | Number of OTP digits, default 6; lowercase property wins. |
windowSize |
int | No | OTP time-step/window setting, default 30, passed to enrollment. |
timeDrift |
int | No | Token drift tolerance passed to enrollment, default 5. This handler supplies a concrete value when absent rather than leaving it unset. |
psn |
string | No | Printed serial number |
secretKeyHex |
string | No | Imported secret bytes encoded as hex; when supplied must be 40, 64, or 128 hex characters (20/32/64 bytes). Empty leaves secret creation to enrollment. |
secretKeyHexBase64 |
string | No | Base64 of secret bytes, not Base64 of hex text.
Nonempty value overrides secretKeyHex; decoded size must be
20/32/64 bytes. |
otpPin or OtpPin |
string | No | Token-level OTP PIN setting; lowercase property wins; default empty.
Distinct from user pw. |
counter |
string | No | Current/next event-counter setting passed to enrollment; default
"0". |
startingCounter |
string | No | Initial counter setting; default "0". |
expirationDate |
string | No | Explicit expiration passed to backend date parsing; empty leaves
default-expiration calculation to enrollment. Prefer an unambiguous date
such as 2026-12-31. |
deviceStatus |
string | No | Default disabled. DISABLED/1 and
New/-1 map to disabled;
Test/2 maps to test mode; other nonempty
values enable. |
mobileUsage |
int | No | Legacy selector: 0 = push only, 2 = OATH plus push; default OATH. This is not a general flags value. |
mobileAuth |
int | No | 1 adds the require-credentials flag for mobile provisioning; absent does not. |
mobileTokenIssuer |
string | No | Explicit soft-token issuer; empty allows backend tenant/global issuer resolution. |
softTokenAlias |
string | No | User-defined mobile-token label; default empty. |
ssoIdentity |
string | No | SSO login identity passed to enrollment for these device branches; default empty. |
Numeric settings are largely converted from text at the
handler/backend boundary; do not assume every integer is a supported
algorithm setting. Enrollment can create persistent accounts/devices and
send notifications; it is not a preview operation. Successful responses
add string deviceId.
Request Example:
{
"type": "add_oath_user",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"deviceType": 9,
"otpType": 1,
"otpLength": 6,
"windowSize": 30
}Success Response:
{
"type": "add_oath_user",
"errorCode": 0,
"errorMessage": "OK",
"deviceId": "generated-device-id"
}add_oath_device
Adds an OATH token to an existing user.
Type: add_oath_device
Permission Required: AddOathDevice
(32)
Request Parameters: Uses the device table under
add_oath_user, plus username,
group, notificationMethod,
userActivationTemplateName, and
deviceActivationTemplateName. Supply username to assign to
an existing user; the handler does not require a nonempty username in
device-only mode. User profile fields (firstName,
lastName, email, pw,
mobile, role) are not read in this mode.
Success includes deviceId.
add_u2f_user
Creates a new user with a FIDO U2F device.
Type: add_u2f_user
Permission Required: AddUser (12) +
AddOathDevice (32)
Uses the same combined user/device parameter tables and response as
add_oath_user; the operation name does not automatically
supply deviceType or otpType.
add_u2f_device
Adds a FIDO U2F device to an existing user.
Type: add_u2f_device
Permission Required: AddOathDevice
(32)
Uses the add_oath_device contract, including required
deviceType and otpType. Despite its name, the
registered handler checks AddOathDevice, not
AddU2FDevice. Success includes deviceId.
update_user
Updates an existing user's information.
Type: update_user
Permission Required: UpdateUser (13)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "update_user" | |
username | string | Yes | Existing login name, maximum 50
characters; cannot rename the login. | | firstName | string
| No | Replacement first name, maximum 50 characters. | |
lastName | string | No | Replacement last name, maximum 50
characters. | | email | string | No | Replacement email,
maximum 100 characters. | | pw | string | No | New
credential, maximum 175 characters at this boundary. Backend rejects
administrator credential updates through this operation and applies
tenant policy for regular users. | | mobile | string | No |
Replacement phone, validated/normalized to E.164. | |
userStatus | string | No | Nonempty
DISABLED/1 disables; another nonempty value
enables. Empty/absent leaves status unchanged. | |
ssoIdentity | string | No | Changes an existing SSO
activation identity when nonempty; does not create one. |
Empty/absent optional profile values do not clear stored fields. Re-enabling an account can reset failed-login counters and send an account-unlocked notification.
Request Example:
{
"type": "update_user",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"email": "john.doe.new@example.com",
"userStatus": "ENABLED"
}Success Response:
{
"type": "update_user",
"errorCode": 0,
"errorMessage": "OK"
}delete_user
Deletes a user account.
Type: delete_user
Permission Required: DeleteUser (14)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "delete_user" | |
username | string | Yes | Login name of user to delete | |
removeRelated | bool/string | No | Default false.
true, TRUE, 1, or
YES (case-insensitive text) requests removal of related
records through backend deletion. This is destructive; do not use as a
lookup. |
find_user
Retrieves user information and associated devices.
Type: find_user
Permission Required: FindUser (16)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "find_user" | |
username | string | Yes | Login name to search | |
checkEmail | bool | No | Also search by email address |
checkEmail defaults to false. Success includes strings
username, pw, firstName,
lastName, mobile, email,
bypassMFA ("0"/"1"), string enum
name role, boolean vip, numeric
userStatus, and capitalized Devices (array of
full find_device responses). pw is not a
promise of a recoverable plaintext credential: the handler returns empty
for plaintext-format values and may return a stored non-plaintext
representation. Treat this entire payload as sensitive.
Request Example:
{
"type": "find_user",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe"
}Success Response:
{
"type": "find_user",
"errorCode": 0,
"errorMessage": "OK",
"userStatus": 0,
"username": "john.doe",
"pw": "",
"firstName": "John",
"lastName": "Doe",
"mobile": "+1234567890",
"email": "john.doe@example.com",
"bypassMFA": "0",
"vip": false,
"role": "None",
"Devices": [
{
"type": "find_device",
"errorCode": 0,
"errorMessage": "OK",
"deviceType": 9,
"otpType": 1,
"otpLength": 6,
"assigned": 1,
"deviceStatus": 0,
"assignedToID": 123,
"username": "john.doe",
"email": "john.doe@example.com",
"tokenID": "unique-token-id",
"psn": "TOKEN001",
"tokenAlias": "My Phone",
"activationStatus": 1
}
]
}find_users
Retrieves a list of users matching criteria.
Type: find_users
Permission Required: FindUsers (17)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "find_users" | |
queryFilter | string | No | Search expression passed to
backend selection; empty/absent becomes % (all matching
users). Not named filter. | | queryFilterType
| string | No | Default login-name filter. email selects
email; all selects the name filter (case-insensitive). A
case-sensitive prefix rawQuery selects the legacy raw-query
branch: administrative/trusted input only, not ordinary end-user search
text. |
Success adds users, an array of
{ "id": 123, "username": "john.doe" } records.
id is a numeric database user ID; username is the login. No
paging cursor or total-count field is defined by this response
model.
change_user_password
Changes a user's password.
Type: change_user_password
Permission Required: ChangeUserPassword
(15)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "change_user_password" |
| username | string | Yes | User's login name | |
pw | string | Conditional | New credential, required and
nonempty for SurePass. Defaults to empty for other directory selections.
This operation does not read currentPassword or
newPassword. | | directory | int | No | 0
SurePass (default), 1 ActiveDirectory, 2 Ldap, 3 AzureActiveDirectory.
Other numeric values retain SurePass. Only SurePass performs a password
write here; other selections use the notification path without updating
the external directory. | | fromEmailName | string | No |
Sender display-name override for the change notification; default empty.
| | fromEmailAddress | string | No | Sender-address
override; default empty. | | emailSubject | string | No |
Notification subject override; default empty. | | emailBody
| string | No | Notification body override; default empty. | |
html | int/string | No | Notification format selector, 1
for HTML; default plain text. |
The backend rejects administrator accounts. For SurePass users,
tenant credential policy is checked before persistence. Email failure
can occur after a password write, so an error does not guarantee
rollback. A nonempty emailBody selects direct custom email
(with sender/subject overrides); otherwise the configured
password-changed template is used.
send_password_recovery
Sends a password recovery email to the user.
Type: send_password_recovery
Permission Required: SendPasswordRecovery
(25)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "send_password_recovery"
| | email or account | string | Yes |
Account/email lookup value for recovery. Nonempty email
wins; otherwise account is used. This handler does not read
username. | | resetPasswordUrl | string | Yes
| Recovery page URL used to construct the recovery link. | |
emailSubject | string | No | Recovery message subject
override; default empty. | | emailBody | string | No |
Recovery message body override; default empty. | | html |
int/string | No | 1 selects HTML; default plain text. |
Sends email and establishes recovery state; success is not a session token.
password_recovery_change_password
Changes password using recovery token.
Type:
password_recovery_change_password
Permission Required: SendPasswordRecovery
(25)
| Parameter | Type | Required | Description |
|---|---|---|---|
pw |
string | Yes | New nonempty credential to persist. |
rid |
string | Yes | Recovery token from the issued recovery link. |
mid |
string | Yes | Signature associated with that recovery token and its expiration; copied from the recovery link, not a user ID. |
fromEmailName |
string | No | Sender display-name override for confirmation; default empty. |
fromEmailAddress |
string | No | Sender email override; default empty. |
emailSubject |
string | No | Confirmation subject override; default empty. |
emailBody |
string | No | Confirmation body override; default empty. |
html |
string | No | Only textual "1" selects HTML; default false. |
Backend validates signature and expiration before changing the password. Confirmation-email failure can occur after the password was persisted, so an error is not proof that no change occurred.
Token/Device Management APIs
find_device
Retrieves device information.
Type: find_device
Permission Required: FindDevice (30)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "find_device" | |
psn | string | No* | Printed serial number | |
tokenID | string | No* | Unique token identifier |
*One of psn or tokenID is required.
Nonempty psn takes precedence. tokenID is
the device's unique identifier, not its numeric database ID. Success
fields are described after the example.
Request Example:
{
"type": "find_device",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"psn": "TOKEN001"
}Success Response:
{
"type": "find_device",
"errorCode": 0,
"errorMessage": "OK",
"deviceType": 9,
"otpType": 1,
"otpLength": 6,
"assigned": 1,
"deviceStatus": 0,
"assignedToID": 123,
"username": "john.doe",
"email": "john.doe@example.com",
"tokenID": "unique-token-id",
"psn": "TOKEN001",
"tokenAlias": "My Phone",
"activationStatus": 1
}The full device response contains numeric deviceType,
otpType, otpLength, assigned
(0/1), deviceStatus, assignedToID (user ID, -1
if absent), and activationStatus; strings
username, email, tokenID,
psn, and tokenAlias; and the common envelope.
Activation status is 0 when unprovisioned, 1 when provisioned without a
recorded successful OTP validation, and 2 after validation. It is
distinct from enabled/disabled status.
assign_device
Assigns a token to a user.
Type: assign_device
Permission Required: DeviceAssignment
(28)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "assign_device" | |
username | string | Yes | User to assign to | |
psn | string | Yes | Printed serial number | |
force | bool/string | No | Default false.
TRUE, 1, or YES (case-insensitive
text) permits reassignment through backend assignment rules. |
Request Example:
{
"type": "assign_device",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"psn": "TOKEN001",
"force": "TRUE"
}unassign_device
Unassigns a token from a user.
Type: unassign_device
Permission Required: DeviceAssignment
(28)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "unassign_device" | |
username | string | Yes | User to unassign from | |
psn | string | Yes | Printed serial number | |
force | bool/string | No | Same parser and backend
reassignment flag as assign_device; default false. |
enable_device
Enables a token.
Type: enable_device
Permission Required: DeviceStatus (26)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "enable_device" | |
username | string | Yes | User's login name | |
psn | string | Yes | Printed serial number |
disable_device
Disables a token.
Type: disable_device
Permission Required: DeviceStatus (26)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "disable_device" | |
username | string | Yes | User's login name | |
psn | string | Yes | Printed serial number |
delete_device
Deletes a token.
Type: delete_device
Permission Required: DeleteDevice (27)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "delete_device" | |
username | string | Yes | User's login name | |
psn | string | Yes | Printed serial number |
active_oath_device
Activates an OATH device using two consecutive OTPs.
Type: active_oath_device
Permission Required: DeviceActivation
(29)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "active_oath_device" | |
username | string | Yes | User's login name | |
otp1 | string | Yes | First OTP | | otp2 |
string | Yes | Second OTP | | psn | string | Yes | Specific
token to activate. |
sync_oath_device
Synchronizes an OATH device using two consecutive OTPs.
Type: sync_oath_device
Permission Required: SyncOtp (40)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "sync_oath_device" | |
username | string | Yes | User's login name | |
otp1 | string | Yes | First OTP | | otp2 |
string | Yes | Second OTP | | psn | string | Yes | Specific
token whose counter/drift is to be synchronized. |
provision_device / provision_oath_device
Provisions a mobile token (used by mobile app).
Type: provision_device or
provision_oath_device
Authorization: Shared credentials may be omitted when
direct provisioning is enabled. These handlers call backend provisioning
without an explicit ProvisionTokenOta permission check;
device activation state and any configured credential requirements still
apply.
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "provision_device" or
"provision_oath_device" | | deviceId or
tokenId | string | Yes | Device activation/provisioning
identifier. deviceId wins when present. Neither
code nor psn is read by these handlers. | |
username | string | Conditional | Login used when mobile
provisioning requires credentials; otherwise passed as empty. | |
pw | string | Conditional | Corresponding credential when
required; default empty. | | token | string | No |
Push-provider notification token; provision_device only,
default empty. | | apnsTopic | string | No | APNs
application topic; provision_device only, default null. | |
pushType | int | No | Mobile provider: 0 iOS (default), 1
Android; provision_device only. | | deviceName
| string | No | Mobile-device display name;
provision_device only, default empty. | |
relyingParty | string | No | Relying-party URL supplied to
provisioning; provision_device only, default empty. |
physicalCode is not read here (the backend receives an
empty value). provision_device chooses its response by the
resolved mobile usage: OATH-only, push-only, or combined.
provision_oath_device always constructs the OATH response.
Provisioning updates device state and can return secret material; store
securely and never log the payload.
OATH success fields (all included; strings unless noted):
| Field | Meaning |
|---|---|
authServerURL |
Configured authorization-server URL. |
exportable |
Boolean; this response constructor leaves it at false. |
issuer |
Device override or resolved tenant/global issuer. |
label |
Display label derived from serial number or encoded mobile token alias. |
nextCounter, startingCounter |
Event-counter state as strings. |
otpLength, otpType,
otpWindow |
OTP settings as strings, not JSON numbers. |
secretKey |
Provisioned OTP secret. Treat as a credential. |
secretKeyChallengeClient,
secretKeyChallengeServer |
Challenge-response secret material from the device record. |
serialNumber |
Provisioning/display serial, not always the original PSN: non-event
OTP types can receive a Token-prefixed serial, and mobile
aliases can replace it. |
version |
Device version string. |
Push-only success fields: strings
account (provisioning account), username
(login), issuer, provisionToken (credential
for registration maintenance), relyingPartner (returned
relying-party URL; note spelling), serialNumber, and
boolean exportable. Combined success: all
OATH fields plus account, username,
provisionToken, and relyingPartner.
get_oath_device_qrcode
Gets a QR code for provisioning a soft token.
Type: get_oath_device_qrcode
Permission Required: ProvisionTokenQr
(21)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "get_oath_device_qrcode"
| | username | string | Yes | User's login name | |
deviceId or tokenId | string | Yes |
Activation/device identifier; deviceId wins.
psn is not read. | | physicalCode | string |
No | Physical activation code passed to backend QR provisioning; default
empty. | | accountName | string | No | Provisioning
account-label override; default empty. | | format | string
| No | base64 (case-insensitive) selects an inline QR
image; otherwise returns the configured QR URL form. | |
customChartUrl | string | No | QR rendering URL override;
defaults to configured CustomChartUrl. Cleared/ignored in
Base64 mode. |
This operation invokes provisioning with automatic token enablement; it is not guaranteed to be a read-only image lookup.
Success Response:
{
"type": "get_oath_device_qrcode",
"errorCode": 0,
"errorMessage": "OK",
"QRCodeURL": "qr-url-or-image-data",
"SPMobileInstantActivationUri": "mobile-activation-uri"
}Both response fields are strings. QRCodeURL holds the
selected QR representation, not a separate base64QRCode
property; SPMobileInstantActivationUri is the mobile
instant-activation URI supplied by provisioning.
send_device_activation
Sends device activation notification to user.
Type: send_device_activation
Permission Required: SendDeviceActivation
(24)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "send_device_activation"
| | username | string | Yes | User's login name | |
psn | string | Yes | Nonempty serial number of the token to
activate. | | deliveryMethod | string | No |
sms/s (default) or
email/e, case-insensitive. Unrecognized values
retain SMS; numeric email selection is not implemented here. | |
serverEndpoint | string | No | Server endpoint supplied
when composing the activation notification; default empty. | |
templateName | string | No | Custom activation template
selector; absent uses normal selection. |
Push Authentication APIs
send_push_message
Sends a push authentication request.
Type: send_push_message
Permission Required: SendPushApp (33) for
app, SendPushVoice (34) for voice, or
SendPushSms (37) for SMS.
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "send_push_message" | |
username | string | Yes | User's login name | |
appName | string | Yes | Application name for display | |
deliveryMethod | string/int | No | Default 0 (SMS
question). Accepts 0/pushsmsquestion/pq,
2/pushapp/pa, or
4/pushvoice/pv. Values 1 and 3 are not
accepted. | | printedSerialNumber | string | No | Specific
token PSN | | authnAccount | string | No | Account name
(default: "account") | | authnReason | string | No | Reason
for auth (default: "Login") | | relyingPartyUrl | string |
No | Relying party URL | | voiceCallSendMessage | string |
No | Voice call message | | alternateAddress | string | No
| Alternate phone/address | | templateName | string | No |
Custom notification template selector for SMS-question delivery; absent
uses normal selection. |
Request Example:
{
"type": "send_push_message",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"appName": "Corporate VPN",
"deliveryMethod": "pushapp",
"authnReason": "VPN Login"
}Success Response:
{
"type": "send_push_message",
"errorCode": 0,
"errorMessage": "OK",
"authnUserReqId": "push-request-token-id"
}is_user_push_authenticated
Checks if user has responded to push authentication.
Type: is_user_push_authenticated
Permission Required: ValidateOtp (1)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes |
"is_user_push_authenticated" | | username |
string | Yes | User's login name | | authnUserReqId |
string | Yes | Request identifier returned by
send_push_message; not named pushToken. |
Success Response (authenticated):
{
"type": "is_user_push_authenticated",
"errorCode": 0,
"errorMessage": "OK"
}cancel_push_message
Cancels a pending push authentication request.
Type: cancel_push_message
Permission Required: SendPushCancel
(38)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "cancel_push_message" |
| username | string | Yes | User's login name | |
authnUserReqId | string | Yes | Request identifier to
cancel; not named pushToken. |
receive_push_response
Receives push response from mobile app.
Type: receive_push_response
Permission Required: Push permissions (mobile only)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "receive_push_response"
| | response | string | No | Only yes
(case-insensitive) accepts. Missing/other values reject; default false.
| | authnUserReqId | string | Yes | Authentication request
ID |
tap_auth_response
Alternative push response endpoint (from mobile app).
Type: tap_auth_response
Permission Required: Push permissions (mobile only)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "tap_auth_response" | |
errorCode | int | No | 0 accepts; nonzero or missing
rejects. | | token | string | No | Device token | |
appReqId | string | Yes | Application request ID |
provision_push_device
Alias: add_push_user_device. These are registered but
disabled; they do not provision a device.
Type: provision_push_device
Behavior: After shared processing and a successful
database connection, the handler unconditionally returns
ApiAccessViolation (9131). There are no operation-specific
inputs and no success payload. Direct-provisioning exemption applies
only to provision_push_device, not
add_push_user_device. Use the supported
provision_device workflow for appropriate mobile usage
instead.
update_push_user_device
Updates push device registration.
Type: update_push_user_device
Authorization: Shared direct-provisioning rules plus
backend device/provision-token validation; no explicit API-permission
check in this handler.
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceId or tokenId |
string | Yes | Registered device identifier; deviceId wins. |
provisionToken |
string | Yes | Provisioning credential returned during registration. |
oldToken |
string | Yes | Nonempty previous push-provider notification token. |
newToken |
string | Yes | Nonempty replacement push-provider notification token. |
pushType |
int | No | Mobile provider: 0 iOS (default), 1 Android. |
Updates persistent push registration. Success is the common envelope.
delete_push_user_device
Removes push device registration.
Type: delete_push_user_device
Permission Required: DeletePushAccount
(19)
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceId or tokenId |
string | Yes | Device identifier; deviceId wins. |
provisionToken |
string | Yes | Provisioning credential authorizing registration removal. |
Uses mobile authorization; when direct provisioning omits credentials
the device identifies the partner. Compatibility
behavior: backend deletion failure after authorization is
returned with errorCode: 0 and the backend error text,
allowing the mobile client to remove its local token. Earlier
authorization/connection failures still return errors. A zero code alone
does not prove server-side deletion.
Session Management APIs
create_session_token
Creates a session token for a user.
Type: create_session_token
Permission Required: CreateSessionToken
(5)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "create_session_token" |
| username | string | Yes | User's login name | |
pw | string | No | User's password | |
sessionTokenDurationMinutes | short | No | Token duration
(default: 30) | | sessionTokenType | int | No | Default 1
(SurePassMobile). Values: 0 SurePassSso, 1 SurePassMobile,
2 SurePassMobilePrivilege, 3 SurePassFidoServer. Unparseable input
becomes 0 through TryParse; use a defined value. |
sessionTokenDurationMinutes is parsed as a signed 16-bit
minute count; use a positive value. Unlike validate_user,
this handler reads values other than 1. Client IP is taken from the HTTP
request; a JSON sessionIp is not read here. pw
defaults to empty but backend account lookup/credential rules still
govern issuance. Success adds string sessionToken; no
expiration timestamp is returned.
Request Example:
{
"type": "create_session_token",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"username": "john.doe",
"sessionTokenDurationMinutes": 60
}Success Response:
{
"type": "create_session_token",
"errorCode": 0,
"errorMessage": "OK",
"sessionToken": "generated-session-token"
}is_session_token_valid
Checks if a session token is valid.
Type: is_session_token_valid
Permission Required: CheckSessionToken
(6)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "is_session_token_valid"
| | username | string | No | User's login name | |
sessionToken | string | Yes | Session token to validate | |
sessionIp | string | No | Session IP to validate |
Success is the common envelope, not a boolean valid
property. Invalid/expired sessions return an application error. This
checks server-side application session state, not portal-cookie
authentication.
Request Example:
{
"type": "is_session_token_valid",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"sessionToken": "session-token-to-check"
}expire_session_token
Expires/invalidates a session token.
Type: expire_session_token
Permission Required: ExpireSessionToken
(7)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "expire_session_token" |
| sessionToken | string | Yes | Session token to expire | |
isFullDeletion | bool | No | Default false: clears
expiration to invalidate the token. True: deletes the session record.
Invalid boolean text retains false. |
This handler does not call the shared JSON username extractor; do not
rely on a body username to establish ownership. Any caller
username passed by the dispatcher is a separate context. Backend checks
and API permission still apply.
find_account_by_mobile_session_token
Finds account associated with a mobile session token.
Type:
find_account_by_mobile_session_token
Permission Required: FindUser (16)
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionToken |
string | Yes | Mobile session token to look up; handler defaults missing input to empty and lets lookup fail. |
Success adds numeric partnerId and string
username (the stored SSO name). This lookup is not the
expiration/validity check performed by
is_session_token_valid.
FIDO U2F APIs
pre_enroll
Initiates FIDO U2F enrollment.
Type: pre_enroll
Permission Required: FidoU2FEnroll (8)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "pre_enroll" | |
username | string | Yes | User's login name | |
appId | string | Yes | Application ID (facet) |
Success Response:
{
"type": "u2f_register_request",
"errorCode": 0,
"errorMessage": "OK",
"RegisterRequest": [
{
"appId": "https://example.com",
"challenge": "base64url-challenge",
"sessionId": "enrollment-session-id",
"version": "U2F_V2"
}
],
"SignRequest": []
}RegisterRequest contains one enrollment request;
SignRequest contains existing-key challenge records (schema
below). The handler also saves enrollment session state in the portal
session. These are legacy U2F messages, not WebAuthn creation
options.
enroll
Completes FIDO U2F enrollment.
Type: enroll
Permission Required: FidoU2FEnroll (8)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "enroll" | |
username | string | Conditional | Login name; initial
validation accepts username or psn. See the PSN caveat
below. | | registrationData | string | Yes | Base64
registration data | | clientData | string | Yes | Base64
client data | | sessionId | string | Conditional | ID from
RegisterRequest. Required for stateless callers; absent may
use and clear the portal's saved enrollment session. | |
psn | string | Conditional | Read for initial
username-or-PSN check, but not forwarded to EnrollAppU2F.
Do not assume a PSN-only request identifies an account. | |
securityKeyName | string | No | Name for security key | |
code | string | No | Activation code |
Optional key name and activation code default to empty. Successful enrollment persists the key and returns the common envelope.
pre_sign
Initiates FIDO U2F authentication.
Type: pre_sign
Permission Required: FidoU2FSign (9)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "pre_sign" | |
username | string | Yes | Nonempty user login (or
resolvable mobile session token), required even when psn is
supplied. | | appId | string | Yes | Application ID (facet)
| | psn | string | No | Specific token serial, trimmed and
passed to U2F challenge initialization; default empty. |
Success Response:
{
"type": "u2f_sign_request",
"errorCode": 0,
"errorMessage": "OK",
"SignRequest": []
}This illustrates the response container; a usable challenge requires
a populated entry. Each SignRequest element contains
strings appId, challenge,
sessionId, keyHandle,
securityKeyName, and version; array-of-string
transports (default ["usb"]); numeric
id and state (default 0); and
lastUpdateDate (DateTime serialization, default year 0001
when not supplied). The handler also saves a key-handle-to-session-ID
dictionary for portal-session callers. The same element schema is used
by pre_enroll.
sign
Completes FIDO U2F authentication.
Type: sign
Permission Required: FidoU2FSign (9)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "sign" | |
username | string | Conditional | Login name; initial
validation accepts username or psn. | |
signatureData | string | Yes | Base64 signature data | |
clientData | string | Yes | Base64 client data | |
sessionId | string | Conditional | ID from the selected
SignRequest; required for stateless use. | |
keyHandle | string | Conditional | Only used to look up
saved portal-session state when sessionId is absent. | |
psn | string | Conditional | Read for the initial
username-or-PSN check but not forwarded to ValidateAppU2F;
do not depend on PSN-only identification. |
Success is the common envelope after signature validation; it does not return a new application session token.
delete_key
Deletes a specific FIDO U2F key.
Type: delete_key
Permission Required: FidoU2FDelete
(10)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "delete_key" | |
username | string | Yes | User's login name | |
appId | string | Yes | Application ID | |
securityKeyName | string | Yes | Key name, or key handle
when selected by securityKeyType. keyHandle is
not read here. | | securityKeyType | string | No | Default
selects key name. 0 or keyHandle
(case-insensitive) interprets securityKeyName as a key
handle. |
delete_all_keys
Deletes all FIDO U2F keys for a user/app.
Type: delete_all_keys
Permission Required: FidoU2FDelete
(10)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "delete_all_keys" | |
username | string | Yes | User's login name | |
appId | string | Yes | Application ID |
delete_stale_keys
Runs tenant-scoped cleanup of stale FIDO sessions, rather than deleting every expired enrolled authenticator. No operation-specific parameters are read.
Type: delete_stale_keys
Permission Required: AddU2FDevice (31)
update_fido_device_name
Updates the friendly name of a FIDO device.
Type: update_fido_device_name
Permission Required: AddU2FDevice (31)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes |
"update_fido_device_name" | | deviceId | int |
Yes | Numeric database device ID, not the provisioning identifier used
by other operations. Missing/unparseable/zero is rejected. | |
userDefinedName | string | No | Replacement friendly name;
default empty. deviceName, username, and
keyHandle are not read. |
System APIs
get_system_time
Returns the server's current Unix timestamp.
Type: get_system_time
Permission Required: None (no authentication
required)
Request Example:
{
"type": "get_system_time"
}Success Response:
{
"type": "get_system_time",
"errorCode": 0,
"errorMessage": "OK",
"systemTime": 1704067200
}systemTime is a 64-bit integer Unix timestamp in
seconds, not milliseconds. No operation-specific inputs are read.
get_license
Returns license information.
No operation-specific inputs. Basic success fields: numeric
licenseVersion, maxUsers,
daysUsed, maxDays; strings
licenseStatus, expirationDate (round-trip ISO
date); booleans hasExpirationDate,
hostedInstall, communityEdition,
evaluation, evaluationExpired.
hasExpirationDate determines whether to interpret the
expiration as a limit.
For V2, optional objects product, company,
and licensing are omitted when null. product
contains strings name, edition,
version, integers
maxTokens/maxUsers, boolean
multiTenantInstall, and string arrays
componentList/platformList.
company contains strings name,
contact, email. licensing
contains strings issueDate/licenseKey and
boolean bypassHostNameValidation. Treat license/customer
details as sensitive; this operation exposes the installed server
license, not a tenant usage report.
Type: get_license
Permission Required: GetLicense (53) -
automatically granted to any valid API key
Request Example:
{
"type": "get_license",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret"
}Success Response (V2 License):
{
"type": "get_license",
"errorCode": 0,
"errorMessage": "OK",
"licenseVersion": 2,
"licenseStatus": "Valid",
"expirationDate": "2025-12-31T00:00:00.0000000",
"hasExpirationDate": true,
"maxUsers": 1000,
"hostedInstall": false,
"communityEdition": false,
"evaluation": false,
"evaluationExpired": false,
"daysUsed": 0,
"maxDays": 0,
"product": {
"name": "SurePassID Authentication Services",
"edition": "Enterprise",
"version": "2025.4",
"maxTokens": 5000,
"maxUsers": 1000,
"multiTenantInstall": false,
"componentList": ["Mfa Server", "Radius", "Saml2 IdP"],
"platformList": ["On-Premises"]
},
"company": {
"name": "Acme Corporation",
"contact": "John Doe",
"email": "john.doe@acme.com"
},
"licensing": {
"issueDate": "2025-01-01T00:00:00.0000000",
"licenseKey": "SPID-2025-ENT-001",
"bypassHostNameValidation": false
}
}get_verified_methods
Returns available verification methods for a user.
Type: get_verified_methods
Permission Required: GetVerifyMethods
(39)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "get_verified_methods" |
| username | string | No | Account whose available methods
are requested. Empty/absent skips user/device validation and reports
methods allowed by API-key permissions rather than an individual
account's capabilities. | | psn | string | No | Specific
device selector, read only when username is nonempty. |
Success adds methods, a string array of backend
verification-method identifiers. It does not mean those methods were
successfully authenticated in this request.
Current identifiers are SEND_SMS,
SEND_VOICE, SEND_EMAIL, PUSH_APP,
PUSH_VOICE, PUSH_SMS,
VALIDATE_OTP, VALIDATE_USER,
PIN_RESET, FIDO2_ATTESTATION, and
FIDO2_ASSERTION; NONE is returned when no
method qualifies. For a supplied username, account/device/contact
eligibility and API permissions affect the result.
trace
Writes a trace log entry (debugging).
Type: trace
Authorization: Common credentials/session processing;
this handler performs no separate permission check.
| Parameter | Type | Required | Description |
|---|---|---|---|
username |
string | Yes | User label for trace context. |
traceType |
int | No | Default 0: writes the supplied trace message when logging is enabled. 1: returns success without writing that message. Other values rejected. |
traceMessage |
string | Conditional | Message to log, required for type 0. Never put secrets in it. |
Success does not guarantee a log entry when tracing is disabled.
Sync APIs
directory_sync_start
Synchronously processes a supplied batch of directory users. It does not start a background directory crawl.
Type: directory_sync_start
Permission Required: DirectorySync
(44)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "directory_sync_start" |
| group | short | Yes | Batch/group sequence number, not an
application user-group ID. Value 1 writes a synchronization-begin audit
entry. | | last | bool | Yes | True marks this as the last
batch for completion logging. Supply a boolean: although malformed
conversion leaves true, missing input returns an error. | |
adusers | array | Yes | Nonempty array of directory-user
objects with the exact case-sensitive names below. |
| User field | Type | Purpose |
|---|---|---|
Username |
string | Login used to find/update or create the tenant user. Empty or
textual null usernames are skipped. |
GivenName |
string | First name; nonempty values can update existing records. |
SirName |
string | Last name (the misspelling is the wire name); nonempty values can update records. |
Email |
string | User email. |
MobileNumber |
string | Mobile contact number; backend normalizes or sanitizes it. |
Status |
string | Accepted and copied into the input DTO but not applied by the current synchronization backend. |
AdditionalStatusInfo |
string | Accepted but not applied by the current backend. |
Missing optional nested strings become null. Existing users retain nonempty stored values when incoming fields are empty. New records are regular users with generated credentials. No absent-user deletion or status mirroring is implemented. Per-user exceptions are logged and processing continues, so a success envelope is not a per-record success report. The current change-detection helper tests equality rather than inequality; do not assume all requested profile differences are applied. Review audit results and verify affected records.
{
"type": "directory_sync_start",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"group": 1,
"last": true,
"adusers": [
{
"Username": "john.doe",
"GivenName": "John",
"SirName": "Doe",
"Email": "john.doe@example.com",
"MobileNumber": "+12025550123",
"Status": "",
"AdditionalStatusInfo": ""
}
]
}event_log_sync_start
Retrieves an event-log batch for the authorized tenant. In normal mode it also marks the returned events synchronized. It is not a background-job launcher.
Type: event_log_sync_start
Permission Required: EventLogSync (45)
Request Parameters: | Parameter | Type | Required |
Description | |-----------|------|----------|-------------| |
type | string | Yes | "event_log_sync_start" |
| format | string | No | Default piped.
Case-insensitive json returns structured records; every
other value selects piped output. Whitespace is not trimmed. | |
maxRecords | int | No | Requested batch size, default 1.
Clamped to 1–1000 for JSON. Piped mode forces 1 regardless of the
supplied value. | | startDateUtc | date-time string | No |
Inclusive lower event-date bound. Unset means no lower bound. Send UTC
with Z, for example 2026-04-01T00:00:00Z. | |
endDateUtc | date-time string | No | Inclusive upper
event-date bound; unset means no upper bound. Send UTC with
Z. | | ignoreSyncStatus | bool | No | Default
false: select only events with no RemoteSyncDate and mark
returned events synchronized. True: include already-synchronized events
and do not update event/tenant synchronization tracking. Date and
severity filters still apply. |
Each option is parsed independently. Conversion failures silently
retain that option's default; an invalid date can therefore broaden
selection rather than reject the request. Validate values client-side.
There is no lastSyncTime, offset, page token,
or hasMore input/output contract.
Selection and side effects
- Tenant event-spooler severity settings limit eligible events. Missing settings fail the operation; all five categories disabled produces code 9050 rather than a normal empty batch.
- Date bounds are converted to server-local time to compare with
stored event dates, with inclusive
>=/<=comparisons. Results are ordered by ascending audit-record ID, not guaranteed chronological event time. An inverted range simply matches no dates. - With
ignoreSyncStatus: false, returned records receiveRemoteSyncDate; tenantLastEventLogSyncIdandLastEventLogSyncDateare updated. These changes happen before the HTTP response reaches the caller. There is no client acknowledgment protocol; a lost response can leave records marked synchronized. Do not treat this as an exactly-once delivery API. - With
ignoreSyncStatus: true, repeated identical requests return the same earliest matching batch. There is no cursor or stable ID in the JSON record schema, so date-only pagination can duplicate/skip records sharing a timestamp. Do not assume this provides lossless historical pagination beyond one batch. - Descriptions are truncated to 2,000 characters, with carriage returns, newlines, and tabs replaced by spaces. Action descriptions may be localized.
Response fields (in addition to the common envelope):
| Field | Type | Meaning / presence |
|---|---|---|
format |
string | json or piped. |
message |
string/null | Pipe-delimited event in piped mode; null in JSON mode and when no piped message exists. Included even when null. |
resultCode |
int | Result code of the last returned event; not the status of the API call. Defaults to 0 for no records. |
severity |
int | Numeric severity of the last returned event; defaults to 0 for no records. |
count |
int | Actual number returned. Omitted when zero. Piped output includes 1 when a message is present. |
records |
array | Structured records in JSON mode, including an empty array for no matches. Omitted in piped mode. |
JSON record schema:
| Field | Type | Meaning |
|---|---|---|
eventTime |
string | UTC timestamp formatted yyyy-MM-dd HH:mm:ss.fffZ
(space, not T). |
tenant |
string | Tenant display name, with backend domain/ID fallback. |
username |
string | Joined user login, or None when unavailable. |
userEmail |
string | Joined user email, otherwise empty. |
ssoIdentity |
string | Joined SSO identity, otherwise empty. |
action |
string | Display description of the audit action. |
severity |
string | Severity label; distinct from the numeric envelope-level severity. |
eventResultCode |
int | Result of the recorded event. |
eventDescription |
string | Sanitized/truncated audit description. |
eventIpV4 |
string | Recorded IPv4 address, otherwise empty. |
eventIpV6 |
string | Recorded IPv6 address, otherwise empty. |
eventApiKeyName |
string | Recorded API key display name, not its secret; otherwise empty. |
eventSerialNumber |
string | Recorded device PSN; null maps to N/A. |
eventAuthenticationMethod |
string | Authentication-method name, or N/A. |
Severity mappings: 0 = SUCCESS, 1 = INFO, 2
= WARNING, 3 = ACTION, 4 = ERROR.
Unrecognized numeric values are rendered as their numeric text in
record/piped labels.
Historical JSON request (does not advance synchronization state):
{
"type": "event_log_sync_start",
"spAccountLoginName": "api-key-id",
"spAccountLoginKey": "api-key-secret",
"format": "json",
"maxRecords": 100,
"startDateUtc": "2026-04-01T00:00:00Z",
"endDateUtc": "2026-04-30T23:59:59.999Z",
"ignoreSyncStatus": true
}Populated JSON success response (illustrative):
{
"type": "event_log_sync_start",
"errorCode": 0,
"errorMessage": "OK",
"message": null,
"resultCode": 0,
"severity": 0,
"format": "json",
"count": 1,
"records": [
{
"eventTime": "2026-04-15 12:30:00.000Z",
"tenant": "Example Tenant",
"username": "john.doe",
"userEmail": "john.doe@example.com",
"ssoIdentity": "john.doe",
"action": "OTP Validation",
"severity": "SUCCESS",
"eventResultCode": 0,
"eventDescription": "OTP validated successfully",
"eventIpV4": "192.0.2.10",
"eventIpV6": "",
"eventApiKeyName": "Example Integration",
"eventSerialNumber": "TOKEN001",
"eventAuthenticationMethod": "N/A"
}
]
}Empty JSON success response:
{
"type": "event_log_sync_start",
"errorCode": 0,
"errorMessage": "OK",
"message": null,
"resultCode": 0,
"severity": 0,
"format": "json",
"records": []
}Although the backend sets its internal status to
SyncEventLogNothingToSync for zero matches, it returns a
non-null result and the handler constructs the success envelope above.
This differs from all severity categories being disabled, which returns
an error envelope. Clients should test records.length, or
treat absent count as zero, rather than require error 9050
to terminate normal polling.
Piped format: message contains ten
fields separated by |: UTC event time, username, result
code, event description, action description, severity label, IPv4, IPv6,
API key name, printed serial number. Delimiters within text are not
escaped; prefer JSON for structured consumers. Empty piped results
contain message: null, format: "piped", zero
resultCode/severity, and omit
count and records.
For ordinary incremental collection, omit date bounds and
ignoreSyncStatus, select JSON and a suitable
maxRecords, and repeat until empty. Persist each received
batch promptly and account for the delivery limitation above. Do not
automatically replay historical requests as if they advance a
cursor.
Error Codes Reference
Common Error Codes
| Code | Name | Description |
|---|---|---|
| 0 | Success | Operation completed successfully |
| 9000 | PartnerLoginFailed | Partner login failure |
| 9001 | PartnerUserLoginFailed | User login failure |
| 9002 | OTPAlreadyUsed | OTP replay/reuse |
| 9003 | OTPInvalid | Invalid OTP |
| 9004 | DeviceInvalid | Invalid device |
| 9008 | DeviceTypeInvalid | Invalid device type |
| 9009 | DeviceNotSpecified | No device specified |
| 9010 | DatabaseError | Database error |
| 9018 | DeviceAssignedToDifferentPartner | Device belongs to another partner |
| 9019 | DeviceInUse | Device in use |
| 9021 | DeviceNotFound | Device lookup failed |
| 9028 | DeviceDisabled | Disabled token |
| 9029 | BogusSerialNumber | Invalid serial-number input |
| 9030 | BogusOTP | Invalid OTP input |
| 9031 | EmailSendError | Email delivery error |
| 9032 | AccountExpired | Expired account |
| 9047 | DeviceAlreadyProvisioned | Already provisioned token |
| 9048 | SyncUserFailed | Directory synchronization failure |
| 9049 | SyncEventLogFailed | Event synchronization failure |
| 9050 | SyncEventLogNothingToSync | No events selected/to synchronize; see the event-sync empty-result distinction |
| 9106 | SessionTokenInvalid | Invalid session token |
| 9107 | SessionTokenCreationFailed | Session creation failure |
| 9108 | SessionTokenDeleteFailed | Session deletion/expiration failure |
| 9124 | DeviceNotAssigned | Token not assigned |
| 9128 | DeviceExpired | Token expired |
| 9130 | DeviceNotEnabled | Token not enabled |
| 9131 | ApiAccessViolation | API permission denied |
| 9133 | PartnerUserNotFound | User not found |
| 9136 | DeleteStaleKeysFailed | Stale-key/session cleanup failure |
| 9999 | DiagnosticTrace | Malformed request, configuration, or diagnostic error; details may be masked |
This is a selected list, not every backend audit result.
Names/numbers come from the shared AuditResultCode class,
not the older portal enum. HTTP status codes (such as 403) are not
interchangeable with JSON application result codes. Error strings can be
localized or masked; branch on numeric codes and operation-specific
behavior.
API Permissions Reference
Permission Matrix by API Type
| API Type | Permission Required | Permission ID |
|---|---|---|
validate_oath_otp |
Any permission in implied OTP group | 1, 33, 34, 35, 37 |
validate_otp_pin_mode |
ValidateOtpPin | 3 |
create_server_challenge |
CreateServerChallenge | 4 |
create_session_token |
CreateSessionToken | 5 |
is_session_token_valid |
CheckSessionToken | 6 |
expire_session_token |
ExpireSessionToken | 7 |
pre_enroll, enroll |
FidoU2FEnroll | 8 |
pre_sign, sign |
FidoU2FSign | 9 |
delete_key, delete_all_keys |
FidoU2FDelete | 10 |
validate_user, validate_u2f_user |
ValidateUser | 11 |
add_user |
AddUser | 12 |
add_oath_user, add_u2f_user |
AddUser AND AddOathDevice | 12 and 32 |
update_user |
UpdateUser | 13 |
delete_user |
DeleteUser | 14 |
change_user_password |
ChangeUserPassword | 15 |
find_user,
find_account_by_mobile_session_token |
FindUser | 16 |
find_users |
FindUsers | 17 |
get_oath_device_qrcode |
ProvisionTokenQr | 21 |
send_device_activation |
SendDeviceActivation | 24 |
send_password_recovery,
password_recovery_change_password |
SendPasswordRecovery | 25 |
enable_device, disable_device |
DeviceStatus | 26 |
delete_device |
DeleteDevice | 27 |
assign_device, unassign_device |
DeviceAssignment | 28 |
active_oath_device |
DeviceActivation | 29 |
find_device |
FindDevice | 30 |
delete_stale_keys,
update_fido_device_name |
AddU2FDevice | 31 |
add_oath_device, add_u2f_device |
AddOathDevice | 32 |
send_push_message (app) |
SendPushApp | 33 |
send_push_message (voice) |
SendPushVoice | 34 |
send_push_message (sms) |
SendPushSms | 37 |
cancel_push_message |
SendPushCancel | 38 |
get_verified_methods |
GetVerifyMethods | 39 |
sync_oath_device |
SyncOtp | 40 |
send_oath_otp (sms) |
SendOtpSms | 41 |
send_oath_otp (email) |
SendOtpEmail | 42 |
send_oath_otp (voice) |
SendOtpVoice | 43 |
directory_sync_start |
DirectorySync | 44 |
event_log_sync_start |
EventLogSync | 45 |
get_license |
GetLicense | 53 |
is_user_push_authenticated |
ValidateOtp | 1 |
receive_push_response,
tap_auth_response |
Mobile authorization with implied push group | 33, 34, 35, 37 |
delete_push_user_device |
Mobile authorization | 19 |
provision_device, provision_oath_device,
update_push_user_device |
No explicit permission check in handler; shared/direct provisioning and backend device credentials apply | Not a grant of anonymous unrestricted access |
add_push_user_device,
provision_push_device |
Handler rejects with ApiAccessViolation | No successful permission path |
get_system_time |
Credential-exempt | None |
trace |
Shared credentials/session only; no additional permission check | None |
For the normal API-key permission checker, an implied group is satisfied by any one listed permission. Combined enrollment performs two separate checks and requires both. Mobile authorization additionally follows its own tenant/device path; do not infer that possession of a JSON username authorizes a push callback.
Complete API Type Reference
| API Type String | Constant Name |
|---|---|
get_verified_methods |
GET_VERIFIED_METHODS |
password_recovery_change_password |
PASSWORD_RECOVERY_CHANGE_PASSWORD |
change_user_password |
CHANGE_USER_PASSWORD |
get_system_time |
GET_SYSTEM_TIME |
get_license |
GET_LICENSE |
send_password_recovery |
SEND_PASSWORD_RECOVERY |
create_session_token |
CREATE_SESSION_TOKEN |
send_device_activation |
SEND_DEVICE_ACTIVATION |
expire_session_token |
DELETE_SESSION_TOKEN |
find_account_by_mobile_session_token |
FIND_ACCOUNT_BY_MOBILE_SESSION_TOKEN |
find_device |
FIND_DEVICE |
find_user |
FIND_USER |
find_users |
FIND_USERS |
assign_device |
ASSIGN_DEVICE |
enable_device |
ENABLE_DEVICE |
disable_device |
DISABLE_DEVICE |
delete_device |
DELETE_DEVICE |
unassign_device |
UNASSIGN_DEVICE |
is_user_push_authenticated |
IS_USER_PUSH_AUTHENTICATED |
is_session_token_valid |
IS_SESSION_TOKEN_VALID |
add_u2f_user |
ADD_U2F_USER_ACCOUNT |
validate_u2f_user |
VERIFY_U2F_USER_ACCOUNT |
validate_user |
VERIFY_USER_ACCOUNT |
add_u2f_device |
ADD_U2F_USER_DEVICE |
add_oath_user |
ADD_OATH_USER_ACCOUNT |
update_user |
UPDATE_USER |
add_user |
ADD_USER |
delete_user |
DELETE_USER |
get_oath_device_qrcode |
GET_OATH_USER_DEVICE_QRCODE |
provision_oath_device |
PROVISION_OATH_DEVICE |
provision_device |
PROVISION_DEVICE |
add_oath_device |
ADD_OATH_DEVICE |
delete_key |
DELETE_SECRET_KEY |
delete_all_keys |
DELETE_ALL_SECRET_KEYS |
validate_oath_otp |
VALIDATE_OTP |
send_oath_otp |
SEND_OTP |
send_push_message |
SEND_PUSH_MESSAGE |
receive_push_response |
RECEIVE_PUSH_RESPONSE |
tap_auth_response |
TAP_AUTH_RESPONSE |
provision_push_device |
PROVISION_PUSH_DEVICE |
add_push_user_device |
ADD_PUSH_USER_DEVICE |
update_push_user_device |
UPDATE_PUSH_USER_DEVICE |
delete_push_user_device |
DELETE_PUSH_USER_DEVICE |
active_oath_device |
ACTIVATE_OTP_DEVICE |
sync_oath_device |
SYNC_OTP_DEVICE |
create_server_challenge |
CREATE_SERVER_CHALLENGE |
validate_otp_pin_mode |
VALIDATE_OTP_PIN_MODE |
cancel_push_message |
CANCEL_PUSH_MESSAGE |
update_fido_device_name |
UPDATE_FIDO_DEVICE_NAME |
delete_stale_keys |
DELETE_STALE_KEYS |
pre_enroll |
PRE_ENROLL |
enroll |
ENROLL |
pre_sign |
PRE_SIGN |
sign |
SIGN |
event_log_sync_start |
EVENT_LOG_SYNC_START |
directory_sync_start |
DIRECTORY_SYNC_START |
trace |
WRITE_TRACE |
© 2013–2026 SurePassID. All rights reserved. Protected by patents pending. SurePassID, the SurePassID logo and design, and Secure SSO are registered trademarks or trademarks of SurePassID, Corp. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
SurePassID 360 Central Avenue #800 St. Petersburg, FL 33701 USA +1 (888) 200-8144 surepassid.com