Register a TOTP secret
POST/api/v2/totp/secrets
Store an encrypted TOTP secret for your account. Agents can use this instead of a phone-based authenticator app.
Provide either:
- A
uri(theotpauth://URI from a QR code scan), which auto-populates all fields - A base32
secretwith optionallabel,issuer,algorithm,digits, andperiod
Register a TOTP secret
curl https://api.sendblue.co/api/v2/totp/secrets \
-H 'Content-Type: application/json' \
-H "sb-api-key-id: $SENDBLUE_API_API_KEY" \
-H "sb-api-secret-key: $SENDBLUE_API_API_SECRET" \
-d '{
"issuer": "GitHub",
"label": "GitHub - [email protected]",
"secret": "JBSWY3DPEHPK3PXP",
"uri": "otpauth://totp/GitHub:agent%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=GitHub"
}'{
"status": "OK",
"totp_secret": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"algorithm": "SHA1",
"created_at": "2026-04-05T12:00:00Z",
"digits": 6,
"issuer": "GitHub",
"label": "GitHub - [email protected]",
"period": 30,
"secret": "JBSWY3DPEHPK3PXP"
}
}Returns Examples
{
"status": "OK",
"totp_secret": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"algorithm": "SHA1",
"created_at": "2026-04-05T12:00:00Z",
"digits": 6,
"issuer": "GitHub",
"label": "GitHub - [email protected]",
"period": 30,
"secret": "JBSWY3DPEHPK3PXP"
}
}