---
title: "Create password history policy"
method: POST
path: "/resources/configurations/v1/password-history-policy"
tags: ["Password settings"]
---

# Create password history policy

`POST /resources/configurations/v1/password-history-policy`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/configurations/v1/password-history-policy`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/configurations/v1/password-history-policy/post.ts> (a function with typed inputs; its response is checked against the schema)

This route creates the password history policy for all tenants. To create a password history policy for a specific tenant, send the tenant’s ID in the **`frontegg-tenant-id`** header. To enable the Password History, make sure to set the enabled variable to true and the password history size to a number between 1 to 10.

## Headers

- `frontegg-tenant-id` string

## Request body

- PasswordHistoryPolicyRequest
  - `enabled` boolean, required: Detemine whether the history policy is enbaled.
  - `historySize` number, required: Number of passwords per user to remember in the history.

## Response `201`

- PasswordHistoryPolicyResponse
  - `id` string, required
  - `enabled` boolean, required
  - `historySize` number, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `409`: Policy already exists. Use the Update Password History Policy API.

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
