Skip to main content

Subscription API Reference

Manage your subscription and monitor usage limits using our Subscription API.

Base Endpoint

GET /api/v1/subscription

Authentication

  • Required: Bearer token (JWT or API key)
  • Feature: Available to all subscription plans

Endpoints

Get Current Subscription

GET /api/v1/subscription Get details about your current subscription plan and status.
{
  "success": true,
  "data": {
    "id": "professional_sub_id",
    "userId": "user_id",
    "planId": "professional",
    "plan": {
      "id": "professional",
      "name": "Professional",
      "description": "For content creators",
      "priceMonthly": 29.99,
      "priceYearly": 299.99,
      "maxVideoUploads": 100,
      "maxTiktokProfiles": 5,
      "maxScheduledPosts": 50,
      "hasApiAccess": true,
      "hasAnalytics": true,
      "hasScheduling": true
    },
    "status": "active",
    "billingCycle": "monthly",
    "currentPeriodStart": "2025-10-01T00:00:00Z",
    "currentPeriodEnd": "2025-10-31T23:59:59Z",
    "cancelAtPeriodEnd": false,
    "createdAt": "2025-01-01T00:00:00.000Z",
    "updatedAt": "2025-01-20T10:00:00.000Z"
  }
}
curl -X GET 'https://api.d1g.qzz.io/api/v1/subscription' \
  -H 'Authorization: Bearer YOUR_API_KEY'
import axios from 'axios';

const getCurrentSubscription = async () => {
  try {
    const response = await axios.get(
      'https://api.d1g.qzz.io/api/v1/subscription',
      {
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY'
        }
      }
    );
    console.log('Current subscription:', response.data.data);
  } catch (error) {
    console.error('Failed to get subscription:', error.response?.data || error.message);
  }
};
import requests

def get_current_subscription():
    url = "https://api.d1g.qzz.io/api/v1/subscription"
    headers = {
        "Authorization": "Bearer YOUR_API_KEY"
    }
    
    response = requests.get(url, headers=headers)
    
    if response.status_code == 200:
        print("Current subscription:", response.json()['data'])
    else:
        print("Failed to get subscription:", response.json())

Get Available Plans

GET /api/v1/subscription/plans Get a list of all available subscription plans (public endpoint, no authentication required).
{
  "success": true,
  "data": [
    {
      "id": "free",
      "name": "Free",
      "description": "Perfect for trying out TikFlow",
      "priceMonthly": null,
      "priceYearly": null,
      "maxVideoUploads": 5,
      "maxTiktokProfiles": 1,
      "maxScheduledPosts": 5,
      "hasApiAccess": false,
      "hasAnalytics": false,
      "hasScheduling": false,
      "hasPrioritySupport": false,
      "hasVideoUrlSupport": true,
      "hasPhotoUpload": true,
      "hasWebhooks": false,
      "hasTeamCollaboration": false,
      "isActive": true,
      "displayOrder": 1
    },
    {
      "id": "basic",
      "name": "Basic",
      "description": "Great for individuals",
      "priceMonthly": 9.99,
      "priceYearly": 99.99,
      "maxVideoUploads": 25,
      "maxTiktokProfiles": 2,
      "maxScheduledPosts": 10,
      "hasApiAccess": false,
      "hasAnalytics": true,
      "hasScheduling": true,
      "hasPrioritySupport": false,
      "hasVideoUrlSupport": true,
      "hasPhotoUpload": true,
      "hasWebhooks": false,
      "hasTeamCollaboration": false,
      "isActive": true,
      "displayOrder": 2
    },
    {
      "id": "professional",
      "name": "Professional",
      "description": "For content creators and agencies",
      "priceMonthly": 29.99,
      "priceYearly": 299.99,
      "maxVideoUploads": 100,
      "maxTiktokProfiles": 5,
      "maxScheduledPosts": 50,
      "hasApiAccess": true,
      "hasAnalytics": true,
      "hasScheduling": true,
      "hasPrioritySupport": true,
      "hasVideoUrlSupport": true,
      "hasPhotoUpload": true,
      "hasWebhooks": false,
      "hasTeamCollaboration": false,
      "isActive": true,
      "displayOrder": 3
    }
  ]
}

Get Usage Statistics

GET /api/v1/subscription/usage Get detailed usage statistics for your current subscription.
{
  "success": true,
  "data": {
    "currentPlan": "Professional",
    "planId": "professional",
    "billingCycle": "monthly",
    "status": "active",
    "uploadsUsed": 45,
    "uploadsLimit": 100,
    "uploadsResetAt": "2025-10-31T23:59:59Z",
    "tiktokProfilesUsed": 3,
    "tiktokProfilesLimit": 5,
    "scheduledPostsUsed": 12,
    "scheduledPostsLimit": 50,
    "isAdmin": false,
    "features": {
      "hasApiAccess": true,
      "hasAnalytics": true,
      "hasScheduling": true,
      "hasPrioritySupport": true,
      "hasVideoUrlSupport": true,
      "hasPhotoUpload": true,
      "hasWebhooks": false,
      "hasTeamCollaboration": false
    }
  }
}

Check Usage Limit

POST /api/v1/subscription/check-limit Check if you can perform a specific action based on your current usage.
action
string
required
Action to check: “upload”, “schedule”, “api_request”, etc.
curl -X POST 'https://api.d1g.qzz.io/api/v1/subscription/check-limit' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "action": "upload"
  }'
{
  "success": true,
  "data": {
    "canPerform": true,
    "action": "upload"
  }
}

Usage Limits by Plan

PlanFreeBasicProfessional
Video Uploads/Month525100
TikTok Accounts125
Scheduled Posts51050
API Access
Analytics
Scheduling
Priority Support
Photo Upload
Video URL Support
Usage limits reset monthly on your subscription anniversary date. All limits are strictly enforced.

Common Errors

  • 401 UNAUTHORIZED: Invalid or missing authentication token
  • 403 FORBIDDEN: Action not allowed based on current usage or plan
  • 429 RATE_LIMITED: Exceeded rate limits for subscription endpoints
Best Practice: Check your usage limits before performing bulk operations to avoid hitting limits mid-process.
All usage data is updated in real-time. Upload counts are tracked immediately upon successful upload completion.