API Documentation

POST /api/message

Отправить сообщение Claude и получить ответ

Body Parameters:

userId string - ID пользователя для отслеживания диалога
message string - Текст сообщения
curl -X POST http://localhost:3000/api/message \
  -H "Content-Type: application/json" \
  -d '{"userId": "123", "message": "Привет!"}'

GET /api/history/:userId

Получить историю диалога пользователя

curl http://localhost:3000/api/history/123

POST /api/reset/:userId

Очистить историю диалога пользователя

curl -X POST http://localhost:3000/api/reset/123

GET /api/knowledge

Получить базу знаний Claude

curl http://localhost:3000/api/knowledge

POST /api/learn

Добавить урок в базу знаний

Body Parameters:

type string - успех/провал/урок
description string - Описание урока
curl -X POST http://localhost:3000/api/learn \
  -H "Content-Type: application/json" \
  -d '{"type": "успех", "description": "Починил баг"}'

GET /health

Проверка состояния сервера

curl http://localhost:3000/health