List Prompts
curl --request GET \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts \
--header 'Authorization: <authorization>'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts"
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', 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",
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"
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")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts")
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{
"content": [
{
"prompt": {
"id": 123,
"topicId": 123,
"promptText": "<string>",
"platform": [
"<string>"
],
"cronExpr": "<string>",
"timezone": "<string>",
"active": true,
"location": "<string>",
"nextRun": "<string>",
"lastRun": "<string>"
},
"topicName": "<string>"
}
],
"totalElements": 123,
"totalPages": 123,
"number": 123,
"size": 123
}Prompts
List Prompts
Retrieve a paginated list of prompts in your workspace.
GET
/
ai-analytics-service
/
api
/
public
/
v1
/
prompts
List Prompts
curl --request GET \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts \
--header 'Authorization: <authorization>'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts"
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', 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",
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"
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")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts")
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{
"content": [
{
"prompt": {
"id": 123,
"topicId": 123,
"promptText": "<string>",
"platform": [
"<string>"
],
"cronExpr": "<string>",
"timezone": "<string>",
"active": true,
"location": "<string>",
"nextRun": "<string>",
"lastRun": "<string>"
},
"topicName": "<string>"
}
],
"totalElements": 123,
"totalPages": 123,
"number": 123,
"size": 123
}Returns a paginated list of prompts in the token’s workspace. Use query parameters to filter by topic, platform, location, or search by text.
Parameters
string
required
Bearer token. Format:
Bearer slat_<your-token>.integer
Page number (0-indexed). Default:
0.integer
Number of prompts per page. Default:
10.number
Filter by topic ID.
number
Filter by brand ID.
string
Filter by ISO 3166-1 alpha-2 country code (e.g.,
US, GB).string
Search prompts by text. Case-insensitive partial match.
string[]
Filter by one or more platforms:
CHATGPT, PERPLEXITY, GOOGLE_AI_OVERVIEW, GOOGLE_AI_MODE, GEMINI, CLAUDE.string
Filter by ISO 3166-1 alpha-2 country code (e.g.,
US, GB).Response
Returns200 OK with a paginated list of prompts.
object[]
required
Array of prompt objects with topic info.
Show prompt with topic object
Show prompt with topic object
object
required
The prompt details.
Show prompt object
Show prompt object
number
required
Prompt ID.
number
required
Topic ID.
string
required
The 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. ISO 8601 format.
string
Last run time. ISO 8601 format.
string
required
Name of the associated topic.
integer
required
Total number of prompts matching the filters.
integer
required
Total number of pages.
integer
required
Current page number (0-indexed).
integer
required
Page size.
Example
curl -s "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts?topicId=42&page=0&size=10" \
-H "Authorization: Bearer slat_YOUR_TOKEN"
import requests
response = requests.get(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts",
headers={
"Authorization": "Bearer slat_YOUR_TOKEN",
},
params={
"topicId": 42,
"page": 0,
"size": 10,
},
)
result = response.json()
for item in result["content"]:
print(item["prompt"]["id"], item["prompt"]["promptText"])
const params = new URLSearchParams({
topicId: "42",
page: "0",
size: "10",
});
const response = await fetch(
`https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts?${params}`,
{
headers: {
"Authorization": "Bearer slat_YOUR_TOKEN",
},
}
);
const result = await response.json();
console.log(result.totalElements, "prompts found");
Response
{
"content": [
{
"prompt": {
"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"
},
"topicName": "Project Management Tools"
}
],
"totalElements": 24,
"totalPages": 3,
"number": 0,
"size": 10
}
Results are sorted by
createdAt in descending order (newest first). Page numbering starts at 0.Status codes
| Status | Description |
|---|---|
200 | List returned. |
400 | Invalid location code or query parameter. |
401 | Missing or invalid Bearer token. See Authentication. |
500 | Internal server error. |
What’s next
- Get Prompt — Get details for a specific prompt.
- Create Prompt — Add a new prompt.
Was this page helpful?