Skip to main content
POST
/
ai-analytics-service
/
api
/
public
/
v1
/
query-runs
Create Query Run
curl --request POST \
  --url https://api.slatehq.ai/ai-analytics-service/api/public/v1/query-runs \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "promptId": 123,
  "topicId": 123,
  "platform": "<string>",
  "brandId": 123
}
'
{
  "id": 123,
  "promptId": 123,
  "topicId": 123,
  "platform": "<string>",
  "status": "<string>",
  "startedAt": "<string>",
  "completedAt": "<string>",
  "errorMessage": "<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 query run. Use this to manually trigger a prompt query outside its scheduled cron cycle.

Parameters

Authorization
string
required
Bearer token. Format: Bearer slat_<your-token>.
promptId
number
required
ID of the prompt to run.
topicId
number
required
Topic ID associated with the prompt.
platform
string
required
AI platform to query. One of: CHATGPT, PERPLEXITY, GOOGLE_AI_OVERVIEW, GOOGLE_AI_MODE, GEMINI, CLAUDE.
brandId
number
Brand ID for the query run.

Response

Returns 200 OK with the created query run.
id
number
required
Unique identifier for the query run.
promptId
number
required
Associated prompt ID.
topicId
number
required
Associated topic ID.
platform
string
required
AI platform used for the query.
status
string
required
Run status. Starts as PENDING.
startedAt
string
required
Timestamp when the run was created. ISO 8601 format.
completedAt
string
Completion timestamp. null while the run is in progress.
errorMessage
string
Error details if the run failed. null on success.

Example

curl -s -X POST "https://api.slatehq.ai/ai-analytics-service/api/public/v1/query-runs" \
  -H "Authorization: Bearer slat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "promptId": 156,
    "topicId": 42,
    "platform": "CHATGPT"
  }'

Response

{
  "id": 2048,
  "promptId": 156,
  "topicId": 42,
  "platform": "CHATGPT",
  "status": "PENDING",
  "startedAt": "2026-02-11T14:30:00Z",
  "completedAt": null,
  "errorMessage": null
}

Status codes

StatusDescription
200Query run created.
400Invalid request. Missing required fields or invalid platform.
401Missing or invalid Bearer token. See Authentication.
500Internal server error.

What’s next