Deploy sage (make active)
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=deploy_sage' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data action=deploy_sage \
--data 'nonce=<string>' \
--data sage_id=123 \
--data 'email_from=<string>' \
--data email_from_address=jsmith@example.com \
--data email_reply_to=jsmith@example.com \
--data 'email_header=<string>' \
--data 'email_subject=<string>' \
--data 'email_body=<string>'import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=deploy_sage"
payload = {
"action": "deploy_sage",
"nonce": "<string>",
"sage_id": "123",
"email_from": "<string>",
"email_from_address": "jsmith@example.com",
"email_reply_to": "jsmith@example.com",
"email_header": "<string>",
"email_subject": "<string>",
"email_body": "<string>"
}
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: 'deploy_sage',
nonce: '<string>',
sage_id: '123',
email_from: '<string>',
email_from_address: 'jsmith@example.com',
email_reply_to: 'jsmith@example.com',
email_header: '<string>',
email_subject: '<string>',
email_body: '<string>'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=deploy_sage', 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?nonce=&action=deploy_sage",
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=deploy_sage&nonce=%3Cstring%3E&sage_id=123&email_from=%3Cstring%3E&email_from_address=jsmith%40example.com&email_reply_to=jsmith%40example.com&email_header=%3Cstring%3E&email_subject=%3Cstring%3E&email_body=%3Cstring%3E",
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?nonce=&action=deploy_sage"
payload := strings.NewReader("action=deploy_sage&nonce=%3Cstring%3E&sage_id=123&email_from=%3Cstring%3E&email_from_address=jsmith%40example.com&email_reply_to=jsmith%40example.com&email_header=%3Cstring%3E&email_subject=%3Cstring%3E&email_body=%3Cstring%3E")
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?nonce=&action=deploy_sage")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("action=deploy_sage&nonce=%3Cstring%3E&sage_id=123&email_from=%3Cstring%3E&email_from_address=jsmith%40example.com&email_reply_to=jsmith%40example.com&email_header=%3Cstring%3E&email_subject=%3Cstring%3E&email_body=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=deploy_sage")
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=deploy_sage&nonce=%3Cstring%3E&sage_id=123&email_from=%3Cstring%3E&email_from_address=jsmith%40example.com&email_reply_to=jsmith%40example.com&email_header=%3Cstring%3E&email_subject=%3Cstring%3E&email_body=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "Sage deployed successfully"
}
}Sage – CRUD
Deploy sage (make active)
Final deployment step. Saves email configuration for candidate
invitations and sets the sage status to ss_active.
Requires ss_admin_all or ss_council_sage capability.
Registered as wp_ajax_deploy_sage — login required.
POST
/
wp-admin
/
admin-ajax.php?action=deploy_sage
Deploy sage (make active)
curl --request POST \
--url 'https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=deploy_sage' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data action=deploy_sage \
--data 'nonce=<string>' \
--data sage_id=123 \
--data 'email_from=<string>' \
--data email_from_address=jsmith@example.com \
--data email_reply_to=jsmith@example.com \
--data 'email_header=<string>' \
--data 'email_subject=<string>' \
--data 'email_body=<string>'import requests
url = "https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=deploy_sage"
payload = {
"action": "deploy_sage",
"nonce": "<string>",
"sage_id": "123",
"email_from": "<string>",
"email_from_address": "jsmith@example.com",
"email_reply_to": "jsmith@example.com",
"email_header": "<string>",
"email_subject": "<string>",
"email_body": "<string>"
}
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: 'deploy_sage',
nonce: '<string>',
sage_id: '123',
email_from: '<string>',
email_from_address: 'jsmith@example.com',
email_reply_to: 'jsmith@example.com',
email_header: '<string>',
email_subject: '<string>',
email_body: '<string>'
})
};
fetch('https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=deploy_sage', 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?nonce=&action=deploy_sage",
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=deploy_sage&nonce=%3Cstring%3E&sage_id=123&email_from=%3Cstring%3E&email_from_address=jsmith%40example.com&email_reply_to=jsmith%40example.com&email_header=%3Cstring%3E&email_subject=%3Cstring%3E&email_body=%3Cstring%3E",
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?nonce=&action=deploy_sage"
payload := strings.NewReader("action=deploy_sage&nonce=%3Cstring%3E&sage_id=123&email_from=%3Cstring%3E&email_from_address=jsmith%40example.com&email_reply_to=jsmith%40example.com&email_header=%3Cstring%3E&email_subject=%3Cstring%3E&email_body=%3Cstring%3E")
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?nonce=&action=deploy_sage")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("action=deploy_sage&nonce=%3Cstring%3E&sage_id=123&email_from=%3Cstring%3E&email_from_address=jsmith%40example.com&email_reply_to=jsmith%40example.com&email_header=%3Cstring%3E&email_subject=%3Cstring%3E&email_body=%3Cstring%3E")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/wp-admin/admin-ajax.php?nonce=&action=deploy_sage")
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=deploy_sage&nonce=%3Cstring%3E&sage_id=123&email_from=%3Cstring%3E&email_from_address=jsmith%40example.com&email_reply_to=jsmith%40example.com&email_header=%3Cstring%3E&email_subject=%3Cstring%3E&email_body=%3Cstring%3E"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"message": "Sage deployed successfully"
}
}Authorizations
WordPress AJAX nonce (passed as form field, verified per-action)
Body
application/x-www-form-urlencoded
Allowed value:
"deploy_sage"WP nonce for sagescreen_frontend_nonce
Example:
"abc123def456"
WordPress post ID of the council sage
Example:
1234
"From" name for candidate invitation emails
Example:
"Acme Corp HR"
"From" email address
Example:
"hr@acmecorp.com"
Reply-to email address
Example:
"hr@acmecorp.com"
Email header text
Example:
"SageScreen Assessment"
Email subject line
Example:
"Your SageScreen Assessment Invitation"
HTML email body template
Example:
"<p>Dear {candidate_name},</p><p>You have been invited to complete a screening...</p>"
⌘I