v1

latestOpenAPI 3.1.02026-07-2295105298.6 KB
Basics

Create Topic

Creates a topic on a website. Topics group prompts for aggregate reporting; pass the returned id as prompts[].topic_id when creating prompts. Get-or-create by name: if an active topic with the same name already exists, the existing topic is returned with created: false instead of failing, so retries and re-imports are idempotent.

post/api/v1/topics

Request body

website_idstring uuid required
namestring required

Topic name. Trimmed; blank rejected.

descriptionstring nullable

Optional topic description.

Example request

{
  "name": "Brand awareness"
}

Response

Topic created (or existing topic returned when the name was already taken)

idstring uuid required
namestring required
descriptionstring nullable required
createdboolean required

False when an existing active topic with the same name was returned instead of creating a new one.