API Overview
This API provides endpoints for managing projects, users, subscriptions, payments, and related resources. All endpoints require authentication unless explicitly specified otherwise.
Authentication
Include your authentication token in the Authorization header:
Authorization: Bearer YOUR_TOKEN
Language Selection
Specify the language for translated messages by sending an Accept-Language header:
Accept-Language: bg
If the header is omitted, English (en) is used.
Common Response Format
All API responses follow this format:
{
"request_id": "uuid",
"method": "HTTP_METHOD",
"path": "/api/path",
"code": 200,
"data": {} // or [] for list responses
}Error Responses
Error responses follow this format:
{
"request_id": "uuid",
"method": "HTTP_METHOD",
"path": "/api/path",
"code": 400,
"error": {
"message": "Error description",
"code": "ERROR_CODE"
}
}Error Codes
| Code | Description |
|---|---|
400 | Bad Request - Invalid input parameters |
401 | Unauthorized - Missing or invalid authentication |
404 | Not Found - Resource doesn't exist |
422 | Validation Error - Invalid data format |
500 | Server Error - Internal server error |
Pagination
List endpoints support pagination using the following query parameters:
| Parameter | Description |
|---|---|
limit | Number of items per page (default varies by endpoint) |
offset | Number of items to skip (default: 0) |
Live Updates (WebSocket)
For real-time updates, connect to the WebSocket endpoint using a Socket.IO client:
- Path:
wss://<api-host>/live-updates/{project_id} - Purpose: Push realtime events such as payment request updates
- Client: Requires Socket.IO client library (available for JavaScript, Python, PHP, etc.)
Health Check
- GET
/ping - No authentication required
- Returns:
{ "ok": true }
Development Notes
- All endpoints are versioned. The version prefix may change in future releases.
- The API supports both gzip and brotli compression for responses.
Last updated: