📋 Overview
The FlexAI API provides a comprehensive platform for social intelligence, campaign management, and user engagement. Built with modern REST principles, it offers both public and authenticated endpoints for seamless integration.
🔑 Key Features
- Dual Profile System: Supports both users and projects with automatic profile type detection
- Social Intelligence: Advanced analytics for projects including sentiment analysis and influencer tracking
- Campaign Management: Full campaign lifecycle from creation to completion
- Gamification: Comprehensive achievement, badge, and leaderboard systems
- Real-time Data: Fresh Twitter data fetching with intelligent filtering
🔐 Authentication & Access Control
Authentication Methods
- OAuth2 Bearer Tokens:
Authorization: Bearer <token>
- Public Endpoints: No authentication required
- Authenticated Endpoints: User token required
- Admin Endpoints: Admin privileges required for all write operations
Response Format
{
"data": {},
"meta": {
"pagination": {
"limit": 20,
"offset": 0,
"total": 100
}
},
"errors": []
}
🔧 System & Health
| Method |
Endpoint |
Description |
Access |
Parameters |
| GET |
/ |
Returns API metadata, version, and capabilities |
Public |
None |
| GET |
/health |
System health check with performance metrics |
Public |
None |
🔍 Discovery & Search
| Method |
Endpoint |
Description |
Access |
Parameters |
| GET |
/search |
Global search across users, projects, and campaigns |
Public |
q, type, tier, limit, offset |
| GET |
/discover |
Discover trending or recommended users and projects |
Public |
type, tier, limit, offset |
Search Example
GET /search?q=john&type=user&tier=silver
→ Returns matching users with silver tier
👥 Profile Management
| Method |
Endpoint |
Description |
Applicable To |
Access |
| GET |
/{username} |
Profile overview for a user or project |
Users and Projects |
Public |
| GET |
/dashboard |
Authenticated user's dashboard |
Users |
Authenticated |
| GET |
/{username}/analytics |
Detailed analytics for users or projects |
Users and Projects |
Public |
| PUT |
/{username}/type |
Set profile type (influencer, project, venture_capital, standard) |
Users and Projects |
Admin |
| POST |
/{username}/fetch |
Fetch fresh Twitter data (excludes retweets) |
Users |
Admin |
🎯 Yaps & Rewards System
| Method |
Endpoint |
Description |
Access |
| GET |
/yaps |
Authenticated user's yaps balance and history |
Authenticated |
| GET |
/{username}/yaps |
User's yaps balance and history (Users only) |
Public |
| POST |
/{username}/award |
Award yaps or reputation points |
Admin |
🔗 Referral System
| Method |
Endpoint |
Description |
Access |
| GET |
/referral/link |
Get authenticated user's referral link |
Authenticated |
| GET |
/referral/stats |
Get referral statistics and rewards |
Authenticated |
📊 Campaign & Task Management
Campaign Operations
| Method |
Endpoint |
Description |
Access |
Parameters |
| GET |
/campaigns |
List all campaigns |
Public |
status, category, difficulty, featured |
| GET |
/campaigns/{campaignId} |
Campaign details and task list |
Public |
None |
| POST |
/{username}/campaigns |
Create new campaign (Projects only) |
Admin |
Body: Campaign data |
| PUT |
/{username}/campaigns/{campaignId} |
Update campaign (Projects only) |
Admin |
Body: Updated data |
| DELETE |
/{username}/campaigns/{campaignId} |
Delete campaign (Projects only) |
Admin |
None |
Task Operations
| Method |
Endpoint |
Description |
Access |
Parameters |
| GET |
/campaigns/{campaignId}/tasks |
List tasks for a campaign |
Public |
status, priority, limit, offset |
| GET |
/tasks/{taskId} |
Get individual task details |
Public |
include |
| POST |
/tasks/{taskId}/submit |
Submit task completion |
Authenticated |
Body: Submission data |
| GET |
/{username}/tasks |
List user's tasks (Users only) |
Authenticated |
status, limit, offset |
Task Submission Example
POST /tasks/789/submit
{
"submission_data": {
"tweet_url": "https://twitter.com/user/status/123",
"screenshot": "https://example.com/proof.png"
},
"proof": "https://example.com/proof.png",
"notes": "Completed as requested"
}
🏆 Achievement & Badge System
| Method |
Endpoint |
Description |
Access |
Parameters |
| GET |
/achievements |
List all available achievements |
Public |
None |
| GET |
/achievements/{achievementId} |
Achievement details and requirements |
Public |
None |
| GET |
/badges |
List available badges |
Public |
None |
| GET |
/{username}/achievements |
User's earned achievements (Users only) |
Public |
limit, offset |
| GET |
/{username}/achievements/progress |
User's achievement progress (Users only) |
Authenticated |
None |
🏅 Leaderboards & Rankings
| Method |
Endpoint |
Description |
Access |
Parameters |
| GET |
/leaderboards |
List global leaderboards |
Public |
type, period, limit |
| GET |
/{username}/leaderboard |
Project-specific leaderboard (Projects only) |
Public |
type, limit |
Leaderboard Types
• points - Total points earned
• social-score - Social media influence score
• reputation - Community reputation
• campaigns - Campaign participation
• achievements - Total achievements earned
• streaks - Activity streaks
🧠 Social Intelligence (Projects Only)
| Method |
Endpoint |
Description |
Access |
Parameters |
| GET |
/{username}/insights |
Comprehensive social analytics for projects |
Public |
None |
| POST |
/{username}/insights/analyze |
Analyze social content quality |
Admin |
Body: Content data |
🔍 Insights Include
- Trending Analysis: Real-time trend detection and sentiment tracking
- Influencer Mapping: Key influencer identification and engagement metrics
- Sentiment Analysis: Community sentiment and opinion tracking
- Content Quality: AI-powered content analysis and recommendations
🔧 Additional Features
💰 Rewards & Wallet
| Method |
Endpoint |
Description |
Access |
| GET |
/rewards |
List available rewards |
Public |
| POST |
/wallet/connect |
Connect wallet address |
Authenticated |
🔔 Notifications
| Method |
Endpoint |
Description |
Access |
| GET |
/notifications |
List user's notifications |
Authenticated |
| POST |
/notifications/{notificationId}/read |
Mark notification as read |
Authenticated |
⚙️ Background Jobs
| Method |
Endpoint |
Description |
Access |
| POST |
/jobs/data-fetch |
Fetch raw data from social platforms |
Admin |
| POST |
/jobs/data-processing |
Process data and run intelligence analysis |
Admin |
🧠 Social Intelligence (Projects Only)
🔍 Insights Include