Read password policies
curl --request GET \
--url https://apiweb.mile.app/api/v3/password-policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/password-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/password-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/password-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/password-policies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/password-policies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/password-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "6710d4f6e4b0a91d2c3f8e55",
"organizationId": "64d99303be0ad015c461c932",
"name": "Strict Office",
"minimumLength": 10,
"complexity": 3,
"expiration": 90,
"expirationNotificationDays": 7,
"minimumDuration": 1,
"accountLockout": 5,
"accountLockoutDuration": 30,
"passwordHistory": 3,
"createdBy": "[email protected]",
"updatedBy": null,
"createdTime": "2026-10-16T03:40:00.000000Z",
"updatedTime": "2026-10-16T03:40:00.000000Z"
},
{
"_id": "64b7a1c2d3e4f5a6b7c8d9e0",
"organizationId": "system",
"name": "Default Accounts",
"minimumLength": 8,
"complexity": 4,
"expiration": -1,
"expirationNotificationDays": 7,
"minimumDuration": -1,
"accountLockout": 5,
"accountLockoutDuration": -1,
"passwordHistory": 3,
"createdBy": null,
"updatedBy": null,
"createdTime": "2026-10-16T03:40:00.000000Z",
"updatedTime": "2026-10-16T03:40:00.000000Z"
}
],
"links": {
"first": "https://apiweb.mile.app/api/v3/password-policies?page=1",
"last": "https://apiweb.mile.app/api/v3/password-policies?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://apiweb.mile.app/api/v3/password-policies",
"per_page": 10,
"to": 2,
"total": 2
},
"status": true
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Password Policy
Read password policies
A password policy sets the password rules for the users of the roles that use it (assign it with passwordPolicyId on a role). Lists your organization’s policies plus the built-in Default Accounts policy (organizationId system), newest first, paged.
Any signed-in user can call it.
GET
/
password-policies
Read password policies
curl --request GET \
--url https://apiweb.mile.app/api/v3/password-policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/password-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/password-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/password-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/password-policies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apiweb.mile.app/api/v3/password-policies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/password-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"_id": "6710d4f6e4b0a91d2c3f8e55",
"organizationId": "64d99303be0ad015c461c932",
"name": "Strict Office",
"minimumLength": 10,
"complexity": 3,
"expiration": 90,
"expirationNotificationDays": 7,
"minimumDuration": 1,
"accountLockout": 5,
"accountLockoutDuration": 30,
"passwordHistory": 3,
"createdBy": "[email protected]",
"updatedBy": null,
"createdTime": "2026-10-16T03:40:00.000000Z",
"updatedTime": "2026-10-16T03:40:00.000000Z"
},
{
"_id": "64b7a1c2d3e4f5a6b7c8d9e0",
"organizationId": "system",
"name": "Default Accounts",
"minimumLength": 8,
"complexity": 4,
"expiration": -1,
"expirationNotificationDays": 7,
"minimumDuration": -1,
"accountLockout": 5,
"accountLockoutDuration": -1,
"passwordHistory": 3,
"createdBy": null,
"updatedBy": null,
"createdTime": "2026-10-16T03:40:00.000000Z",
"updatedTime": "2026-10-16T03:40:00.000000Z"
}
],
"links": {
"first": "https://apiweb.mile.app/api/v3/password-policies?page=1",
"last": "https://apiweb.mile.app/api/v3/password-policies?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://apiweb.mile.app/api/v3/password-policies",
"per_page": 10,
"to": 2,
"total": 2
},
"status": true
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Authorizations
Use a valid Bearer token to authenticate.
Query Parameters
Search by name.
Example: Strict
Rows per page.
Default: 10
The page number of results to retrieve. Example: 2
Sort by created time.
Default: desc
Available options:
asc, desc