API Documentation
CashKey REST API Reference
Comprehensive RESTful API guide for interacting with the CashKey platform programmatically.
🔑 Authentication
Obtaining API Key
POST /api/v1/auth/login
Content-Type: application/json
{
"telegram_id": "123456789",
"username": "user123"
}
Headers
Authorization: Bearer <your_jwt_token>
Content-Type: application/json
📝 Keys API
Submit Keys
POST /api/v1/keys
{
"title": "AI Trend Analysis",
"content": "2024 AI market trends...",
"category": "market_insights",
"tags": ["AI", "Market", "2024"]
}
Retrieve Keys
GET /api/v1/keys?limit=10&offset=0&category=market_insights
Check Key Status
GET /api/v1/keys/{key_id}/status
👤 User API
Profile Information
GET /api/v1/user/profile
Points History
GET /api/v1/user/points?from=2024-01-01&to=2024-12-31
📊 Analytics API
Dashboard Data
GET /api/v1/analytics/dashboard
Trend Information
GET /api/v1/analytics/trends?period=7d
🔗 Webhooks
Evaluation Complete Notification
{
"event": "evaluation_completed",
"key_id": "uuid",
"score": 145,
"points_earned": 85,
"timestamp": "2024-01-01T00:00:00Z"
}
📋 Response Formats
Success Response
{
"success": true,
"data": { ... },
"message": "Success"
}
Error Response
{
"success": false,
"error": {
"code": "INVALID_KEY",
"message": "Key content is invalid"
}
}
🚦 Rate Limits
Free Tier: 100 requests/hour
Premium: 1,000 requests/hour
Enterprise: 10,000 requests/hour
🔧 SDKs: Python, JavaScript, Go SDKs coming soon
Last updated