Skip to main content
POST
Create Topic

Authorizations

Authorization
string
header
required

Headers

TR-Dataset
string<uuid>
required

The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.

Body

application/json

JSON request payload to create chat topic

owner_id
string
required

The owner_id of the topic. This is typically a browser fingerprint or your user's id. It is used to group topics together for a user.

first_user_message
string | null

The first message which will belong to the topic. The topic name is generated based on this message similar to how it works in the OpenAI chat UX if a name is not explicitly provided on the name request body key.

metadata
any | null

Metadata is any metadata you want to associate w/ the event that is created from this request

name
string | null

The name of the topic. If this is not provided, the topic name is generated from the first_user_message.

Response

The JSON response payload containing the created topic

created_at
string<date-time>
required
dataset_id
string<uuid>
required
deleted
boolean
required
id
string<uuid>
required
name
string
required
owner_id
string
required
updated_at
string<date-time>
required