Create a new (empty) AI chat topic.
Creates a new, empty topic. Send the first message through `POST /v1/chats/{topic.chatId}/new-message`; the assistant's reply arrives asynchronously as an `aiChatMessageCreate` notification (see the AI overview). The balance check runs when a message is sent, so no credits are charged by this endpoint. The first user/assistant exchange triggers an auto-naming pass; the resulting title arrives via the `aiChatTopicUpdate` notification. Requires access to the scope (`canGetProject` / `canGetWorkspace` on `scopeId`; no check for `social`), an active subscription, the `ai` capability and `aiChatEnabled`.
Creates a new, empty topic. Send the first message through
POST /v1/chats/{topic.chatId}/new-message; the assistant's reply
arrives asynchronously as an aiChatMessageCreate notification (see
the AI overview). The balance check runs when a message is sent, so
no credits are charged by this endpoint.
The first user/assistant exchange triggers an auto-naming pass; the
resulting title arrives via the aiChatTopicUpdate notification.
Requires access to the scope (canGetProject / canGetWorkspace on
scopeId; no check for social), an active subscription, the ai
capability and aiChatEnabled.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/ai/chat/topics" \ -H "Content-Type: application/json" \ -d '{ "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c", "scopeType": "workspace" }'{ "topic": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "chatType": "ai", "scopeType": "workspace", "scopeId": "65fafe40-a220-4dd7-8724-4598b81c0643", "billedResourceType": "workspace", "billedResourceId": "e4cc728d-50b5-41bd-80c9-0479f99d7ce7", "creatorId": "688ebf54-d343-4104-8711-82c2feac534a", "chatId": "f255124e-3419-4f6e-b7ee-17a6577db94d", "title": "string", "titleGenerationFailed": true, "totalMessages": 0, "totalBilledCredits": 0, "lastMessagePreview": "string", "lastMessageAt": "2019-08-24T14:15:22Z", "contextItems": [ { "type": "asset", "id": "string" } ], "archived": true, "status": "active", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}