---
id: policies-password-create
title: "policies_password_create"
description: "Password Policy Viewset"
sidebar_label: "policies_password_create"
hide_title: true
hide_table_of_contents: true
api: eJztWN1v2zYQ/1cIvezFs5wPrIWf1hZZF6BdjSbrHoJAoKSzxZoiVZKy4xr+33dH2pZsy86aBRi29SGBLN33/e53lJaRrsBwJ7S6zqNhVGkpMgE2qbi1c23yJDPAHUS9KAebGVGRKAqO1s/ZiDQW7JOAuQWHco5PbDS825qK7nuRgS81WPda54touIwyrRwoR5e8qlDMBxB/tmR6GdmsgJLTlVtUgM50+hky92gMN2AEl+IrGBStDGXmKAA0pHgJLYPWGaEmKFUK9Q7UxBXR8GzVi+ABspqsJ1JPJiTS6KRaS+DqIIo/ClDMFcIy7W8xvALFUwl5j3Ep2dYoSoyDZBUCngt8nAIjZ5D32esFy2HMa+l6TCu5aFQZGKONZdxspSOMd9ulsQCZP5bgfuS/kBKbwoI5zbDm2bTHxpt7lkIRCnImFBsZXVaOWewthCD4jAtJSfo4eKlr5ZJcTISzrTAE9nni21HyB1HWZTQ8P7t8cfny4qfLFz64cHPQ2KgrbFvGLfw9M1LPn8OMXZSplk9NSfrKJ3jviQaC+yQruKHh+gsAJpgkJViLnTqURwnf5wQ76USWmFqC7cD4Vq7gM0hEkgKopJojGk4Jf33IZqnqlihEWiU4DdgW5BSq7VNKso/gX/WclVwhgAXmjLMFbDMSrOC2oFlcOyWM46jhKFFOgjIKCWFwIfDEZtpA4goDttA74/TkAK/HPqjggHkHnh++1FwybRiWn8LmawaZcVlDL+TRoogxzhrO2SoQqTDUhrvAaUiuTjgJLToMbPgxUC5q7ag5UwMBC3nFCIdsfIccXKND5cQUf92vPF3bCukqQON8cPbPcHY17QL8WJuSYxhRXYs8olh5/gG5MqTWqkaw76Uw4e4F8C+k/AyZWCtQnWywG+ZbcCy0gW21mNWEN8fmwKYKx6fAPxwNyIXzuNv2bbew6HkGJtUWkmO7dNf5R3C1UWtzPyC029qPWE8qWRsuv91J0HvUVwmOJ6XOQX5bMkQDRqEDr8uOmU+R3vLE6U4COZHAFiQIF28DG9Nl//Gt/33P/7f2/PfN/r/a7FsCadP9IW2tt1qPNuUePXfz6dHDQjgl7CZI5bscDJ5x93/CRZ97VXZFaD58S8Mt7IkpCbuvZZIbwxeoIByUtgP+fjPmXYNBQ57jdkO3XI7a/lZNOZrQQmRH63HxjPV4CwpPPxl7Nbo+UpAcOy469uDJbNtIWhtoNX7t9ESaYUEWOnwPsBR3xekFI4o37/TxZhbjiM6SBsFm/VGyNpLkeCXi2UUc0WFyc9S8oaqEtFoHzm0ChXMVGfNSxDCA68f4aKiuH5svCFcPvKwkNK/1zd7rOMyFU+H+ymxU9lbaoGtBDbrWzeBweQx2V8HgkNhboe7yefOgi8ZDEkeJu/14Q9XhXhc5D47TIu0iocbh5LIGTNMsTyo2wOR8cH7Zf9k/PwD1ez7FPNhGK4wGs4Ja1veEphzP/OzgkBC4owIwwJ8neuupLzRBHLEGyrYb/f76Fk0EkBFg7DCOsW9FnfaRKOOWibi5SqVOY3Sl4nfXb65+u7nyoCJk44JpGd+Au1k03d++WvN/6jNYgLWDBxdXEr1TRj7y5XqcWp/IGoDiJU1rQXOHEstlimD73cjVim7jDBh6Z8PLGccXp5Q6hO9sqICHRBwXmkE81KHjNyHGH28pDhLH/UPd3OerVW+j8SrLoHInZe9b1DD6cEPNSNff9ErPR5Hhczqy4n+kkl4U3o/80Pt7y0hyNakD5INNT9A1FaQ5XYTZ720uKKvNHlCLVoRYHi9xq6egsES9dSqOfmO4aPxPRPRHAQ==
sidebar_class_name: "post api-method"
info_path: docs/developer-docs/api/reference/authentik
custom_edit_url: null
hide_send_button: true
---

import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Heading from "@theme/Heading";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"policies_password_create"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/policies/password/"}
>
  
</MethodEndpoint>



Password Policy Viewset

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<MimeTabs
  className={"openapi-tabs__mime"}
>
  <TabItem
    label={"application/json"}
    value={"application/json-schema"}
  >
    <details
      style={{}}
      className={"openapi-markdown__details mime"}
      data-collapsed={false}
      open={true}
    >
      <summary
        style={{}}
        className={"openapi-markdown__details-summary-mime"}
      >
        <h3
          className={"openapi-markdown__details-summary-header-body"}
        >
          Body
        </h3><strong
          className={"openapi-schema__required"}
        >
          required
        </strong>
      </summary><div
        style={{"textAlign":"left","marginLeft":"1rem"}}
      >
        
      </div><ul
        style={{"marginLeft":"1rem"}}
      >
        <SchemaItem
          collapsible={false}
          name={"name"}
          required={true}
          schemaName={"string"}
          qualifierMessage={"**Possible values:** `non-empty`"}
          schema={{"type":"string","minLength":1}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"execution_logging"}
          required={false}
          schemaName={"boolean"}
          qualifierMessage={undefined}
          schema={{"type":"boolean","description":"When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"password_field"}
          required={false}
          schemaName={"string"}
          qualifierMessage={"**Possible values:** `non-empty`"}
          schema={{"type":"string","minLength":1,"description":"Field key to check, field keys defined in Prompt stages are available."}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"amount_digits"}
          required={false}
          schemaName={"integer"}
          qualifierMessage={"**Possible values:** `<= 2147483647`"}
          schema={{"type":"integer","maximum":2147483647,"minimum":0}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"amount_uppercase"}
          required={false}
          schemaName={"integer"}
          qualifierMessage={"**Possible values:** `<= 2147483647`"}
          schema={{"type":"integer","maximum":2147483647,"minimum":0}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"amount_lowercase"}
          required={false}
          schemaName={"integer"}
          qualifierMessage={"**Possible values:** `<= 2147483647`"}
          schema={{"type":"integer","maximum":2147483647,"minimum":0}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"amount_symbols"}
          required={false}
          schemaName={"integer"}
          qualifierMessage={"**Possible values:** `<= 2147483647`"}
          schema={{"type":"integer","maximum":2147483647,"minimum":0}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"length_min"}
          required={false}
          schemaName={"integer"}
          qualifierMessage={"**Possible values:** `<= 2147483647`"}
          schema={{"type":"integer","maximum":2147483647,"minimum":0}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"symbol_charset"}
          required={false}
          schemaName={"string"}
          qualifierMessage={"**Possible values:** `non-empty`"}
          schema={{"type":"string","minLength":1}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"error_message"}
          required={false}
          schemaName={"string"}
          qualifierMessage={undefined}
          schema={{"type":"string"}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"check_static_rules"}
          required={false}
          schemaName={"boolean"}
          qualifierMessage={undefined}
          schema={{"type":"boolean"}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"check_have_i_been_pwned"}
          required={false}
          schemaName={"boolean"}
          qualifierMessage={undefined}
          schema={{"type":"boolean"}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"check_zxcvbn"}
          required={false}
          schemaName={"boolean"}
          qualifierMessage={undefined}
          schema={{"type":"boolean"}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"hibp_allowed_count"}
          required={false}
          schemaName={"integer"}
          qualifierMessage={"**Possible values:** `<= 2147483647`"}
          schema={{"type":"integer","maximum":2147483647,"minimum":0,"description":"How many times the password hash is allowed to be on haveibeenpwned"}}
        >
          
        </SchemaItem><SchemaItem
          collapsible={false}
          name={"zxcvbn_score_threshold"}
          required={false}
          schemaName={"integer"}
          qualifierMessage={"**Possible values:** `<= 2147483647`"}
          schema={{"type":"integer","maximum":2147483647,"minimum":0,"description":"If the zxcvbn score is equal or less than this value, the policy will fail."}}
        >
          
        </SchemaItem>
      </ul>
    </details>
  </TabItem>
</MimeTabs><div>
  <div>
    <ApiTabs
      label={undefined}
      id={undefined}
    >
      <TabItem
        label={"201"}
        value={"201"}
      >
        <div>
          
          
          
          
          
        </div><div>
          <MimeTabs
            className={"openapi-tabs__mime"}
            schemaType={"response"}
          >
            <TabItem
              label={"application/json"}
              value={"application/json"}
            >
              <SchemaTabs
                className={"openapi-tabs__schema"}
              >
                <TabItem
                  label={"Schema"}
                  value={"Schema"}
                >
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>
                        Schema
                      </strong>
                    </summary><div
                      style={{"textAlign":"left","marginLeft":"1rem"}}
                    >
                      
                    </div><ul
                      style={{"marginLeft":"1rem"}}
                    >
                      <SchemaItem
                        collapsible={false}
                        name={"pk"}
                        required={true}
                        schemaName={"uuid"}
                        qualifierMessage={undefined}
                        schema={{"type":"string","format":"uuid","readOnly":true,"title":"Policy uuid"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"name"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"execution_logging"}
                        required={false}
                        schemaName={"boolean"}
                        qualifierMessage={undefined}
                        schema={{"type":"boolean","description":"When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged."}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"component"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string","description":"Get object component so that we know how to edit the object","readOnly":true}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"verbose_name"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string","description":"Return object's verbose_name","readOnly":true}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"verbose_name_plural"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string","description":"Return object's plural verbose_name","readOnly":true}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"meta_model_name"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string","description":"Return internal model name","readOnly":true}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"bound_to"}
                        required={true}
                        schemaName={"integer"}
                        qualifierMessage={undefined}
                        schema={{"type":"integer","description":"Return objects policy is bound to","readOnly":true}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"password_field"}
                        required={false}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string","description":"Field key to check, field keys defined in Prompt stages are available."}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"amount_digits"}
                        required={false}
                        schemaName={"integer"}
                        qualifierMessage={"**Possible values:** `<= 2147483647`"}
                        schema={{"type":"integer","maximum":2147483647,"minimum":0}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"amount_uppercase"}
                        required={false}
                        schemaName={"integer"}
                        qualifierMessage={"**Possible values:** `<= 2147483647`"}
                        schema={{"type":"integer","maximum":2147483647,"minimum":0}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"amount_lowercase"}
                        required={false}
                        schemaName={"integer"}
                        qualifierMessage={"**Possible values:** `<= 2147483647`"}
                        schema={{"type":"integer","maximum":2147483647,"minimum":0}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"amount_symbols"}
                        required={false}
                        schemaName={"integer"}
                        qualifierMessage={"**Possible values:** `<= 2147483647`"}
                        schema={{"type":"integer","maximum":2147483647,"minimum":0}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"length_min"}
                        required={false}
                        schemaName={"integer"}
                        qualifierMessage={"**Possible values:** `<= 2147483647`"}
                        schema={{"type":"integer","maximum":2147483647,"minimum":0}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"symbol_charset"}
                        required={false}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"error_message"}
                        required={false}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"check_static_rules"}
                        required={false}
                        schemaName={"boolean"}
                        qualifierMessage={undefined}
                        schema={{"type":"boolean"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"check_have_i_been_pwned"}
                        required={false}
                        schemaName={"boolean"}
                        qualifierMessage={undefined}
                        schema={{"type":"boolean"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"check_zxcvbn"}
                        required={false}
                        schemaName={"boolean"}
                        qualifierMessage={undefined}
                        schema={{"type":"boolean"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"hibp_allowed_count"}
                        required={false}
                        schemaName={"integer"}
                        qualifierMessage={"**Possible values:** `<= 2147483647`"}
                        schema={{"type":"integer","maximum":2147483647,"minimum":0,"description":"How many times the password hash is allowed to be on haveibeenpwned"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"zxcvbn_score_threshold"}
                        required={false}
                        schemaName={"integer"}
                        qualifierMessage={"**Possible values:** `<= 2147483647`"}
                        schema={{"type":"integer","maximum":2147483647,"minimum":0,"description":"If the zxcvbn score is equal or less than this value, the policy will fail."}}
                      >
                        
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem><TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={"{\n  \"pk\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n  \"name\": \"string\",\n  \"execution_logging\": true,\n  \"component\": \"string\",\n  \"verbose_name\": \"string\",\n  \"verbose_name_plural\": \"string\",\n  \"meta_model_name\": \"string\",\n  \"bound_to\": 0,\n  \"password_field\": \"string\",\n  \"amount_digits\": 0,\n  \"amount_uppercase\": 0,\n  \"amount_lowercase\": 0,\n  \"amount_symbols\": 0,\n  \"length_min\": 0,\n  \"symbol_charset\": \"string\",\n  \"error_message\": \"string\",\n  \"check_static_rules\": true,\n  \"check_have_i_been_pwned\": true,\n  \"check_zxcvbn\": true,\n  \"hibp_allowed_count\": 0,\n  \"zxcvbn_score_threshold\": 0\n}"}
                    language={"json"}
                  >
                    
                  </ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem><TabItem
        label={"400"}
        value={"400"}
      >
        <div>
          
          
          
          
          
        </div><div>
          <MimeTabs
            className={"openapi-tabs__mime"}
            schemaType={"response"}
          >
            <TabItem
              label={"application/json"}
              value={"application/json"}
            >
              <SchemaTabs
                className={"openapi-tabs__schema"}
              >
                <TabItem
                  label={"Schema"}
                  value={"Schema"}
                >
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>
                        Schema
                      </strong>
                    </summary><div
                      style={{"textAlign":"left","marginLeft":"1rem"}}
                    >
                      
                    </div><ul
                      style={{"marginLeft":"1rem"}}
                    >
                      <SchemaItem
                        collapsible={false}
                        name={"non_field_errors"}
                        required={false}
                        schemaName={"string[]"}
                        qualifierMessage={undefined}
                        schema={{"type":"array","items":{"type":"string"}}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"code"}
                        required={false}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        name={"property name*"}
                        required={false}
                        schemaName={"any"}
                        qualifierMessage={undefined}
                        schema={{"type":"object","description":"Validation Error","properties":{"non_field_errors":{"type":"array","items":{"type":"string"}},"code":{"type":"string"}},"additionalProperties":{},"title":"ValidationError"}}
                        collapsible={false}
                        discriminator={false}
                      >
                        
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem><TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={"{\n  \"non_field_errors\": [\n    \"string\"\n  ],\n  \"code\": \"string\"\n}"}
                    language={"json"}
                  >
                    
                  </ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem><TabItem
        label={"403"}
        value={"403"}
      >
        <div>
          
          
          
          
          
        </div><div>
          <MimeTabs
            className={"openapi-tabs__mime"}
            schemaType={"response"}
          >
            <TabItem
              label={"application/json"}
              value={"application/json"}
            >
              <SchemaTabs
                className={"openapi-tabs__schema"}
              >
                <TabItem
                  label={"Schema"}
                  value={"Schema"}
                >
                  <details
                    style={{}}
                    className={"openapi-markdown__details response"}
                    data-collapsed={false}
                    open={true}
                  >
                    <summary
                      style={{}}
                      className={"openapi-markdown__details-summary-response"}
                    >
                      <strong>
                        Schema
                      </strong>
                    </summary><div
                      style={{"textAlign":"left","marginLeft":"1rem"}}
                    >
                      
                    </div><ul
                      style={{"marginLeft":"1rem"}}
                    >
                      <SchemaItem
                        collapsible={false}
                        name={"detail"}
                        required={true}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem><SchemaItem
                        collapsible={false}
                        name={"code"}
                        required={false}
                        schemaName={"string"}
                        qualifierMessage={undefined}
                        schema={{"type":"string"}}
                      >
                        
                      </SchemaItem>
                    </ul>
                  </details>
                </TabItem><TabItem
                  label={"Example (from schema)"}
                  value={"Example (from schema)"}
                >
                  <ResponseSamples
                    responseExample={"{\n  \"detail\": \"string\",\n  \"code\": \"string\"\n}"}
                    language={"json"}
                  >
                    
                  </ResponseSamples>
                </TabItem>
              </SchemaTabs>
            </TabItem>
          </MimeTabs>
        </div>
      </TabItem>
    </ApiTabs>
  </div>
</div>
      