Get Prompt
curl --request GET \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
.header("Authorization", "<authorization>")
.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::Get.new(url)
request["Authorization"] = '<authorization>'
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
Get Prompt
Retrieve the details of a specific prompt.
GET
/
ai-analytics-service
/
api
/
public
/
v1
/
prompts
/
{id}
Get Prompt
curl --request GET \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/{id}")
.header("Authorization", "<authorization>")
.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::Get.new(url)
request["Authorization"] = '<authorization>'
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>"
}Returns the full details of a single prompt.
Parameters
number
required
Unique identifier for the prompt.
string
required
Bearer token. Format:
Bearer slat_<your-token>.Response
Returns200 OK with the prompt details.
number
required
Prompt ID.
number
required
Topic ID the prompt belongs to.
string
required
The 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 "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156" \
-H "Authorization: Bearer slat_YOUR_TOKEN"
import requests
response = requests.get(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156",
headers={
"Authorization": "Bearer slat_YOUR_TOKEN",
},
)
prompt = response.json()
print(prompt["promptText"], prompt["active"])
const response = await fetch(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/156",
{
headers: {
"Authorization": "Bearer slat_YOUR_TOKEN",
},
}
);
const prompt = await response.json();
console.log(prompt.promptText, prompt.active);
Response
{
"id": 156,
"topicId": 42,
"promptText": "What is the best project management tool for remote teams?",
"platform": ["CHATGPT", "PERPLEXITY"],
"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 found. |
400 | The prompt ID is invalid (invalid prompt id). |
401 | Missing or invalid Bearer token. See Authentication. |
403 | A workspaceId query parameter doesn’t match the token’s workspace. |
404 | Prompt not found. The ID does not exist or does not belong to this workspace. |
500 | Internal server error. |
What’s next
- Update Prompt — Modify a prompt’s text, schedule, or platforms.
- Delete Prompt — Remove a prompt.
Was this page helpful?