Dubsway Chatbot API Documentation

Welcome to the Dubsway Multi-Context AI Chat API. This powerful service supports different chatbot contexts like mental health, stock market, career counseling, and more...
🔐 Step 1: Get Your API Token
1. Register on Dubsway.ai and log in.
2. Go to the DashboardAPI Key section.
3. Copy your API token. Use the Regenerate option if needed.
📡 Step 2: Make a POST Request
Use the following endpoints depending on context:
  • /api/chat/mental-health-bot – Mental Health Chatbot
  • /api/chat/stock-bot – Stock Market Learning Bot
  • /api/chat/career – Career Coaching Assistant (coming soon)
Choose your language:
fetch("https://dubsway.ai/api/chat/stock-bot", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    messages: [
      { role: "user", content: "How do I start investing in the stock market?" }
    ]
  })
})
.then(res => res.json())
.then(data => console.log("Response:", data));
⚙️ Request Body
The request body must be a JSON object:
  • messages – An array of message objects with role and content.
📥 Response Format
The response is a JSON object:
{
  "role": "assistant",
  "content": "To start investing, begin by researching different investment options like mutual funds or index funds..."
}
Need help? Contact us at support@dubsway.ai