Skip to main content

API Reference Overview

This comprehensive API reference provides detailed documentation for all user-facing endpoints in TikFlow. All endpoints follow RESTful conventions and use JSON for request/response bodies.

Base Configuration

Base URL: https://api.d1g.qzz.io/api/v1
Authentication: Bearer token (JWT for user sessions, API keys for programmatic access)
Content Type: application/json
Rate Limits: Vary by subscription plan and authentication method

Authentication

User Session Authentication (JWT)

For frontend applications and user sessions:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

API Key Authentication

For programmatic access and integrations:
Authorization: Bearer your_api_key_here
Security: Never expose API keys or JWT tokens in client-side code. Use secure server-side implementations for API key authentication.

API Structure

The API is organized into the following resource groups:
  • Upload (/upload) - Video and photo upload operations
  • Schedule (/schedule) - Content scheduling operations
  • Analytics (/analytics) - Performance metrics and insights
  • AI (/ai) - AI-powered features and script generation
  • Subscription (/subscription) - Subscription and usage information
  • TikTok (/tiktok) - TikTok account management

Error Handling

All API responses follow a consistent error format:
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Title is required and must be between 1-150 characters",
    "details": {
      "field": "title",
      "value": "",
      "constraint": "minLength"
    }
  }
}

Common Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid authentication
FORBIDDEN403Insufficient permissions or feature not available
VALIDATION_ERROR400Request validation failed
NOT_FOUND404Resource not found
RATE_LIMITED429Rate limit exceeded
INTERNAL_ERROR500Server error

Rate Limiting

Rate limits are applied based on your subscription plan:
PlanUser SessionAPI Key
Free60/min❌ Not available
Basic100/min❌ Not available
Professional200/min100/min
Rate limit headers are included in all responses:
  • X-RateLimit-Limit: Total requests allowed per minute
  • X-RateLimit-Remaining: Remaining requests this minute
  • X-RateLimit-Reset: Time until reset (Unix timestamp)

API Versioning

The current API version is v1. Breaking changes will result in a new major version (e.g., v2). We maintain backward compatibility within the same major version.

Code Examples

All API endpoints include examples in multiple programming languages:
  • cURL - Command line examples
  • JavaScript - Node.js with Axios
  • Python - Python with Requests
  • PHP - PHP with cURL
All code examples use real parameter names and include proper error handling. Replace placeholder values with your actual data.

Next Steps

Explore the specific API reference sections:
This documentation covers only user-facing endpoints. Internal, admin, and system endpoints are not included as they are not available to end users.