Overview
POST
/account/mfa/totp/enrollmfaBegin TOTP enrollment → otpauth URI + secret (shown once)
Create a record in enroll.
Auth: bearerAuth — calls run as the authenticated user.
Responses
200
Provisioning material
- secretstring
Base32 secret (for manual entry)
- otpauthUristring
otpauth:// URI to render as a QR code
Example
{
"secret": "string",
"otpauthUri": "string"
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}409
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}422
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/account/mfa/totp/enroll" \
-H "Authorization: Bearer YOUR_TOKEN"JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/account/mfa/totp/enroll", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
},
});
const data = await res.json();