Write focus state
curl --request POST \
--url http://localhost:3000/api/focus \
--header 'Content-Type: application/json' \
--header 'Origin: <api-key>' \
--data '
{
"monitor": false,
"cleanup": false,
"minimal": false,
"accessibility": false,
"childAgeBand": "<string>"
}
'import requests
url = "http://localhost:3000/api/focus"
payload = {
"monitor": False,
"cleanup": False,
"minimal": False,
"accessibility": False,
"childAgeBand": "<string>"
}
headers = {
"Origin": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Origin: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
monitor: false,
cleanup: false,
minimal: false,
accessibility: false,
childAgeBand: '<string>'
})
};
fetch('http://localhost:3000/api/focus', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/focus",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'monitor' => false,
'cleanup' => false,
'minimal' => false,
'accessibility' => false,
'childAgeBand' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Origin: <api-key>"
],
]);
$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 := "http://localhost:3000/api/focus"
payload := strings.NewReader("{\n \"monitor\": false,\n \"cleanup\": false,\n \"minimal\": false,\n \"accessibility\": false,\n \"childAgeBand\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Origin", "<api-key>")
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.post("http://localhost:3000/api/focus")
.header("Origin", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"monitor\": false,\n \"cleanup\": false,\n \"minimal\": false,\n \"accessibility\": false,\n \"childAgeBand\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/focus")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Origin"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"monitor\": false,\n \"cleanup\": false,\n \"minimal\": false,\n \"accessibility\": false,\n \"childAgeBand\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyFocus & flags
Write focus state
POST
/
api
/
focus
Write focus state
curl --request POST \
--url http://localhost:3000/api/focus \
--header 'Content-Type: application/json' \
--header 'Origin: <api-key>' \
--data '
{
"monitor": false,
"cleanup": false,
"minimal": false,
"accessibility": false,
"childAgeBand": "<string>"
}
'import requests
url = "http://localhost:3000/api/focus"
payload = {
"monitor": False,
"cleanup": False,
"minimal": False,
"accessibility": False,
"childAgeBand": "<string>"
}
headers = {
"Origin": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Origin: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
monitor: false,
cleanup: false,
minimal: false,
accessibility: false,
childAgeBand: '<string>'
})
};
fetch('http://localhost:3000/api/focus', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/focus",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'monitor' => false,
'cleanup' => false,
'minimal' => false,
'accessibility' => false,
'childAgeBand' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Origin: <api-key>"
],
]);
$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 := "http://localhost:3000/api/focus"
payload := strings.NewReader("{\n \"monitor\": false,\n \"cleanup\": false,\n \"minimal\": false,\n \"accessibility\": false,\n \"childAgeBand\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Origin", "<api-key>")
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.post("http://localhost:3000/api/focus")
.header("Origin", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"monitor\": false,\n \"cleanup\": false,\n \"minimal\": false,\n \"accessibility\": false,\n \"childAgeBand\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/focus")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Origin"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"monitor\": false,\n \"cleanup\": false,\n \"minimal\": false,\n \"accessibility\": false,\n \"childAgeBand\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Same-origin CSRF check. The Origin header must match the request host;
enforced for every mutating verb (POST, PUT, PATCH, DELETE).
Body
application/json
Audience + goal booleans, flat — the goals are top-level fields, not a
nested object. monitor and cleanup were formerly understand and
declutter; the boot migration re-keys stored rows.
Available options:
self, loved_one, guardian Mutually exclusive with monitor and cleanup.
Modifier — combines with any primary goal.
Inferred from audience + goals when omitted on write, collapsing to
custom where the answer is ambiguous. other_handoff is what
unlocks audit-bundle export.
Available options:
self_monitor, self_cleanup, other_handoff, other_monitor, custom Guardian-only age band. Empty string or null clears it.
Response
200
Updated.