Skip to content

API Reference

API Reference

This section contains API documentation for all Manacore backend services.

Authentication

All API endpoints (except public ones) require authentication via JWT bearer token:

Terminal window
curl -X GET https://api.manacore.app/v1/users/me \
-H "Authorization: Bearer <your-token>"

Getting a Token

Terminal window
# Login
curl -X POST https://api.manacore.app/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password"}'
# Response
{
"accessToken": "eyJ...",
"refreshToken": "eyJ...",
"expiresIn": 900
}

Base URLs

ServiceDevelopmentProduction
Authhttp://localhost:3001https://auth.manacore.app
Chathttp://localhost:3002https://chat-api.manacore.app
Picturehttp://localhost:3006https://picture-api.manacore.app
Zitarehttp://localhost:3007https://zitare-api.manacore.app

Common Response Format

Success Response

{
"data": { ... },
"meta": {
"total": 100,
"page": 1,
"limit": 20
}
}

Error Response

{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}

HTTP Status Codes

CodeMeaning
200Success
201Created
204No Content
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Conflict
422Unprocessable Entity
429Too Many Requests
500Internal Server Error

Rate Limiting

API endpoints are rate limited:

Endpoint TypeLimit
Auth endpoints10 req/min
Read endpoints100 req/min
Write endpoints30 req/min

Rate limit headers are included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000

Pagination

List endpoints support pagination:

Terminal window
GET /api/v1/items?page=2&limit=20

Response includes pagination metadata:

{
"data": [...],
"meta": {
"total": 150,
"page": 2,
"limit": 20,
"totalPages": 8
}
}

Filtering & Sorting

Terminal window
# Filter by status
GET /api/v1/items?status=active
# Sort by date descending
GET /api/v1/items?sort=-createdAt
# Multiple filters
GET /api/v1/items?status=active&category=tech&sort=-createdAt

Service APIs

Select a service from the sidebar to view its API documentation:

  • Auth API - Authentication and user management
  • Chat API - Conversations and AI completions
  • Picture API - Image generation
  • Zitare API - Quotes and favorites