← Back to Documentations

Password Strength API

Analyze password composition rules and return an estimated strength score with improvement recommendations.

V1

/api/v1

First stable version for password strength analysis.

POST /api/v1/password-strength/analyze Auth Required
Analyze Password Strength

Checks minimum length, uppercase letters, lowercase letters, numbers, and special characters, then returns an estimated strength score.

Authentication
X-Api-Key: your_api_key
Body Parameters
Name Type Required Example Description
password string required StrongPass123! Password value to analyze. The password is not returned in the response.
minimum_length integer optional 8 Minimum length requirement. Default: 8. Supported range: 4-128.
Request Example
POST /api/v1/password-strength/analyze
Content-Type: application/json
X-Api-Key: your_api_key

{
  "password": "StrongPass123!",
  "minimum_length": 8
}
Response Example
{
    "success": true,
    "message": "Password strength analyzed successfully.",
    "data": {
        "password_length": 14,
        "minimum_length": 8,
        "checks": {
            "has_minimum_length": true,
            "has_uppercase": true,
            "has_lowercase": true,
            "has_number": true,
            "has_special_character": true
        },
        "estimated_strength_score": 95,
        "strength_key": "very_strong",
        "strength": "Very Strong",
        "recommendations": [],
        "note": "This endpoint estimates password strength from composition rules only. It does not check leaked-password databases or user-specific context."
    }
}
Error Response
{
    "success": false,
    "message": "The password field is required.",
    "error_code": "VALIDATION_ERROR"
}