anon_email
API referenceAccount

Count unused recovery codes

GET
/account/recovery-codes

Zero-PII accounts may hold no email address, so account recovery uses one-time codes generated here. This returns only how many unused codes remain; the codes themselves are shown once at generation and cannot be read back.

Authorization

CognitoUserPool
headerAuthorizationBearer <token>

Cognito user pool ID token. API Gateway validates the token (identity token: no OAuth scopes are configured on the authorizer) and forwards its claims; the sub claim is the tenant key.

Response Body

Remaining code count.

application/json
  1. response
remaining*integer

Unused recovery codes.

curl -X GET "https://example.com/account/recovery-codes"
{  "remaining": 0}