API Reference
All Tarasol APIs follow consistent conventions for authentication, request format, and error handling.
Base URL
All API requests go through the Gateway Service:
https://{gateway-host}/api/{service}/{endpoint}
Authentication
All API requests (except login) require a Bearer token:
Authorization: Bearer <access_token>
Tokens are obtained via the Identity Service login endpoint.
Request Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer JWT access token |
X-Tenant-ID | Yes | Tenant identifier |
Content-Type | Conditional | application/json for request bodies |
Accept-Language | No | Preferred response language |
Error Response Format
All errors follow a consistent format:
{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
HTTP Status Codes
| Code | Meaning | Usage |
|---|---|---|
| 200 | OK | Successful GET/PUT |
| 201 | Created | Successful POST (resource created) |
| 204 | No Content | Successful DELETE |
| 400 | Bad Request | Validation error |
| 401 | Unauthorized | Missing or invalid token |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 409 | Conflict | Duplicate resource |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Server Error | Internal error |
Pagination
List endpoints support pagination:
GET /api/cms/correspondence?page=1&limit=20&sort=createdAt&order=desc
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number |
limit | 20 | Items per page |
sort | createdAt | Sort field |
order | desc | Sort direction (asc/desc) |
Service Endpoints
For detailed endpoint documentation, see individual service pages:
- Gateway Service — API routing
- Identity Service — Authentication
- CMS Service — Content management
- Correspondence Service — Correspondence lifecycle
- Task Service — Task management
- Admin Service — User management
- Notification Service — Notifications
- Media Service — File handling
- Search Service — Full-text search
- BI Service — Reports and analytics
ℹInfo
The full OpenAPI specification with 145+ endpoints is available in the tarasol-v3-docs repository as cms.json.