curl --request PATCH \
--url https://api.lightsage.com/v2/prompts/{prompt_id} \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"text": "<string>",
"topic_id": "<string>",
"platform_ids": [
"<string>"
],
"is_branded": true,
"run_settings": {}
}
'import requests
url = "https://api.lightsage.com/v2/prompts/{prompt_id}"
payload = {
"text": "<string>",
"topic_id": "<string>",
"platform_ids": ["<string>"],
"is_branded": True,
"run_settings": {}
}
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({
text: '<string>',
topic_id: '<string>',
platform_ids: ['<string>'],
is_branded: true,
run_settings: {}
})
};
fetch('https://api.lightsage.com/v2/prompts/{prompt_id}', 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/{prompt_id}",
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([
'text' => '<string>',
'topic_id' => '<string>',
'platform_ids' => [
'<string>'
],
'is_branded' => true,
'run_settings' => [
]
]),
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/{prompt_id}"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"platform_ids\": [\n \"<string>\"\n ],\n \"is_branded\": true,\n \"run_settings\": {}\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/{prompt_id}")
.header("X-Lightsage-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"platform_ids\": [\n \"<string>\"\n ],\n \"is_branded\": true,\n \"run_settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/prompts/{prompt_id}")
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 \"text\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"platform_ids\": [\n \"<string>\"\n ],\n \"is_branded\": true,\n \"run_settings\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"topic_id": "<string>",
"text": "<string>",
"status": "active",
"is_branded": false,
"language_id": "<string>",
"region_id": "<string>",
"topic": {
"id": "<string>",
"name": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"platforms": [
{
"id": "<string>",
"name": "<string>"
}
],
"tags": [
{
"id": "<string>",
"name": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"created_at": "<string>",
"updated_at": "<string>",
"run_settings": {
"search_grounding": "default",
"web_search_instruction": "omit"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Prompt
Updates a prompt’s text, topic, platforms, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged.
curl --request PATCH \
--url https://api.lightsage.com/v2/prompts/{prompt_id} \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"text": "<string>",
"topic_id": "<string>",
"platform_ids": [
"<string>"
],
"is_branded": true,
"run_settings": {}
}
'import requests
url = "https://api.lightsage.com/v2/prompts/{prompt_id}"
payload = {
"text": "<string>",
"topic_id": "<string>",
"platform_ids": ["<string>"],
"is_branded": True,
"run_settings": {}
}
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({
text: '<string>',
topic_id: '<string>',
platform_ids: ['<string>'],
is_branded: true,
run_settings: {}
})
};
fetch('https://api.lightsage.com/v2/prompts/{prompt_id}', 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/{prompt_id}",
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([
'text' => '<string>',
'topic_id' => '<string>',
'platform_ids' => [
'<string>'
],
'is_branded' => true,
'run_settings' => [
]
]),
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/{prompt_id}"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"platform_ids\": [\n \"<string>\"\n ],\n \"is_branded\": true,\n \"run_settings\": {}\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/{prompt_id}")
.header("X-Lightsage-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"platform_ids\": [\n \"<string>\"\n ],\n \"is_branded\": true,\n \"run_settings\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/prompts/{prompt_id}")
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 \"text\": \"<string>\",\n \"topic_id\": \"<string>\",\n \"platform_ids\": [\n \"<string>\"\n ],\n \"is_branded\": true,\n \"run_settings\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"topic_id": "<string>",
"text": "<string>",
"status": "active",
"is_branded": false,
"language_id": "<string>",
"region_id": "<string>",
"topic": {
"id": "<string>",
"name": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"platforms": [
{
"id": "<string>",
"name": "<string>"
}
],
"tags": [
{
"id": "<string>",
"name": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"created_at": "<string>",
"updated_at": "<string>",
"run_settings": {
"search_grounding": "default",
"web_search_instruction": "omit"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Body
1Prompt topic ID from GET /v2/prompts/topics.
Replacement list of answer-platform IDs.
active, inactive Marks the prompt as branded or unbranded. Omit to keep the current value; changing text does not change it.
Run settings that apply to coding-agent runs of this prompt. Omitted fields keep their current or default values.
Show child attributes
Show child attributes
Response
Successful Response
The prompt lifecycle status. Only active prompts run on schedule.
active, inactive, archived Whether the prompt text names your own brand. Detected when the prompt is created, and can be set explicitly.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Run settings that apply to coding-agent runs of this prompt.
Show child attributes
Show child attributes