Integrate AlphaSave into your applications and workflows. Transform digital footprints programmatically.
https://api.alphasavegroup.comAll API endpoints are prefixed with /api/gateway
Most endpoints require authentication using a Bearer token. Include the token in the Authorization header:
Authorization: Bearer YOUR_ACCESS_TOKENGet your access token by logging in via POST /api/auth/login or using Google SSO.
/api/auth/registerRegister a new user account
{
"email": "user@example.com",
"password": "securepassword",
"access_plan": 1 // Optional: 1=Insight Access, 2=Collaboration & Tools, 3=Platform Partner
}{
"id": "uuid",
"email": "user@example.com",
"partner_roles": ["platform_member"],
"access_plan": 1
}/api/auth/loginAuthenticate with email and password
{
"email": "user@example.com",
"password": "securepassword"
}{
"access_token": "jwt_token",
"refresh_token": "refresh_token",
"token_type": "Bearer",
"expires_in": 3600,
"user": {
"id": "uuid",
"email": "user@example.com",
"partner_roles": ["platform_member"],
"access_plan": 1
}
}/api/auth/googleAuthenticate using Google SSO (validates Google ID token)
{
"id_token": "google_id_token"
}/api/auth/refreshRefresh an access token using a refresh token
{
"token": "refresh_token"
}/api/auth/verifyValidate an access token
/api/user/profileAuth RequiredGet the authenticated user's profile
{
"id": "uuid",
"email": "user@example.com",
"name": "User Name",
"partner_roles": ["platform_member"],
"access_plan": 1,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}/api/user/profileAuth RequiredUpdate the authenticated user's profile
/api/user/{userId}/digital-assetsAuth RequiredGet all digital assets for a user
[
{
"id": "uuid",
"user_id": "uuid",
"asset_type": "website",
"platform_name": "WordPress",
"url": "https://example.com",
"monthly_cost": 50.00,
"monthly_revenue": 200.00,
"is_profitable": true,
"notes": "Main website",
"created_at": "2024-01-01T00:00:00Z"
}
]/api/user/{userId}/digital-assetsAuth RequiredCreate a new digital asset
{
"asset_type": "website",
"platform_name": "WordPress",
"url": "https://example.com",
"monthly_cost": 50.00,
"monthly_revenue": 200.00,
"notes": "Main website"
}{
"id": "uuid",
"user_id": "uuid",
"asset_type": "website",
"platform_name": "WordPress",
"url": "https://example.com",
"monthly_cost": 50.00,
"monthly_revenue": 200.00,
"is_profitable": true,
"notes": "Main website",
"created_at": "2024-01-01T00:00:00Z"
}/api/user/{userId}/problem-reportsAuth RequiredReport a problem with a digital asset
{
"problem_category": "Platform Not Profitable",
"problem_description": "Social media account costs $100/month but generates $0 revenue",
"affected_platforms": ["instagram", "facebook"],
"urgency": "high"
}/api/user/problem-reports/analyticsAuth RequiredGet analytics on reported problems
{
"total_reports": 150,
"problems_by_category": {
"Platform Not Profitable": 45,
"Social Media Not Generating Income": 30
},
"problems_by_urgency": {
"high": 20,
"medium": 50,
"low": 80
}
}/api/admin/feature-flagsAdmin OnlyGet all feature flags
/api/admin/feature-flags/{flagId}Admin OnlyUpdate a feature flag
The API uses standard HTTP status codes. Error responses include a message:
{
"error": "Invalid request parameters"
}{
"error": "Invalid or expired token"
}{
"error": "Insufficient permissions"
}{
"error": "Resource not found"
}{
"error": "Internal server error"
}// Login
const response = await fetch('https://api.alphasavegroup.com/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'user@example.com',
password: 'password'
})
});
const { access_token } = await response.json();
// Get digital assets
const assets = await fetch(
'https://api.alphasavegroup.com/api/user/USER_ID/digital-assets',
{
headers: {
'Authorization': `Bearer ${access_token}`
}
}
);# Login
curl -X POST https://api.alphasavegroup.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"password"}'
# Get digital assets
curl -X GET \
https://api.alphasavegroup.com/api/user/USER_ID/digital-assets \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"API requests are rate-limited to ensure fair usage. Rate limits are enforced per IP address and per user:
Rate limit headers are included in responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset