botserver/docs/src/chapter-10-api/README.md

1.5 KiB

Chapter 10: REST API Reference

HTTP API endpoints for integrating with BotServer.

Base URL

http://localhost:8000/api/v1

Authentication

Authorization: Bearer <token>

Core Endpoints

Endpoint Method Description
/chat POST Send message, get response
/sessions GET List active sessions
/sessions/:id GET Get session details
/files POST Upload file
/files/:id GET Download file

Quick Example

curl -X POST http://localhost:8000/api/v1/chat \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello", "session_id": "abc123"}'

Response Format

{
  "success": true,
  "data": { ... },
  "error": null
}

Chapter Contents

See Also