Page cover image

Manage User Chats

How to manage conversations with your chatbot

You can manage conversations in Stack AI using two mechanisms:

Chat manager

You manage chats inside the Stack AI website under the URL https://www.stack-ai.com/chatmanager or inside your flow ID:

Chat Manager inside of the Stack AI platform.

User chats API

You can call the Stack AI API to download all user chats from specific flows

import requests

# API endpoint URL
url = f"https://www.stack-inference.com/get_chat_memory_api?flow_id={'FLOW_ID'}&user_id={'USER_ID'}&org={'YOUR_ORGANIZATION'}"

# Request data
headers = {
    "Authorization": "Bearer <PRIVATE_API_KEY>",
}

# Make the API request
response = requests.post(url, headers=headers)

# Check the response
if response.status_code == 200:
    print("API request successful")
else:
    print("API request failed:", response.text)

Last updated