Skip to main content
POST
/
v1
/
brands
/
{brandId}
/
topics-prompts
/
batch
Batch create topics & prompts
curl --request POST \
  --url https://api.example.com/v1/brands/{brandId}/topics-prompts/batch \
  --header 'Content-Type: application/json' \
  --data '
{
  "topics": [
    {}
  ]
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.get-spotlight.com/llms.txt

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

The recommended way to add prompts. One call can create new topics, add prompts to those new topics, and also add prompts to existing topics — all at once.

Path parameters

brandId
string
required
Brand UUID. Obtain from List brands.

Request body

topics
TopicInput[]
required
Array of topics. Each topic can be new (provide name) or existing (provide id).

Request

curl -s -X POST \
  -H "x-spotlight-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topics": [
      {
        "name": "Pricing",
        "prompts": [
          { "text": "How does the pricing compare to alternatives?", "customerJourney": "consideration" },
          { "text": "Is there a free tier available?" }
        ]
      },
      {
        "id": "existing-topic-uuid",
        "prompts": [
          { "text": "What do customers say about support response times?" }
        ]
      }
    ]
  }' \
  "https://app.get-spotlight.com/api/v1/brands/BRAND_ID/topics-prompts/batch"

Response

{
  "topics": [
    { "id": "new-topic-uuid", "name": "Pricing", "prompts": [] }
  ],
  "remainingSlots": 87,
  "promptLimit": 100,
  "orgWideLimit": 500,
  "orgTotalPrompts": 413
}

Errors

409 — prompt limit exceeded:
{
  "message": "Prompt limit exceeded",
  "code": "prompt_limit_exceeded",
  "remainingSlots": 0,
  "promptLimit": 100,
  "orgWideLimit": 500,
  "orgTotalPrompts": 500
}