About this endpoint
What it does
Scores a provided password's strength, or generates a strong password when requested. The request body lets you supply a password to analyze, or set generate to true and optionally specify the generated password length.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| length | Integer | No | Length for a generated password. Allowed range: 8-128. Default: 20. |
| generate | Boolean | No | Generate a strong password instead of scoring. |
| password | String | No | Password to score. Omit this field to generate one. |
Response
Returns a JSON object with analysis, password, and generated fields. analysis is an object containing the password evaluation details, password is the password value associated with the response, and generated is a boolean indicating whether the response contains a generated password.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| analysis | Object | No | Password analysis details. Contains length, strength, warnings, entropy_bits, character_classes, and estimated_crack_time. |
| password | String | No | Password value returned by the service. |
| generated | Boolean | No | Indicates whether the password was generated. |
Notes
The request body does not define any mutually exclusive constraint in the schema, so password, generate, and length are all optional at the schema level.