📋 API Overview
The BotVila API provides access to RPA tools, learning content, user management, and AI chatbot functionality.
Base URL
https://api.botvila.com
Response Format
All API responses are in JSON format with the following structure:
{
"success": true,
"message": "Operation successful",
"data": { ... }
}
🔐 Authentication
Most endpoints require authentication using JWT tokens.
Getting a Token
POST
/api/auth/login
Using the Token
Include the token in the Authorization header:
Authorization: Bearer <your_jwt_token>
Note: Tokens expire after 24 hours. Use the refresh endpoint to get a new token.
🔗 API Endpoints
Authentication Endpoints
POST
/api/auth/register - Register a new user
POST
/api/auth/login - Login user
GET
/api/auth/profile - Get user profile (Auth required)
PUT
/api/auth/profile - Update user profile (Auth required)
POST
/api/auth/forgot-password - Request password reset
POST
/api/auth/reset-password - Reset password with token
OAuth Endpoints
POST
/api/oauth/callback - OAuth callback handler
GET
/api/oauth/providers - Get available OAuth providers
Content Endpoints
GET
/api/tools - Get RPA tools list
GET
/api/tools/:id - Get specific tool details
GET
/api/courses - Get courses list
GET
/api/courses/:id - Get specific course
GET
/api/blog - Get blog posts
GET
/api/community - Get community posts
AI Chatbot Endpoints
POST
/api/chatbot/chat - Send message to chatbot
GET
/api/chatbot/suggestions - Get chat suggestions
Admin Endpoints
GET
/api/admin/stats - Get dashboard statistics (Admin only)
GET
/api/admin/users - Get users list (Admin only)
GET
/api/admin/error-logs - Get error logs (Admin only)
💡 Usage Examples
User Registration
Request:
POST /api/auth/register
Content-Type: application/json
{
"username": "johndoe",
"email": "john@example.com",
"password": "password123",
"organization": "Acme Corp",
"user_type": "website"
}
Response:
{
"success": true,
"message": "User registered successfully",
"data": {
"user": {
"id": 1,
"username": "johndoe",
"email": "john@example.com",
"user_type": "website"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
Get RPA Tools
Request:
GET /api/tools
Response:
{
"success": true,
"data": [
{
"id": 1,
"name": "UiPath",
"description": "Leading RPA platform",
"category": "RPA Platform",
"difficulty": "intermediate"
}
]
}
❌ Error Handling
API errors are returned with appropriate HTTP status codes and error messages:
Common Error Responses
{
"success": false,
"message": "Error description",
"error": "ERROR_CODE",
"details": { ... }
}
HTTP Status Codes
- 200 - Success
- 201 - Created
- 400 - Bad Request
- 401 - Unauthorized
- 403 - Forbidden
- 404 - Not Found
- 500 - Internal Server Error