---
title: "Generate a password using a policy"
method: GET
path: "/restapi/json/v1/passwords/generate"
tags: ["Passwords"]
---

# Generate a password using a policy

`GET /restapi/json/v1/passwords/generate`

## Request

- Base URL: `https://Hostname:Port`
- URL: `https://Hostname:Port/restapi/json/v1/passwords/generate`
- Auth: API key in header `AUTHTOKEN`
- TypeScript: <https://skmtc.dev/manageengine/apis/pam360-rest-api/docs/restapi/json/v1/passwords/generate/get.ts> (a function with typed inputs; its response is checked against the schema)

Generates a new password based on the specified password policy. The policy strength (e.g., Strong, Medium, Weak) should be passed in the `INPUT_DATA` query param.

## Query parameters

- `passwordPolicy` string

## Headers

- `orgName` string

## Response `200`

Generated password

- GeneratePasswordResponse
  - `operation` object
    - `result` OperationResult
      - `message` string: Result message describing the operation outcome
      - `status` string: Operation status
    - `Details` object
      - `PASSWORD` string: The password generated based on the defined password policy.
    - `name` string

---

[API](https://skmtc.dev/manageengine/apis/pam360-rest-api.md) - [All operations](https://skmtc.dev/manageengine/apis/pam360-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/manageengine/apis/pam360-rest-api/revisions/44a47abb4bdb?raw)
