Skip to main content
POST
/
ai-analytics-service
/
api
/
public
/
v1
/
prompts
Create Prompt
curl --request POST \
  --url https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "topicId": 123,
  "promptText": "<string>",
  "platform": [
    "<string>"
  ],
  "cronExpr": "<string>",
  "timezone": "<string>",
  "active": true,
  "location": "<string>"
}
'
{
  "id": 123,
  "topicId": 123,
  "promptText": "<string>",
  "platform": [
    "<string>"
  ],
  "cronExpr": "<string>",
  "timezone": "<string>",
  "active": true,
  "location": "<string>",
  "nextRun": "<string>",
  "lastRun": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://slatehq.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new prompt under a specific topic. Optionally triggers an immediate query run across the selected AI platforms.

Parameters

Authorization
string
required
Bearer token. Format: Bearer slat_<your-token>.
run
boolean
Set to true to immediately trigger a live query run after creating the prompt. Default: false.
topicId
number
required
ID of the topic this prompt belongs to. Must reference an existing topic in your workspace.
promptText
string
required
The prompt text to track. Maximum 4000 characters.
platform
string[]
required
AI platforms to query. One or more of: CHATGPT, PERPLEXITY, GOOGLE_AI_OVERVIEW, GOOGLE_AI_MODE, GEMINI, CLAUDE.
cronExpr
string
required
Cron expression defining the query schedule (e.g., 0 0 * * * for daily).
timezone
string
required
Timezone for the cron schedule (e.g., UTC, America/New_York).
active
boolean
Whether the prompt is active. Default: true.
location
string
ISO 3166-1 alpha-2 country code for location-specific results (e.g., US, GB, IN). Maximum 2 characters.

Response

Returns 201 Created with the new prompt.
id
number
required
Unique identifier for the prompt.
topicId
number
required
Topic ID the prompt belongs to.
promptText
string
required
The prompt text.
platform
string[]
required
Target AI platforms.
cronExpr
string
required
Cron schedule expression.
timezone
string
required
Schedule timezone.
active
boolean
required
Whether the prompt is active.
location
string
Country code for location filtering. null if not set.
nextRun
string
Next scheduled run time. ISO 8601 format.
lastRun
string
Last run time. ISO 8601 format. null if the prompt has not run yet.

Example

curl -s -X POST "https://api.slatehq.ai/ai-analytics-service/api/public/v1/prompts" \
  -H "Authorization: Bearer slat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "topicId": 42,
    "promptText": "What is the best project management tool for remote teams?",
    "platform": ["CHATGPT", "PERPLEXITY"],
    "cronExpr": "0 0 * * *",
    "timezone": "UTC",
    "location": "US"
  }'

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": null
}

Status codes

StatusDescription
201Prompt created.
400Invalid request. Missing required fields, topic not found, or invalid location code.
401Missing or invalid Bearer token. See Authentication.
500Internal server error.

What’s next