anon_email
API referenceAccount

Reset a password with a recovery code

POST
/auth/reset

Public recovery endpoint for zero-PII accounts. Consumes one recovery code and sets a new password; the code is single-use. Failures are deliberately uniform so the endpoint cannot be used to enumerate usernames.

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.

Request Body

application/json
  1. body
username*string

The account username.

code*string

One unused recovery code.

new_password*string

New password, at least 12 characters.

Length12 <= length

Response Body

Password reset.

application/json
  1. response
message*string

Human-readable result.

curl -X POST "https://example.com/auth/reset" \  -H "Content-Type: application/json" \  -d '{    "username": "string",    "code": "string",    "new_password": "stringstring"  }'
{  "message": "string"}