Back to Home

API Documentation

Deploy your static sites programmatically with a single ZIP archive upload.

POST /api/deploy

API ini memungkinkan Anda mendeploy situs statis secara instan hanya dengan mengirimkan satu file .zip utuh. Sistem backend akan secara otomatis mengekstrak seluruh file dan subfolder di dalamnya lalu merutekannya langsung ke Vercel CDN.

Parameter API (multipart/form-data)

Field Name Type Description
subdomain String Nama proyek impian Anda. Nantinya situs web akan dapat diakses di URL: <subdomain>.vercel.app. Required
files File (ZIP) Satu buah file arsip berformat .zip yang membungkus seluruh file web Anda (termasuk index.html, folder aset gambar, CSS, JS, dll). Required

Contoh Penggunaan Programmatik

curl -X POST \
  https://deploy.rapxz.org/api/deploy \
  -H 'Content-Type: multipart/form-data' \
  -F 'subdomain=my-new-site' \
  -F 'files=@"/path/to/your/project.zip"'
import requests

url = "https://deploy.rapxz.org/api/deploy"
payload = {'subdomain': (None, 'my-new-site')}
files = [('files', ('project.zip', open('/path/to/project.zip', 'rb'), 'application/zip'))]

response = requests.post(url, data=payload, files=files)

print(response.status_code)
print(response.json())
const fs = require('fs');
const FormData = require('form-data');
const axios = require('axios');

const deploy = async () => {
  const url = 'https://deploy.rapxz.org/api/deploy';
  const form = new FormData();
  form.append('subdomain', 'my-new-site');
  form.append('files', fs.createReadStream('/path/to/project.zip'));

  try {
    const response = await axios.post(url, form, {
      headers: { ...form.getHeaders() }
    });
    console.log('Live URL:', response.data.finalUrl);
  } catch (error) {
    console.error('Error:', error.response?.data);
  }
};

deploy();

Responses

On Success (200 OK)

{
  "message": "Deployment successful!",
  "finalUrl": "my-new-site.vercel.app",
  "projectName": "my-new-site"
}