An authenticator account represents a single OTP credential inside an authenticator app. You add accounts by providing an otpauth:// URI (the same URI encoded in QR codes), and then generate one-time passwords on demand.
Create account POST
POST /authenticator/apps/{app_id}/accounts
Add a new OTP account from an otpauth:// URI. The URI encodes the secret key, algorithm, digits, and period. Supports both TOTP and HOTP.
Path parameters
Parameter
Type
Description
app_id
UUID
Authenticator app ID
Request body
Field
Type
Required
Description
otpauth_uri
string
Yes
otpauth://totp/... or otpauth://hotp/... URI containing the OTP secret and parameters
display_name
string
No
Human-readable label for this account. Max 255 chars.
description
string
No
Optional description of what this account is for
Request example
JSON
Response (201)
JSON
Error responses
Status
Description
400
Valid otpauth:// URI but invalid OTP parameters (bad secret, unsupported algorithm, invalid digits/period)
403
Organization ID missing from token
404
Authenticator app not found
422
Malformed request or invalid otpauth_uri format
Code examples
cURL
List accounts GET
GET /authenticator/apps/{app_id}/accounts
List all non-deleted accounts in an authenticator app.
Path parameters
Parameter
Type
Description
app_id
UUID
Authenticator app ID
Response (200)
JSON
Code examples
cURL
Get account GET
GET /authenticator/apps/{app_id}/accounts/{account_id}
Get a single account by ID.
Path parameters
Parameter
Type
Description
app_id
UUID
Authenticator app ID
account_id
UUID
Account ID
Response (200)
Returns the full account object (see Account object below).
Soft-delete an account. Returns 204 No Content on success.
Path parameters
Parameter
Type
Description
app_id
UUID
Authenticator app ID
account_id
UUID
Account ID
Code examples
cURL
Generate OTP POST
POST /authenticator/apps/{app_id}/accounts/{account_id}/generate-otp
Generate a one-time password for an account. For TOTP accounts, the code is time-based and valid_for_seconds indicates how long until it expires. For HOTP accounts, the internal counter is incremented atomically.
Path parameters
Parameter
Type
Description
app_id
UUID
Authenticator app ID
account_id
UUID
Account ID
Response (200)
JSON
Response fields
Field
Type
Description
otp_code
string
The generated one-time password
valid_for_seconds
integer | null
Seconds until the code expires (TOTP only, null for HOTP)