Update Prompt Schedule
curl --request PATCH \
--url https://api.lightsage.com/v2/prompts/schedule \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"frequencies": [
{
"frequency": "weekly",
"harness": "cursor"
},
{
"answer_engine": "chatgpt",
"frequency": "default"
}
],
"frequency": "daily"
}
'import requests
url = "https://api.lightsage.com/v2/prompts/schedule"
payload = {
"frequencies": [
{
"frequency": "weekly",
"harness": "cursor"
},
{
"answer_engine": "chatgpt",
"frequency": "default"
}
],
"frequency": "daily"
}
headers = {
"X-Lightsage-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Lightsage-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
frequencies: [
{frequency: 'weekly', harness: 'cursor'},
{answer_engine: 'chatgpt', frequency: 'default'}
],
frequency: 'daily'
})
};
fetch('https://api.lightsage.com/v2/prompts/schedule', 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://api.lightsage.com/v2/prompts/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'frequencies' => [
[
'frequency' => 'weekly',
'harness' => 'cursor'
],
[
'answer_engine' => 'chatgpt',
'frequency' => 'default'
]
],
'frequency' => 'daily'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Lightsage-Api-Key: <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 := "https://api.lightsage.com/v2/prompts/schedule"
payload := strings.NewReader("{\n \"frequencies\": [\n {\n \"frequency\": \"weekly\",\n \"harness\": \"cursor\"\n },\n {\n \"answer_engine\": \"chatgpt\",\n \"frequency\": \"default\"\n }\n ],\n \"frequency\": \"daily\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Lightsage-Api-Key", "<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.patch("https://api.lightsage.com/v2/prompts/schedule")
.header("X-Lightsage-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"frequencies\": [\n {\n \"frequency\": \"weekly\",\n \"harness\": \"cursor\"\n },\n {\n \"answer_engine\": \"chatgpt\",\n \"frequency\": \"default\"\n }\n ],\n \"frequency\": \"daily\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/prompts/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"frequencies\": [\n {\n \"frequency\": \"weekly\",\n \"harness\": \"cursor\"\n },\n {\n \"answer_engine\": \"chatgpt\",\n \"frequency\": \"default\"\n }\n ],\n \"frequency\": \"daily\"\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"time": "<string>",
"timezone": "<string>",
"frequency": "daily",
"last_run_at": "<string>",
"next_run_at": "<string>",
"frequencies": [
{
"kind": "answer_engine",
"name": "<string>",
"frequency": "daily",
"overridden": true,
"in_use": true,
"answer_engine": "<string>",
"harness": "<string>",
"models": [
"<string>"
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Prompts
Update Prompt Schedule
Turns scheduled prompt runs on or off, sets the organization’s default frequency, and sets answer engines or coding-agent harnesses differently from it. Only what you send changes. Daily is recommended: running less often leaves less data to analyze and work out how to improve. Choose which engines and agents run each topic’s prompts with PUT /v2/prompts/targets.
PATCH
/
v2
/
prompts
/
schedule
Update Prompt Schedule
curl --request PATCH \
--url https://api.lightsage.com/v2/prompts/schedule \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"frequencies": [
{
"frequency": "weekly",
"harness": "cursor"
},
{
"answer_engine": "chatgpt",
"frequency": "default"
}
],
"frequency": "daily"
}
'import requests
url = "https://api.lightsage.com/v2/prompts/schedule"
payload = {
"frequencies": [
{
"frequency": "weekly",
"harness": "cursor"
},
{
"answer_engine": "chatgpt",
"frequency": "default"
}
],
"frequency": "daily"
}
headers = {
"X-Lightsage-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Lightsage-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
frequencies: [
{frequency: 'weekly', harness: 'cursor'},
{answer_engine: 'chatgpt', frequency: 'default'}
],
frequency: 'daily'
})
};
fetch('https://api.lightsage.com/v2/prompts/schedule', 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://api.lightsage.com/v2/prompts/schedule",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'frequencies' => [
[
'frequency' => 'weekly',
'harness' => 'cursor'
],
[
'answer_engine' => 'chatgpt',
'frequency' => 'default'
]
],
'frequency' => 'daily'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Lightsage-Api-Key: <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 := "https://api.lightsage.com/v2/prompts/schedule"
payload := strings.NewReader("{\n \"frequencies\": [\n {\n \"frequency\": \"weekly\",\n \"harness\": \"cursor\"\n },\n {\n \"answer_engine\": \"chatgpt\",\n \"frequency\": \"default\"\n }\n ],\n \"frequency\": \"daily\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Lightsage-Api-Key", "<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.patch("https://api.lightsage.com/v2/prompts/schedule")
.header("X-Lightsage-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"frequencies\": [\n {\n \"frequency\": \"weekly\",\n \"harness\": \"cursor\"\n },\n {\n \"answer_engine\": \"chatgpt\",\n \"frequency\": \"default\"\n }\n ],\n \"frequency\": \"daily\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/prompts/schedule")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"frequencies\": [\n {\n \"frequency\": \"weekly\",\n \"harness\": \"cursor\"\n },\n {\n \"answer_engine\": \"chatgpt\",\n \"frequency\": \"default\"\n }\n ],\n \"frequency\": \"daily\"\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"time": "<string>",
"timezone": "<string>",
"frequency": "daily",
"last_run_at": "<string>",
"next_run_at": "<string>",
"frequencies": [
{
"kind": "answer_engine",
"name": "<string>",
"frequency": "daily",
"overridden": true,
"in_use": true,
"answer_engine": "<string>",
"harness": "<string>",
"models": [
"<string>"
]
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Response
Successful Response
The organization's default frequency, for every answer engine and harness not set differently. daily is recommended. every_other_day and weekly are not recommended: they leave less data to analyze and work out how to improve.
Available options:
daily, every_other_day, weekly