Request a password reset email
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data action=sagescreen_password_reset \
--data 'reset_nonce=<string>' \
--data 'recaptcha_token=<string>' \
--data reset_email=jsmith@example.comimport requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset"
payload = {
"action": "sagescreen_password_reset",
"reset_nonce": "<string>",
"recaptcha_token": "<string>",
"reset_email": "jsmith@example.com"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
action: 'sagescreen_password_reset',
reset_nonce: '<string>',
recaptcha_token: '<string>',
reset_email: 'jsmith@example.com'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset', 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://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "action=sagescreen_password_reset&reset_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_email=jsmith%40example.com",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset"
payload := strings.NewReader("action=sagescreen_password_reset&reset_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_email=jsmith%40example.com")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("action=sagescreen_password_reset&reset_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_email=jsmith%40example.com")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "action=sagescreen_password_reset&reset_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_email=jsmith%40example.com"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "If an account exists with this email, a password reset link has been sent."
}
}
Auth – AJAX
Request a password reset email
Sends a password-reset email to the given address. For security, always returns a generic success message regardless of whether the email exists.
Social-login users receive a different email explaining they should log in via their social provider instead.
Registered as wp_ajax_nopriv_sagescreen_password_reset — public.
POST
/
wp-admin
/
admin-ajax.php?action=sagescreen_password_reset
Request a password reset email
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data action=sagescreen_password_reset \
--data 'reset_nonce=<string>' \
--data 'recaptcha_token=<string>' \
--data reset_email=jsmith@example.comimport requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset"
payload = {
"action": "sagescreen_password_reset",
"reset_nonce": "<string>",
"recaptcha_token": "<string>",
"reset_email": "jsmith@example.com"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
action: 'sagescreen_password_reset',
reset_nonce: '<string>',
recaptcha_token: '<string>',
reset_email: 'jsmith@example.com'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset', 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://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "action=sagescreen_password_reset&reset_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_email=jsmith%40example.com",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset"
payload := strings.NewReader("action=sagescreen_password_reset&reset_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_email=jsmith%40example.com")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("action=sagescreen_password_reset&reset_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_email=jsmith%40example.com")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?action=sagescreen_password_reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "action=sagescreen_password_reset&reset_nonce=%3Cstring%3E&recaptcha_token=%3Cstring%3E&reset_email=jsmith%40example.com"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "If an account exists with this email, a password reset link has been sent."
}
}
Body
application/x-www-form-urlencoded
⌘I