Update Prompt
curl --request PUT \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"topicId": 123,
"promptText": "<string>",
"platform": [
"<string>"
],
"cronExpr": "<string>",
"timezone": "<string>",
"active": true,
"location": "<string>"
}
'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
payload = {
"topicId": 123,
"promptText": "<string>",
"platform": ["<string>"],
"cronExpr": "<string>",
"timezone": "<string>",
"active": True,
"location": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
topicId: 123,
promptText: '<string>',
platform: ['<string>'],
cronExpr: '<string>',
timezone: '<string>',
active: true,
location: '<string>'
})
};
fetch('https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'topicId' => 123,
'promptText' => '<string>',
'platform' => [
'<string>'
],
'cronExpr' => '<string>',
'timezone' => '<string>',
'active' => true,
'location' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
payload := strings.NewReader("{\n \"topicId\": 123,\n \"promptText\": \"<string>\",\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"active\": true,\n \"location\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.put("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"topicId\": 123,\n \"promptText\": \"<string>\",\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"active\": true,\n \"location\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"topicId\": 123,\n \"promptText\": \"<string>\",\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"active\": true,\n \"location\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"topicId": 123,
"promptText": "<string>",
"platform": [
"<string>"
],
"cronExpr": "<string>",
"timezone": "<string>",
"active": true,
"location": "<string>",
"nextRun": "<string>",
"lastRun": "<string>"
}Prompts
Update Prompt
Update an existing prompt’s text, schedule, platforms, or location.
PUT
/
ai-analytics-service
/
api
/
public
/
v1
/
prompts
/
{id}
Update Prompt
curl --request PUT \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"topicId": 123,
"promptText": "<string>",
"platform": [
"<string>"
],
"cronExpr": "<string>",
"timezone": "<string>",
"active": true,
"location": "<string>"
}
'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
payload = {
"topicId": 123,
"promptText": "<string>",
"platform": ["<string>"],
"cronExpr": "<string>",
"timezone": "<string>",
"active": True,
"location": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
topicId: 123,
promptText: '<string>',
platform: ['<string>'],
cronExpr: '<string>',
timezone: '<string>',
active: true,
location: '<string>'
})
};
fetch('https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'topicId' => 123,
'promptText' => '<string>',
'platform' => [
'<string>'
],
'cronExpr' => '<string>',
'timezone' => '<string>',
'active' => true,
'location' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
payload := strings.NewReader("{\n \"topicId\": 123,\n \"promptText\": \"<string>\",\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"active\": true,\n \"location\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.put("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"topicId\": 123,\n \"promptText\": \"<string>\",\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"active\": true,\n \"location\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"topicId\": 123,\n \"promptText\": \"<string>\",\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"active\": true,\n \"location\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"topicId": 123,
"promptText": "<string>",
"platform": [
"<string>"
],
"cronExpr": "<string>",
"timezone": "<string>",
"active": true,
"location": "<string>",
"nextRun": "<string>",
"lastRun": "<string>"
}Updates the specified prompt. You can modify the prompt text, target platforms, cron schedule, timezone, active status, or location.
Parameters
number
required
Unique identifier for the prompt to update.
string
required
Bearer token. Format:
Bearer slat_<your-token>.number
required
Topic ID the prompt belongs to.
string
required
The prompt text. Maximum 4000 characters.
string[]
required
AI platforms to query. One or more of:
CHATGPT, PERPLEXITY, GOOGLE_AI_OVERVIEW, GOOGLE_AI_MODE, GEMINI, CLAUDE.string
required
Cron expression for the query schedule.
string
required
Timezone for the cron schedule.
boolean
Whether the prompt is active.
string
ISO 3166-1 alpha-2 country code (e.g.,
US, GB). Maximum 2 characters.Response
Returns200 OK with the updated prompt.
number
required
Prompt ID.
number
required
Topic ID.
string
required
The updated prompt text.
string[]
required
Target AI platforms.
string
required
Cron schedule expression.
string
required
Schedule timezone.
boolean
required
Whether the prompt is active.
string
Country code.
null if not set.string
Next scheduled run time. ISO 8601 format.
string
Last run time. ISO 8601 format.
Example
curl -s -X PUT "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156" \
-H "Authorization: Bearer slat_YOUR_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"topicId": 42,
"promptText": "What are the top project management tools for distributed teams in 2026?",
"platform": ["CHATGPT", "PERPLEXITY", "GEMINI"],
"cronExpr": "0 0 * * *",
"timezone": "UTC",
"active": true,
"location": "US"
}'
import requests
response = requests.put(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156",
headers={
"Authorization": "Bearer slat_YOUR_TOKEN",
"Content-Type": "application/json",
},
json={
"topicId": 42,
"promptText": "What are the top project management tools for distributed teams in 2026?",
"platform": ["CHATGPT", "PERPLEXITY", "GEMINI"],
"cronExpr": "0 0 * * *",
"timezone": "UTC",
"active": True,
"location": "US",
},
)
prompt = response.json()
print(prompt["promptText"])
const response = await fetch(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156",
{
method: "PUT",
headers: {
"Authorization": "Bearer slat_YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
topicId: 42,
promptText: "What are the top project management tools for distributed teams in 2026?",
platform: ["CHATGPT", "PERPLEXITY", "GEMINI"],
cronExpr: "0 0 * * *",
timezone: "UTC",
active: true,
location: "US",
}),
}
);
const prompt = await response.json();
console.log(prompt.promptText);
Response
{
"id": 156,
"topicId": 42,
"promptText": "What are the top project management tools for distributed teams in 2026?",
"platform": ["CHATGPT", "PERPLEXITY", "GEMINI"],
"cronExpr": "0 0 * * *",
"timezone": "UTC",
"active": true,
"location": "US",
"nextRun": "2026-02-12T00:00:00Z",
"lastRun": "2026-02-11T00:00:00Z"
}
Status codes
| Status | Description |
|---|---|
200 | Prompt updated. |
400 | Invalid request. Missing required fields, topic not found, or invalid location code. |
401 | Missing or invalid Bearer token. See Authentication. |
404 | Prompt not found. |
500 | Internal server error. |
What’s next
- Get Prompt — View the current prompt details.
- Delete Prompt — Remove a prompt.
Was this page helpful?