API Reference¶
Welcome to the Helomatic API documentation. Our REST API provides comprehensive endpoints for authentication, monitoring, AI integration, and data management.
Base URL¶
API Versioning¶
The Helomatic API uses version v1 and is accessed through the base URL. Future versions will be made available with proper migration guides.
- Current Version:
v1.0.0 - API Stability: Production-ready
- Breaking Changes: Will be announced 30 days in advance
Request/Response Format¶
Content Type¶
All API requests must include the Content-Type: application/json header for POST/PUT/PATCH requests.
Response Structure¶
{
"success": true,
"data": { /* response data */ },
"message": "Success message",
"timestamp": "2025-08-22T18:19:49.258Z"
}
Error Response Structure¶
{
"success": false,
"error": "Error message",
"code": "ERROR_CODE",
"details": { /* additional error context */ },
"timestamp": "2025-08-22T18:19:49.258Z"
}
Authentication¶
Helomatic uses JWT (JSON Web Tokens) with refresh token support for secure API access.
Authentication Flow¶
sequenceDiagram
participant Client
participant API
participant Database
Client->>API: POST /api/auth/login
API->>Database: Validate credentials
Database-->>API: User data
API-->>Client: Access + Refresh tokens
Note over Client: Store tokens securely
Client->>API: Authenticated request + JWT
API->>API: Validate JWT
API-->>Client: Protected resource
Note over Client: When access token expires
Client->>API: POST /api/auth/refresh
API-->>Client: New access token Headers¶
Include the following header in authenticated requests:
Rate Limiting¶
The API implements progressive rate limiting based on user tiers:
| Tier | Requests/Hour | Burst Limit | Overage Policy |
|---|---|---|---|
| Free | 100 | 10 | Block after limit |
| Pro | 1,000 | 50 | Throttle + notifications |
| Enterprise | 10,000 | 200 | Custom limits |
Rate Limit Headers¶
X-Ratelimit-Limit: 1000
X-Ratelimit-Remaining: 950
X-Ratelimit-Reset: 1755886860000
X-Ratelimit-Retry-After: 3600
Error Codes¶
| Code | Description | HTTP Status |
|---|---|---|
INVALID_INPUT | Request validation failed | 400 |
UNAUTHORIZED | Authentication required | 401 |
FORBIDDEN | Insufficient permissions | 403 |
NOT_FOUND | Resource not found | 404 |
RATE_LIMIT_EXCEEDED | Too many requests | 429 |
SERVER_ERROR | Internal server error | 500 |
Response Codes¶
Success Codes¶
- 200 OK: Request successful
- 201 Created: Resource created successfully
- 204 No Content: Request successful, no content returned
Error Codes¶
- 400 Bad Request: Invalid request format or parameters
- 401 Unauthorized: Authentication credentials missing or invalid
- 403 Forbidden: Insufficient permissions for the requested resource
- 404 Not Found: Requested resource doesn't exist
- 422 Unprocessable Entity: Request format valid but content invalid
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Unexpected server error
- 503 Service Unavailable: Service temporarily unavailable
API Endpoints Quick Reference¶
System Endpoints¶
GET /health- Health checkGET /status- System statusGET /metrics- Prometheus metrics
Authentication¶
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/refresh- Token refreshPOST /api/auth/logout- User logout
Monitoring¶
GET /api/monitoring/sources- List monitoring sourcesPOST /api/monitoring/sources- Create monitoring sourceGET /api/monitoring/sources/{id}- Get specific sourcePUT /api/monitoring/sources/{id}- Update monitoring sourceDELETE /api/monitoring/sources/{id}- Delete monitoring source
AI Integration¶
POST /api/ai/chat- AI chat completionPOST /api/ai/completion- Text completionGET /api/ai/models- Available AI modelsGET /api/ai/usage- AI usage statistics
Data Management¶
POST /api/data/enrichment- Enrich data with AIGET /api/data/jobs- List data processing jobsGET /api/data/jobs/{id}- Get specific job status
WebSocket Support¶
For real-time features, connect to our WebSocket endpoint:
WebSocket Authentication¶
// Include JWT in connection headers
const ws = new WebSocket('wss://api.helomatic.com/ws', [], {
headers: {
'Authorization': 'Bearer <your_access_token>'
}
});
SDKs and Libraries¶
Official SDKs¶
- JavaScript/TypeScript:
npm install @helomatic/sdk - Python:
pip install helomatic-sdk - Go:
go get github.com/helomatic/sdk-go
Community SDKs¶
- PHP: Available on GitHub
- Ruby: Available as gem
- Java: Maven package available
Testing¶
Sandbox Environment¶
Test your integration using our sandbox:
Postman Collection¶
Import our Postman collection for easy testing.
cURL Examples¶
Basic health check:
Authenticated request:
curl -H "Authorization: Bearer <token>" \
https://helomatic-api-prod.ernijs-ansons.workers.dev/api/monitoring/sources
Continue to Authentication for detailed authentication implementation, or explore specific Endpoints for comprehensive API documentation.