Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions api-reference/assistant/create-assistant-topic.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
title: "Create Assistant Topic"
api: "POST https://api.example.com/assistant/topics"
description: "Create a new assistant topic to organize conversations and interactions."
---

## Overview

This endpoint allows you to create a new assistant topic. Topics help organize and categorize assistant conversations, making it easier to manage different discussion threads or subjects.

## Request

<ParamField body="name" type="string" required>
The name of the assistant topic
</ParamField>

<ParamField body="description" type="string">
Optional description for the assistant topic
</ParamField>

<ParamField body="tags" type="array">
Array of tags to categorize the assistant topic
</ParamField>

## Response

<ResponseField name="id" type="string">
Unique identifier for the created assistant topic
</ResponseField>

<ResponseField name="name" type="string">
Name of the assistant topic
</ResponseField>

<ResponseField name="description" type="string">
Description of the assistant topic
</ResponseField>

<ResponseField name="tags" type="array">
Tags associated with the assistant topic
</ResponseField>

<ResponseField name="created_at" type="string">

Check warning on line 43 in api-reference/assistant/create-assistant-topic.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

api-reference/assistant/create-assistant-topic.mdx#L43

Did you really mean 'created_at'?
Timestamp when the assistant topic was created
</ResponseField>

<ResponseField name="updated_at" type="string">

Check warning on line 47 in api-reference/assistant/create-assistant-topic.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

api-reference/assistant/create-assistant-topic.mdx#L47

Did you really mean 'updated_at'?
Timestamp when the assistant topic was last updated
</ResponseField>

## Example

<RequestExample>

```bash cURL
curl -X POST https://api.example.com/assistant/topics \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Support Assistant",
"description": "Assistant topic for handling customer support inquiries",
"tags": ["support", "customer-service"]
}'
```

```javascript JavaScript
const response = await fetch('https://api.example.com/assistant/topics', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Customer Support Assistant',
description: 'Assistant topic for handling customer support inquiries',
tags: ['support', 'customer-service']
})
});

const assistantTopic = await response.json();
```

```python Python
import requests

url = "https://api.example.com/assistant/topics"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"name": "Customer Support Assistant",
"description": "Assistant topic for handling customer support inquiries",
"tags": ["support", "customer-service"]
}

response = requests.post(url, headers=headers, json=data)
assistant_topic = response.json()
```

</RequestExample>

<ResponseExample>

```json Response
{
"id": "topic_12345",
"name": "Customer Support Assistant",
"description": "Assistant topic for handling customer support inquiries",
"tags": ["support", "customer-service"],
"created_at": "2023-11-20T10:30:00Z",
"updated_at": "2023-11-20T10:30:00Z"
}
```

</ResponseExample>
Empty file.
3 changes: 0 additions & 3 deletions api-reference/chat/create-topic.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions api-reference/chat/generate-message.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion api-reference/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Responses include citations so you can point your users to the right places they
</Note>

Now that you have an API key, check out our [example](https://github.com/mintlify/discovery-api-example) for how to use
the API for AI assistant. You can also see a deployed version of this example at [chat.mintlify.com](https://chat.mintlify.com).
the API for AI assistant. You can also see a deployed version of this example at [assistant.mintlify.com](https://assistant.mintlify.com).
13 changes: 6 additions & 7 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@
"group": "MDX",
"icon": "markdown",
"pages": [
"api-playground/mdx/configuration",
"api-playground/mdx/authentication"
"api-playground/mdx/configuration",
"api-playground/mdx/authentication"
]
},
"api-playground/troubleshooting"
]
},
{
{
"group": "Authentication and Personalization",
"pages": [
"settings/authentication-personalization/authentication",
Expand Down Expand Up @@ -158,7 +158,6 @@
"advanced/dashboard/sso",
"advanced/dashboard/permissions",
"advanced/dashboard/roles"

]
}
]
Expand Down Expand Up @@ -217,7 +216,7 @@
{
"group": "Version Control and CI/CD",
"pages": [
"settings/github",
"settings/github",
"settings/gitlab",
"settings/ci",
"settings/preview-deployments"
Expand Down Expand Up @@ -246,8 +245,8 @@
{
"group": "Assistant",
"pages": [
"api-reference/chat/create-topic",
"api-reference/chat/generate-message"
"api-reference/assistant/create-assistant-topic",
"api-reference/assistant/generate-assistant-message"
]
}
]
Expand Down