Skip to main content
POST
/
ai-analytics-service
/
api
/
public
/
v1
/
topics
Create Topic
curl --request POST \
  --url https://api.slatehq.ai/ai-analytics-service/api/public/v1/topics \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "topicName": "<string>",
  "description": "<string>",
  "brandId": 123
}
'
{
  "id": 123,
  "workspaceId": 123,
  "brandId": 123,
  "topicName": "<string>",
  "description": "<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 topic in your workspace. Topics group related prompts together for organized tracking and analytics.

Parameters

Authorization
string
required
Bearer token. Format: Bearer slat_<your-token>.
topicName
string
required
Name of the topic. Maximum 255 characters.
description
string
Description of the topic. Maximum 1000 characters.
brandId
number
Brand ID to associate with the topic.

Response

Returns 201 Created with the new topic.
id
number
required
Unique identifier for the topic.
workspaceId
number
required
Workspace the topic belongs to.
brandId
number
Associated brand ID. null if not set.
topicName
string
required
Topic name.
description
string
Topic description. null if not set.

Example

curl -s -X POST "https://api.slatehq.ai/ai-analytics-service/api/public/v1/topics" \
  -H "Authorization: Bearer slat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
    "topicName": "Project Management Tools",
    "description": "Track AI mentions of project management software"
  }'

Response

{
  "id": 42,
  "workspaceId": 1,
  "brandId": null,
  "topicName": "Project Management Tools",
  "description": "Track AI mentions of project management software"
}

Status codes

StatusDescription
201Topic created.
400Invalid request. topicName is missing or exceeds 255 characters.
401Missing or invalid Bearer token. See Authentication.
500Internal server error.

What’s next