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 '
{
"brandId": 123,
"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 = {
"brandId": 123,
"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({
brandId: 123,
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([
'brandId' => 123,
'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 \"brandId\": 123,\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 \"brandId\": 123,\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 \"brandId\": 123,\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 '
{
"brandId": 123,
"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 = {
"brandId": 123,
"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({
brandId: 123,
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([
'brandId' => 123,
'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 \"brandId\": 123,\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 \"brandId\": 123,\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 \"brandId\": 123,\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, topic, target platforms, cron schedule, timezone, active status, or location.
This endpoint replaces the prompt’s settings, so send every field you want to keep. If you omit
cronExpr or location, the value is cleared. If you omit timezone, it resets to UTC. If you omit active, it resets to true.
Parameters
number
required
Unique identifier for the prompt to update.
string
required
Bearer token. Format:
Bearer slat_<your-token>.number
required
Brand ID for the prompt.
topicId must belong to this brand.number
required
Topic ID the prompt belongs to. Must be an active topic in your workspace that belongs to
brandId.string
required
The prompt text. Maximum 4000 characters. Another prompt in the workspace can’t have the same text.
string[]
required
AI platforms to query. One or more of:
CHATGPT, PERPLEXITY, GOOGLE_AI_OVERVIEW, GOOGLE_AI_MODE, GEMINI, CLAUDE.string
Cron expression for the query schedule. Omit to remove the schedule.
string
Timezone for the cron schedule. Default:
UTC.boolean
Whether the prompt is active. Default:
true.string
ISO 3166-1 alpha-2 country code (e.g.,
US, GB). Must be exactly two letters. Omit to clear the location.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
Cron schedule expression.
null if the prompt has no schedule.string
required
Schedule timezone.
boolean
required
Whether the prompt is active.
string
Country code.
null if not set.string
Next run time stored on the prompt. ISO 8601 format.
null if not set.string
Last run time stored on the prompt. ISO 8601 format.
null if not set.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 '{
"brandId": 5,
"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={
"brandId": 5,
"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({
brandId: 5,
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. The prompt ID is invalid, a required field (brandId, topicId, promptText, platform) is missing, a platform is unsupported, the location code is invalid, or the body isn’t valid JSON or contains unknown fields. |
401 | Missing or invalid Bearer token. See Authentication. |
403 | A workspaceId in the body or query doesn’t match the token’s workspace. |
404 | Prompt not found, or the topic doesn’t exist, is inactive, or doesn’t belong to brandId (topic not found). |
409 | Another prompt in the workspace already has the same text. The body has code (PROMPT_ALREADY_EXISTS) and message. |
500 | Internal server error. |
What’s next
- Get Prompt — View the current prompt details.
- Delete Prompt — Remove a prompt.
Was this page helpful?