API Reference Documentation

Welcome to the Influencer Express Backend Developer Reference. Use the endpoints listed below to build client integrations.

Authentication

POST /api/register

Register a new Influencer or Brand account

Creates a brand or influencer profile depending on the type specified.

Request Body (JSON)
{
  "name": "Alex Creator",
  "email": "alex@creator.com",
  "password": "secure_password_123",
  "type": "influencer", // influencer or brand
  "company_name": "My Agency" // Required if type is 'brand'
}
Response (201 Created)
{
  "message": "Registration successful.",
  "user": {
    "id": 2,
    "name": "Alex Creator",
    "email": "alex@creator.com",
    "type": "influencer",
    "is_active": true,
    "created_at": "2026-05-30T12:00:00Z"
  }
}
POST /api/login

User Login Session

Authenticates user and returns Bearer access token.

Request Body (JSON)
{
  "email": "alex@creator.com",
  "password": "secure_password_123"
}
Response (200 OK)
{
  "user": {
    "id": 2,
    "name": "Alex Creator",
    "email": "alex@creator.com",
    "type": "influencer"
  },
  "access_token": "1|abc123xyz...",
  "token_type": "Bearer"
}
GET /api/me

Get active authenticated profile

Auth Required
Request Headers
Authorization: Bearer 1|abc123xyz...
Response (200 OK)
{
  "user": {
    "id": 2,
    "name": "Alex Creator",
    "email": "alex@creator.com",
    "type": "influencer",
    "influencer_profile": {
      "id": 1,
      "bio": "Lifstyle content creator",
      "country": "United States",
      "category": "Lifestyle",
      "active_subscription": null
    }
  }
}

Influencer Profile & Subscriptions

GET /api/influencer/profile

View Influencer Profile

Auth Required Influencer
Parameters
None
Response (200 OK)
{
  "profile": {
    "id": 1,
    "bio": "Lifstyle content creator",
    "budget_range": "$100-$500",
    "gender": "Female",
    "country": "United States",
    "category": "Lifestyle",
    "avatar_url": "https://express.com/avatars/alex.jpg",
    "contact_email": "alex@creator.com",
    "social_accounts": []
  }
}
PUT /api/influencer/profile

Update Profile Details

Auth Required Influencer
Request Body (JSON)
{
  "bio": "Sleek tech and lifestyle content creator",
  "budget_range": "$500-$1000",
  "gender": "Female",
  "country": "Canada",
  "category": "Technology"
}
Response (200 OK)
{
  "message": "Profile updated successfully.",
  "profile": {
    "id": 1,
    "bio": "Sleek tech and lifestyle content creator",
    "budget_range": "$500-$1000",
    "gender": "Female",
    "country": "Canada",
    "category": "Technology"
  }
}
POST /api/influencer/social-accounts

Link/Update Social Account Analytics

Auth Required Influencer
Request Body (JSON)
{
  "social_platform_id": 1, // e.g. Instagram
  "username": "alex_tech",
  "profile_url": "https://instagram.com/alex_tech",
  "followers_count": 45200,
  "engagement_rate": 5.25,
  "average_reach": 25000
}
Response (200 OK)
{
  "message": "Social account connected successfully.",
  "social_account": {
    "id": 1,
    "username": "alex_tech",
    "followers_count": 45200,
    "engagement_rate": 5.25,
    "social_platform": {
      "id": 1,
      "name": "Instagram",
      "slug": "instagram"
    }
  }
}
GET /api/influencer/plans

List Pro Membership Plans

Auth Required Influencer
Parameters
None
Response (200 OK)
{
  "plans": [
    {
      "id": 1,
      "name": "Monthly Pro Membership",
      "slug": "monthly-pro-membership",
      "price": "19.99",
      "billing_period": "monthly"
    }
  ]
}
POST /api/influencer/subscribe

Activate Pro Subscription

Auth Required Influencer
Request Body (JSON)
{
  "subscription_plan_id": 1
}
Response (200 OK)
{
  "message": "Subscribed successfully. Welcome to Pro Membership!",
  "subscription": {
    "id": 1,
    "status": "active",
    "starts_at": "2026-05-30T12:00:00Z",
    "ends_at": "2026-06-30T12:00:00Z",
    "subscription_plan": {
      "id": 1,
      "name": "Monthly Pro Membership",
      "price": "19.99"
    }
  }
}

Brand Features

GET /api/brand/profile

View Brand Profile

Auth Required Brand
Parameters
None
Response (200 OK)
{
  "profile": {
    "id": 1,
    "company_name": "Pixel Agency",
    "industry": "Marketing",
    "website": "https://pixelagency.com",
    "contact_email": "brand@pixel.com",
    "description": "Premium influencer agency"
  }
}
PUT /api/brand/profile

Update Brand Profile

Auth Required Brand
Request Body (JSON)
{
  "company_name": "Pixel Tech Global",
  "industry": "Electronics",
  "website": "https://pixelglobal.com"
}
Response (200 OK)
{
  "message": "Profile updated successfully.",
  "profile": {
    "id": 1,
    "company_name": "Pixel Tech Global",
    "industry": "Electronics",
    "website": "https://pixelglobal.com"
  }
}
GET /api/brand/influencers

Search, Filter & Browse Influencer Profiles

Auth Required Brand
Query Parameters
category=Technology
country=Canada
platform=instagram
min_followers=10000
per_page=15
Response (200 OK)
{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "bio": "Tech reviewer and lifestyles",
      "country": "Canada",
      "category": "Technology",
      "social_accounts": [
        {
          "username": "alex_tech",
          "followers_count": 45200,
          "engagement_rate": "5.25",
          "social_platform": {
            "name": "Instagram",
            "slug": "instagram"
          }
        }
      ]
    }
  ],
  "total": 1
}
GET /api/brand/influencers/{influencer_id}

View Influencer Profile Social Media Analytics

Auth Required Brand

Enables registered brands to view detailed platform analytics and reach breakdown for individual creators.

Parameters
influencer_id=1
Response (200 OK)
{
  "influencer": {
    "id": 1,
    "bio": "Tech reviewer",
    "budget_range": "$500-$1000",
    "country": "Canada",
    "category": "Technology",
    "user": {
      "name": "Alex Creator",
      "email": "alex@creator.com"
    },
    "social_accounts": [
      {
        "id": 1,
        "username": "alex_tech",
        "followers_count": 45200,
        "engagement_rate": "5.25",
        "average_reach": 25000,
        "social_platform": {
          "name": "Instagram",
          "slug": "instagram"
        }
      }
    ]
  }
}

Administration

GET /api/admin/dashboard

Overview Stats Dashboard

Auth Required Admin
Parameters
None
Response (200 OK)
{
  "stats": {
    "total_users": 15,
    "total_influencers": 10,
    "total_brands": 4,
    "active_subscriptions": 6,
    "active_plans": 3,
    "monthly_recurring_revenue": 119.94
  },
  "recent_users": []
}
GET /api/admin/users

List Users & Account Details

Auth Required Admin
Query Parameters
type=influencer // or brand
search=alex
per_page=15
Response (200 OK)
{
  "data": [
    {
      "id": 2,
      "name": "Alex Creator",
      "email": "alex@creator.com",
      "type": "influencer",
      "is_active": true
    }
  ]
}
POST /api/admin/users/{user_id}/toggle

Toggle Account status (Deactivate/Reactivate)

Auth Required Admin
Parameters
user_id=2
Response (200 OK)
{
  "message": "User status updated successfully.",
  "user": {
    "id": 2,
    "is_active": false
  }
}
POST /api/admin/subscription-plans

Create Pro Subscription Plan

Auth Required Admin
Request Body (JSON)
{
  "name": "Elite Creator Plan",
  "slug": "elite-creator-plan",
  "description": "High tier membership support",
  "price": 29.99,
  "billing_period": "monthly",
  "is_active": true
}
Response (201 Created)
{
  "message": "Subscription plan created successfully.",
  "plan": {
    "id": 4,
    "name": "Elite Creator Plan",
    "price": "29.99",
    "billing_period": "monthly"
  }
}