curl --request PUT \
--url https://apiweb.mile.app/api/v3/password-policy/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Strict Office",
"minimumLength": 10,
"complexity": 3,
"expiration": 90,
"expirationNotificationDays": 7,
"minimumDuration": 1,
"accountLockout": 5,
"accountLockoutDuration": 30,
"passwordHistory": 3
}
'import requests
url = "https://apiweb.mile.app/api/v3/password-policy/{id}"
payload = {
"name": "Strict Office",
"minimumLength": 10,
"complexity": 3,
"expiration": 90,
"expirationNotificationDays": 7,
"minimumDuration": 1,
"accountLockout": 5,
"accountLockoutDuration": 30,
"passwordHistory": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Strict Office',
minimumLength: 10,
complexity: 3,
expiration: 90,
expirationNotificationDays: 7,
minimumDuration: 1,
accountLockout: 5,
accountLockoutDuration: 30,
passwordHistory: 3
})
};
fetch('https://apiweb.mile.app/api/v3/password-policy/{id}', 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-policy/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Strict Office',
'minimumLength' => 10,
'complexity' => 3,
'expiration' => 90,
'expirationNotificationDays' => 7,
'minimumDuration' => 1,
'accountLockout' => 5,
'accountLockoutDuration' => 30,
'passwordHistory' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/password-policy/{id}"
payload := strings.NewReader("{\n \"name\": \"Strict Office\",\n \"minimumLength\": 10,\n \"complexity\": 3,\n \"expiration\": 90,\n \"expirationNotificationDays\": 7,\n \"minimumDuration\": 1,\n \"accountLockout\": 5,\n \"accountLockoutDuration\": 30,\n \"passwordHistory\": 3\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apiweb.mile.app/api/v3/password-policy/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Strict Office\",\n \"minimumLength\": 10,\n \"complexity\": 3,\n \"expiration\": 90,\n \"expirationNotificationDays\": 7,\n \"minimumDuration\": 1,\n \"accountLockout\": 5,\n \"accountLockoutDuration\": 30,\n \"passwordHistory\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/password-policy/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Strict Office\",\n \"minimumLength\": 10,\n \"complexity\": 3,\n \"expiration\": 90,\n \"expirationNotificationDays\": 7,\n \"minimumDuration\": 1,\n \"accountLockout\": 5,\n \"accountLockoutDuration\": 30,\n \"passwordHistory\": 3\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "6710d4f6e4b0a91d2c3f8e55",
"organizationId": "64d99303be0ad015c461c932",
"name": "Strict Office",
"minimumLength": 12,
"complexity": 3,
"expiration": 90,
"expirationNotificationDays": 7,
"minimumDuration": 1,
"accountLockout": 5,
"accountLockoutDuration": 30,
"passwordHistory": 3,
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdTime": "2026-10-16T03:40:00.000000Z",
"updatedTime": "2026-10-16T03:40:00.000000Z"
},
"status": true,
"message": "Data has been updated successfully."
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Update password policy
Replaces all settings of one of your organization’s password policies (every field is required). The built-in policy cannot be changed. Any signed-in user can call it.
curl --request PUT \
--url https://apiweb.mile.app/api/v3/password-policy/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Strict Office",
"minimumLength": 10,
"complexity": 3,
"expiration": 90,
"expirationNotificationDays": 7,
"minimumDuration": 1,
"accountLockout": 5,
"accountLockoutDuration": 30,
"passwordHistory": 3
}
'import requests
url = "https://apiweb.mile.app/api/v3/password-policy/{id}"
payload = {
"name": "Strict Office",
"minimumLength": 10,
"complexity": 3,
"expiration": 90,
"expirationNotificationDays": 7,
"minimumDuration": 1,
"accountLockout": 5,
"accountLockoutDuration": 30,
"passwordHistory": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Strict Office',
minimumLength: 10,
complexity: 3,
expiration: 90,
expirationNotificationDays: 7,
minimumDuration: 1,
accountLockout: 5,
accountLockoutDuration: 30,
passwordHistory: 3
})
};
fetch('https://apiweb.mile.app/api/v3/password-policy/{id}', 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-policy/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Strict Office',
'minimumLength' => 10,
'complexity' => 3,
'expiration' => 90,
'expirationNotificationDays' => 7,
'minimumDuration' => 1,
'accountLockout' => 5,
'accountLockoutDuration' => 30,
'passwordHistory' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/password-policy/{id}"
payload := strings.NewReader("{\n \"name\": \"Strict Office\",\n \"minimumLength\": 10,\n \"complexity\": 3,\n \"expiration\": 90,\n \"expirationNotificationDays\": 7,\n \"minimumDuration\": 1,\n \"accountLockout\": 5,\n \"accountLockoutDuration\": 30,\n \"passwordHistory\": 3\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apiweb.mile.app/api/v3/password-policy/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Strict Office\",\n \"minimumLength\": 10,\n \"complexity\": 3,\n \"expiration\": 90,\n \"expirationNotificationDays\": 7,\n \"minimumDuration\": 1,\n \"accountLockout\": 5,\n \"accountLockoutDuration\": 30,\n \"passwordHistory\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/password-policy/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Strict Office\",\n \"minimumLength\": 10,\n \"complexity\": 3,\n \"expiration\": 90,\n \"expirationNotificationDays\": 7,\n \"minimumDuration\": 1,\n \"accountLockout\": 5,\n \"accountLockoutDuration\": 30,\n \"passwordHistory\": 3\n}"
response = http.request(request)
puts response.read_body{
"data": {
"_id": "6710d4f6e4b0a91d2c3f8e55",
"organizationId": "64d99303be0ad015c461c932",
"name": "Strict Office",
"minimumLength": 12,
"complexity": 3,
"expiration": 90,
"expirationNotificationDays": 7,
"minimumDuration": 1,
"accountLockout": 5,
"accountLockoutDuration": 30,
"passwordHistory": 3,
"createdBy": "[email protected]",
"updatedBy": "[email protected]",
"createdTime": "2026-10-16T03:40:00.000000Z",
"updatedTime": "2026-10-16T03:40:00.000000Z"
},
"status": true,
"message": "Data has been updated successfully."
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Password policy ID.
Example: 6710d4f6e4b0a91d2c3f8e55
Body
Policy name.
Example: Strict Office
4 - 30Minimum password length.
Example: 10
x >= 6How many of the four character kinds (uppercase, lowercase, number, symbol) a password must contain.
Example: 3
1 <= x <= 4Days until a password expires. -1 = never. 0 is not allowed.
Example: 90
x >= -1Days before expiry to start warning the user.
Example: 7
x >= 1Days a password must be kept before it can be changed again. -1 = no minimum. 0 is not allowed.
Example: 1
x >= -1Failed sign-in attempts before the account is locked.
Example: 5
x >= 1Minutes the account stays locked. -1 = until an admin unlocks it. 0 is not allowed.
Example: 30
x >= -1How many previous passwords cannot be reused.
Example: 3
x >= 1