Change password for authenticated user
curl --request POST \
--url https://api.sitespy.app/api/v1/auth/change-password \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"current_password": "<string>",
"new_password": "newSecurePassword123"
}
'import requests
url = "https://api.sitespy.app/api/v1/auth/change-password"
payload = {
"current_password": "<string>",
"new_password": "newSecurePassword123"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({current_password: '<string>', new_password: 'newSecurePassword123'})
};
fetch('https://api.sitespy.app/api/v1/auth/change-password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "Password changed successfully"
}{
"error": "Current password is incorrect"
}{
"error": "API key is required"
}{
"error": "User not found"
}Authentication
Change password for authenticated user
Change the password for the currently authenticated user. Requires the current password for verification.
POST
/
auth
/
change-password
Change password for authenticated user
curl --request POST \
--url https://api.sitespy.app/api/v1/auth/change-password \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"current_password": "<string>",
"new_password": "newSecurePassword123"
}
'import requests
url = "https://api.sitespy.app/api/v1/auth/change-password"
payload = {
"current_password": "<string>",
"new_password": "newSecurePassword123"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({current_password: '<string>', new_password: 'newSecurePassword123'})
};
fetch('https://api.sitespy.app/api/v1/auth/change-password', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "Password changed successfully"
}{
"error": "Current password is incorrect"
}{
"error": "API key is required"
}{
"error": "User not found"
}Authorizations
API key for authentication. You can find your API key in the Site Spy dashboard under Settings → API.
Body
application/json
Response
Password changed successfully
Example:
"Password changed successfully"

