API Reference

The RAG Chatbot Platform REST API.

Overview

Base URL: https://api.yourdomain.com/v1

All endpoints require authentication unless noted otherwise.

Quick Reference

EndpointMethodDescription
/auth/loginPOSTUser login
/auth/registerPOSTUser registration
/projectsGETList projects
/projectsPOSTCreate project
/projects/{id}GETGet project
/sourcesPOSTCreate source
/projects/{id}/chatPOSTSend chat message
/tokens/widgetPOSTGenerate widget token
/healthGETHealth check

Authentication

# User JWT
-H "Authorization: Bearer eyJhbGci..."

# API Key
-H "X-API-Key: chat_xyz..."

# Widget Token
-H "Authorization: Bearer eyJhbGci..."

Rate Limiting

EndpointLimit
General60/min
Chat60/min
Ingestion10/min

Error Responses

{
  "detail": "Error message"
}

Common status codes:

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Rate Limited
500Server Error

Pagination

GET /projects?limit=20&offset=0

Versioning

/v1/projects
/v1/chat