Bulk Upload Prompts
curl --request POST \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": [
"<string>"
],
"cronExpr": "<string>",
"timezone": "<string>",
"brandId": 123,
"active": true,
"liveRun": true,
"promptColumnIndex": 123,
"topicColumnIndex": 123,
"hasHeader": true,
"location": "<string>"
}
'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload"
payload = {
"platform": ["<string>"],
"cronExpr": "<string>",
"timezone": "<string>",
"brandId": 123,
"active": True,
"liveRun": True,
"promptColumnIndex": 123,
"topicColumnIndex": 123,
"hasHeader": True,
"location": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
platform: ['<string>'],
cronExpr: '<string>',
timezone: '<string>',
brandId: 123,
active: true,
liveRun: true,
promptColumnIndex: 123,
topicColumnIndex: 123,
hasHeader: true,
location: '<string>'
})
};
fetch('https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload', 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/bulk-upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform' => [
'<string>'
],
'cronExpr' => '<string>',
'timezone' => '<string>',
'brandId' => 123,
'active' => true,
'liveRun' => true,
'promptColumnIndex' => 123,
'topicColumnIndex' => 123,
'hasHeader' => 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/bulk-upload"
payload := strings.NewReader("{\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brandId\": 123,\n \"active\": true,\n \"liveRun\": true,\n \"promptColumnIndex\": 123,\n \"topicColumnIndex\": 123,\n \"hasHeader\": true,\n \"location\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brandId\": 123,\n \"active\": true,\n \"liveRun\": true,\n \"promptColumnIndex\": 123,\n \"topicColumnIndex\": 123,\n \"hasHeader\": true,\n \"location\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brandId\": 123,\n \"active\": true,\n \"liveRun\": true,\n \"promptColumnIndex\": 123,\n \"topicColumnIndex\": 123,\n \"hasHeader\": true,\n \"location\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"jobId": 123,
"status": "<string>",
"s3Key": "<string>"
}Prompts
Bulk Upload Prompts
Upload multiple prompts from a CSV file.
POST
/
ai-analytics-service
/
api
/
public
/
v1
/
prompts
/
bulk-upload
Bulk Upload Prompts
curl --request POST \
--url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"platform": [
"<string>"
],
"cronExpr": "<string>",
"timezone": "<string>",
"brandId": 123,
"active": true,
"liveRun": true,
"promptColumnIndex": 123,
"topicColumnIndex": 123,
"hasHeader": true,
"location": "<string>"
}
'import requests
url = "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload"
payload = {
"platform": ["<string>"],
"cronExpr": "<string>",
"timezone": "<string>",
"brandId": 123,
"active": True,
"liveRun": True,
"promptColumnIndex": 123,
"topicColumnIndex": 123,
"hasHeader": True,
"location": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
platform: ['<string>'],
cronExpr: '<string>',
timezone: '<string>',
brandId: 123,
active: true,
liveRun: true,
promptColumnIndex: 123,
topicColumnIndex: 123,
hasHeader: true,
location: '<string>'
})
};
fetch('https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload', 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/bulk-upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'platform' => [
'<string>'
],
'cronExpr' => '<string>',
'timezone' => '<string>',
'brandId' => 123,
'active' => true,
'liveRun' => true,
'promptColumnIndex' => 123,
'topicColumnIndex' => 123,
'hasHeader' => 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/bulk-upload"
payload := strings.NewReader("{\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brandId\": 123,\n \"active\": true,\n \"liveRun\": true,\n \"promptColumnIndex\": 123,\n \"topicColumnIndex\": 123,\n \"hasHeader\": true,\n \"location\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brandId\": 123,\n \"active\": true,\n \"liveRun\": true,\n \"promptColumnIndex\": 123,\n \"topicColumnIndex\": 123,\n \"hasHeader\": true,\n \"location\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"platform\": [\n \"<string>\"\n ],\n \"cronExpr\": \"<string>\",\n \"timezone\": \"<string>\",\n \"brandId\": 123,\n \"active\": true,\n \"liveRun\": true,\n \"promptColumnIndex\": 123,\n \"topicColumnIndex\": 123,\n \"hasHeader\": true,\n \"location\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"jobId": 123,
"status": "<string>",
"s3Key": "<string>"
}Uploads a CSV file containing multiple prompts. Each row creates a prompt and optionally triggers an immediate query run. The upload is processed asynchronously.
This endpoint uses
multipart/form-data instead of JSON.Parameters
string
required
Bearer token. Format:
Bearer slat_<your-token>.file
required
CSV file containing prompts. Each row should include at least a prompt text column and a topic name column.
string[]
required
AI platforms to query for all uploaded prompts. One or more of:
CHATGPT, PERPLEXITY, GOOGLE_AI_OVERVIEW, GOOGLE_AI_MODE, GEMINI, CLAUDE.string
required
Cron expression applied to all uploaded prompts.
string
Timezone for the cron schedule. Default:
UTC.number
Brand ID to assign to all uploaded prompts.
boolean
Whether the uploaded prompts should be active. Default:
true.boolean
Whether to immediately trigger query runs for uploaded prompts. Default:
true.integer
Column index (0-based) for the prompt text in the CSV. Default: auto-detected.
integer
Column index (0-based) for the topic name in the CSV. Default: auto-detected.
boolean
Whether the CSV file has a header row. Default:
true.string
ISO 3166-1 alpha-2 country code applied to all uploaded prompts (e.g.,
US).Response
Returns202 Accepted. The upload job is queued for processing.
number
required
Unique identifier for the upload job.
string
required
Job status.
PENDING for newly created jobs.string
required
Storage key for the uploaded file.
Example
curl -s -X POST "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload" \
-H "Authorization: Bearer slat_YOUR_TOKEN" \
-F "file=@prompts.csv" \
-F "platform=CHATGPT" \
-F "platform=PERPLEXITY" \
-F "cronExpr=0 0 * * *" \
-F "timezone=UTC" \
-F "liveRun=true" \
-F "hasHeader=true"
import requests
with open("prompts.csv", "rb") as f:
response = requests.post(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload",
headers={
"Authorization": "Bearer slat_YOUR_TOKEN",
},
files={"file": ("prompts.csv", f, "text/csv")},
data={
"platform": ["CHATGPT", "PERPLEXITY"],
"cronExpr": "0 0 * * *",
"timezone": "UTC",
"liveRun": "true",
"hasHeader": "true",
},
)
job = response.json()
print(job["jobId"], job["status"])
const formData = new FormData();
formData.append("file", csvFile);
formData.append("platform", "CHATGPT");
formData.append("platform", "PERPLEXITY");
formData.append("cronExpr", "0 0 * * *");
formData.append("timezone", "UTC");
formData.append("liveRun", "true");
formData.append("hasHeader", "true");
const response = await fetch(
"https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts/bulk-upload",
{
method: "POST",
headers: {
"Authorization": "Bearer slat_YOUR_TOKEN",
},
body: formData,
}
);
const job = await response.json();
console.log(job.jobId, job.status);
Response
{
"jobId": 789,
"status": "PENDING",
"s3Key": "bulk-uploads/workspace-1/prompts-2026-02-11.csv"
}
Status codes
| Status | Description |
|---|---|
202 | Upload accepted and queued for processing. |
400 | Invalid request. File is empty, missing required fields, or invalid location code. |
401 | Missing or invalid Bearer token. See Authentication. |
500 | Internal server error. |
What’s next
- List Prompts — View prompts after the upload completes.
- List Query Runs — Check query runs triggered by the upload.
Was this page helpful?