Ir para o conteúdo

API Reference

Complete API documentation for MundiX services.


Available APIs

Authentication API

JWT-based authentication with refresh tokens.

Endpoints: - POST /auth/register - Register new user - POST /auth/login - Login and get tokens - POST /auth/refresh - Refresh access token - POST /auth/logout - Logout and revoke tokens - GET /auth/me - Get current user info

Features: - ✅ JWT HS256 tokens - ✅ Refresh token rotation - ✅ Rate limiting (Redis) - ✅ Bcrypt password hashing - ✅ Admin user management

Orchestrator API

Task management and agent orchestration (coming soon).


API Standards

All APIs follow these standards:

  • Authentication: Bearer tokens in Authorization header
  • Rate Limiting: HTTP 429 with Retry-After header
  • Error Format: Consistent JSON error responses
  • Versioning: URI versioning (e.g., /v1/...)
  • CORS: Configurable via environment variables

Example Usage

# Register
curl -X POST http://localhost:8001/auth/register \
  -H "Content-Type: application/json" \
  -d '{"username":"user","email":"user@example.com","password":"Pass123!"}'

# Login
curl -X POST http://localhost:8001/auth/login \
  -d "username=user&password=Pass123!"

# Use access token
curl -H "Authorization: Bearer <ACCESS_TOKEN>" \
  http://localhost:8001/auth/me

Last updated: 2026-02-03