API Documentation

Build APKs programmatically. Simple REST API.

⚠️ Beta Status: API filhal development mein hai. Rate limits aur endpoints change ho sakte hain. Production use se pehle test karein.

Introduction

APKForge API aap ko programmatically APK build karne deti hai. Base URL:

https://apk-builder-api.buisch2314.workers.dev

Authentication

Filhal API key system beta mein hai. Request bhejte waqt session cookie use hoti hai. API keys coming soon.

# Example: check current user
curl https://apk-builder-api.buisch2314.workers.dev/api/auth/me \
  -H "Cookie: session=YOUR_SESSION"

Endpoints

GET /health
Health check. Authentication nahi chahiye.
curl https://apk-builder-api.buisch2314.workers.dev/health

# Response
{"status":"ok","version":"2.0.0","time":1789815702419}

POST /api/build

Naya APK build queue mein daalta hai. Islamic templates ke liye quota check nahi hota.

curl -X POST https://apk-builder-api.buisch2314.workers.dev/api/build \
  -H "Content-Type: application/json" \
  -H "Cookie: session=YOUR_SESSION" \
  -d '{
    "buildType": "template",
    "templateName": "quran",
    "appName": "My Quran App",
    "packageName": "com.example.quran",
    "version": "1.0.0",
    "splashStyle": "gradient",
    "splashColor": "#059669",
    "splashIcon": "📖",
    "splashDuration": 2000,
    "orientation": "portrait"
  }'

# Response
{
  "ok": true,
  "buildId": "uuid-here",
  "queuePosition": 1,
  "estimatedWait": 90
}

GET /api/build/status

Build ka current status check karta hai.

curl "https://apk-builder-api.buisch2314.workers.dev/api/build/status?buildId=YOUR_BUILD_ID" \
  -H "Cookie: session=YOUR_SESSION"

# Response
{
  "build": {
    "id": "uuid",
    "app_name": "My App",
    "status": "success",
    "apk_url": "https://..."
  },
  "queuePosition": null,
  "githubStatus": {
    "status": "completed",
    "conclusion": "success"
  }
}

Build Status Values

queued     → Queue mein hai
building   → APK build ho rahi hai
success    → APK ready
failed     → Build fail
cancelled  → Cancel kiya gaya

GET /api/builds

User ke saare builds list karta hai.

curl https://apk-builder-api.buisch2314.workers.dev/api/builds \
  -H "Cookie: session=YOUR_SESSION"

Rate Limits

Fair-use rate limiting apply hoti hai:

  • Builds: 10 per minute
  • Status checks: 60 per minute
  • Login attempts: 5 per minute

Rate limit cross karne pe 429 Too Many Requests milega.

Error Responses

// Invalid API key
{"error":"Invalid API key"}

// Quota exceeded (non-Islamic)
{
  "error": "Quota exceeded",
  "upgrade": true,
  "message": "Islamic templates are always free..."
}

// Invalid input
{"error": "Invalid package name (e.g. com.example.app)"}

SDKs

Official SDKs coming soon. Filhal REST API use karein.

Questions? Contact page pe poochein.