ข้ามไปยังเนื้อหา
White page Kit
ไทย

เอกสาร API

สร้างไซต์ whitepage ติดตามความคืบหน้าและดาวน์โหลดไฟล์จากโค้ดของคุณเอง จากเครื่องมือที่ไม่ต้องเขียนโค้ด หรือโดยการถามผู้ช่วย AI ทุกคำขอเป็น JSON ผ่าน HTTPS

มันทำงานอย่างไร

สามขั้นตอนไม่ว่าคุณจะเชื่อมต่ออย่างไร:

  1. สร้างคีย์ API เข้าสู่ระบบ เปิดคีย์ API ในแดชบอร์ดและสร้างคีย์ คีย์นี้ทำหน้าที่เหมือนรหัสผ่านสำหรับบัญชีของคุณ ดังนั้นจึงควรเก็บเป็นความลับ
  2. ขอไซต์ ส่งชื่อเรื่องและภาษา และหากต้องการ ส่งหัวข้อ กลุ่มเป้าหมาย และคำสำคัญ ราคาการสร้างจะถูกหักจากยอดคงเหลือของคุณ และไซต์จะเริ่มสร้างขึ้น
  3. รวบรวมไซต์ของคุณ โดยปกติจะพร้อมใช้งานภายในไม่กี่นาที ตรวจสอบสถานะ หรือให้เราส่ง URL ของคุณเมื่อเสร็จสิ้น จากนั้นดูตัวอย่าง แก้ไข และดาวน์โหลดไฟล์

เลือกรูปแบบการเชื่อมต่อของคุณ

เครื่องมือแบบไม่ต้องเขียนโค้ด: สิ่งใดก็ได้ที่สามารถส่งคำขอ HTTP (Zapier, Make, n8n, สคริปต์ในสเปรดชีต) สามารถเรียกใช้งานคำขอเดียวกันนี้ได้ POST /sites เริ่มสร้างเว็บไซต์; GET /sites/{uuid} บนตัวจับเวลา หรือ callback_url แจ้งให้คุณทราบเมื่อเสร็จสิ้น ใส่คีย์ API ในส่วนหัว Authorization

คำสำคัญ

ไซต์
เว็บไซต์หนึ่งที่ถูกสร้างขึ้นพร้อมหน้าทั้งหมดของมันจะถูกระบุด้วย uuid
สถานะ
สถานะรอดำเนินการขณะอยู่ระหว่างการสร้าง เสร็จเมื่อพร้อมแล้ว ข้อผิดพลาดหากล้มเหลว เว็บไซต์ที่ล้มเหลวจะได้รับเงินคืนโดยอัตโนมัติ
คีย์ API
สตริงลับที่พิสูจน์ว่าคำขอเป็นของบัญชีของคุณ สร้างและเพิกถอนคีย์ได้ในแดชบอร์ด
ยอดคงเหลือ
เงินที่เติมก่อนในบัญชีของคุณ การสร้างไซต์จะสำรองราคาการสร้างจากยอดนี้
การเรียกกลับ
URL ของคุณที่เราจะเรียกเพียงครั้งเดียวเมื่อไซต์เสร็จสิ้น เพื่อที่คุณจะไม่ต้องคอยตรวจสอบซ้ำ
คีย์ Idempotency
ป้ายที่คุณแนบกับคำขอเพื่อให้การส่งซ้ำสองครั้งไม่สร้างหรือเรียกเก็บเงินสำหรับสองไซต์

ใช้กับผู้ช่วย AI

เชื่อมต่อผู้ช่วย AI และเพียงแค่ถามว่า: "สร้างเว็บไซต์สำหรับคลินิกทันตกรรมของฉันเป็นภาษาตุรกี" ผู้ช่วยจะเรียก API เดียวกันภายใต้บัญชีของคุณ คุณยังคงควบคุมได้: การสร้างไซต์ใช้เงินในบัญชี และผู้ช่วยที่ดีจะถามคุณก่อนดำเนินการ

สิ่งที่คุณสามารถพูดได้

  • ยอดเงินคงเหลือของฉันมีเท่าไร และเว็บไซต์หนึ่งแห่งราคาเท่าไหร่?
  • ชุดออกแบบใดที่เหมาะกับร้านเบเกอรี่?
  • สร้างเว็บไซต์หน้าเดียวสำหรับ Alder House เกสต์เฮาส์ในท่าเรือที่เงียบสงบ เป็นภาษาอังกฤษ
  • เว็บไซต์ของฉันพร้อมแล้วหรือยัง? ส่งลิงก์ตัวอย่างมาให้ฉันดู

เชื่อมต่อผ่าน MCP (Claude, Cursor และอื่น ๆ)

MCP คือมาตรฐานเปิดที่ผู้ช่วยใช้เรียกเครื่องมือภายนอก ชี้ URL ของ MCP ให้กับผู้ช่วยของคุณและให้คีย์ API เป็น token แบบ Bearer

Claude Code

bash

claude mcp add --transport http whitepagekit https://whitepagekit.com/api/v1/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Cursor

~/.cursor/mcp.json

{
  "mcpServers": {
    "whitepagekit": {
      "url": "https://whitepagekit.com/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer ${env:WPK_API_KEY}"
      }
    }
  }
}

Claude Desktop

claude_desktop_config.json

{
  "mcpServers": {
    "whitepagekit": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://whitepagekit.com/api/v1/mcp",
               "--header", "Authorization:${WPK_AUTH}"],
      "env": { "WPK_AUTH": "Bearer YOUR_API_KEY" }
    }
  }
}

Raw JSON-RPC

curl

curl -X POST https://whitepagekit.com/api/v1/mcp \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_account","arguments":{}}}'

Claude Desktop เข้าถึงเซิร์ฟเวอร์ระยะไกลผ่านสะพาน mcp-remote ซึ่งต้องใช้ Node.js.

ChatGPT (custom GPT)

  1. ใน ChatGPT สร้าง GPT เปิด Configure แล้วเลือก Create new action
  2. เลือก Import from URL แล้ววาง https://whitepagekit.com/api/v1/openapi.json?profile=assistant แผนผังที่ตัดออกนี้มีเครื่องมือผู้ช่วยเพียงหกตัวเท่านั้น
  3. ภายใต้ Authentication เลือก API key ตั้ง Auth Type เป็น Bearer แล้ววางคีย์ API ของคุณ
  4. ChatGPT จะขอให้คุณยืนยันคำขอที่มีการเปลี่ยนแปลง เพื่อให้คุณควบคุมสิ่งที่เสี่ยงต่อยอดเงินได้

Schema URL

https://whitepagekit.com/api/v1/openapi.json?profile=assistant

OpenAI API (เครื่องมือ MCP)

Responses API สามารถใช้ URL MCP เป็นเครื่องมือระยะไกล require_approval ช่วยให้มนุษย์อยู่ในวงจร

Python

from openai import OpenAI

client = OpenAI()
response = client.responses.create(
    model="YOUR_MODEL",
    tools=[{
        "type": "mcp",
        "server_label": "whitepagekit",
        "server_url": "https://whitepagekit.com/api/v1/mcp",
        "headers": {"Authorization": "Bearer YOUR_API_KEY"},
        "require_approval": "always",
    }],
    input="What does one site cost, and which design kits suit a bakery?",
)
print(response.output_text)

ลูปเครื่องมือของคุณเอง (เรียกใช้ฟังก์ชัน)

หากคุณดำเนินการลูปโมเดลเอง ให้ดึง schemas เครื่องมือสำเร็จรูปและเรียกใช้แต่ละเครื่องมือบน REST endpoint ที่ตรงกัน รูปแบบ: openai (Responses API), openai-chat, anthropic และ mcp

curl

curl "https://whitepagekit.com/api/v1/ai-tools?format=openai"   # or openai-chat, anthropic, mcp

เครื่องมือทั้งหกตัว

เครื่องมือทั้งหกตัว
เครื่องมือ สิ่งที่มันทำ การเรียก REST ราคา
get_account แสดงยอดคงเหลือของคุณและราคาเว็บไซต์หนึ่งแห่ง GET /me ฟรี
list_languages แสดงรายการภาษาที่เว็บไซต์หนึ่งแห่งสามารถเขียนได้ GET /languages ฟรี
list_themes ค้นหาชุดออกแบบตามหัวข้อหรือสไตล์ GET /themes ฟรี
create_site เริ่มสร้างเว็บไซต์และหักราคาการสร้างจากยอดคงเหลือของคุณ POST /sites ใช้ยอดคงเหลือ
get_site แสดงเว็บไซต์หนึ่งแห่ง: ความคืบหน้า, ลิงก์ตัวอย่าง และลิงก์ดาวน์โหลด GET /sites/{uuid} ฟรี
list_sites แสดงรายการเว็บไซต์ของคุณ เรียงจากล่าสุดไปหาเก่าสุด GET /sites ฟรี

ให้เอกสารเหล่านี้กับ AI ใดก็ได้

หน้านี้ยังมีในรูปแบบ Markdown ธรรมดา เหมาะสำหรับวางในแชทหรือมอบให้ผู้ช่วยเขียนโค้ด:

Markdown

https://whitepagekit.com/api/v1/docs.md

พรอมต์ที่คุณสามารถวางได้

Prompt

You can build websites with the White Page Kit API. Read https://whitepagekit.com/api/v1/docs.md first.
My API key is in the environment variable WPK_API_KEY.
Check my balance and the price, then create a site for my dental clinic in Izmir, in Turkish,
wait until it is ready and send me the preview link.

ความปลอดภัยและค่าใช้จ่าย

  • เฉพาะ create_site เท่านั้นที่ใช้ยอดคงเหลือ เครื่องมืออีกห้าเครื่องมืออ่านข้อมูลเท่านั้น
  • ใช้คีย์แยกต่างหากสำหรับผู้ช่วย กำหนดวันหมดอายุและจำกัดอัตราการใช้งานในแดชบอร์ด และเพิกถอนเมื่อไรก็ได้
  • ผู้ช่วยไม่สามารถลบเว็บไซต์ เปลี่ยนการตั้งค่า หรือจัดการการชำระเงินได้ เส้นทางเหล่านั้นไม่ได้เปิดให้ใช้เป็นเครื่องมือ
  • ตั้งค่า idempotency_key บน create_site เพื่อให้การลองใหม่ไม่ถูกเก็บเงินซ้ำ สร้างล้มเหลวจะได้รับเงินคืน
  • การแก้ไขหน้า รูปภาพอ้างอิง และการดาวน์โหลด ZIP ยังคงอยู่ใน REST API และแดชบอร์ด

เริ่มต้นอย่างรวดเร็ว

สามการเรียกจะพาคุณจากคำสั่งสั้น ๆ ไปยังเว็บไซต์ที่ดาวน์โหลดได้ แทนที่ YOUR_API_KEY ด้วยคีย์จากแดชบอร์ด

1. เริ่มการสร้าง

POST /sites จะตรวจสอบคำสั่งของคุณ สำรองราคาการสร้างจากยอดเงินของคุณ และส่งคืนทันที

curl

curl -X POST https://whitepagekit.com/api/v1/sites \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042-attempt-1" \
  -d '{"title":"Alder House","lang":"en","sector":"guesthouse","keywords":"quiet stay, harbour","structure":"onepage"}'

การตอบกลับคือ 202 Accepted พร้อมกับไซต์ใหม่:

202 Accepted

{
  "success": true,
  "data": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "status": "pending",
    "title": "Alder House",
    "lang": "en",
    "preview_url": null,
    "download_url": null
  }
}

2. ตรวจสอบสถานะ

ตรวจสอบ GET /sites/{uuid} ทุก ๆ 5–20 วินาที จนกว่าสถานะจะเป็น done หรือ error หรือใช้ URL callback แทนการตรวจสอบ

curl

curl https://whitepagekit.com/api/v1/sites/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: YOUR_API_KEY"

3. ดาวน์โหลดไฟล์

ไซต์ที่เสร็จสิ้นจะดาวน์โหลดเป็น ZIP รูปแบบเป็น multi หรือ onepage; แหล่งข้อมูลเป็น inline หรือ external

curl

curl -o site.zip \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://whitepagekit.com/api/v1/sites/550e8400-e29b-41d4-a716-446655440000/download?format=multi&assets=inline"

ขั้นตอนเดียวกันในโค้ด

PHP

<?php
$ch = curl_init('https://whitepagekit.com/api/v1/sites');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('WPK_API_KEY'),
        'Content-Type: application/json',
        'Idempotency-Key: order-1042-attempt-1',
    ],
    CURLOPT_POSTFIELDS => json_encode(['title' => 'Alder House', 'lang' => 'en']),
]);
$site = json_decode(curl_exec($ch), true)['data'];
do {
    sleep(5);
    $ch = curl_init('https://whitepagekit.com/api/v1/sites/' . $site['uuid']);
    curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('WPK_API_KEY')]]);
    $site = json_decode(curl_exec($ch), true)['data'];
} while ($site['status'] === 'pending');

Node.js

const headers = {
  Authorization: `Bearer ${process.env.WPK_API_KEY}`,
  'Content-Type': 'application/json',
  'Idempotency-Key': 'order-1042-attempt-1',
};
let { data: site } = await (await fetch('https://whitepagekit.com/api/v1/sites', {
  method: 'POST', headers,
  body: JSON.stringify({ title: 'Alder House', lang: 'en' }),
})).json();
while (site.status === 'pending') {
  await new Promise((r) => setTimeout(r, 5000));
  ({ data: site } = await (await fetch(`https://whitepagekit.com/api/v1/sites/${site.uuid}`, { headers })).json());
}

Python

import os, time, requests

headers = {"Authorization": f"Bearer {os.environ['WPK_API_KEY']}",
           "Idempotency-Key": "order-1042-attempt-1"}
site = requests.post("https://whitepagekit.com/api/v1/sites", headers=headers,
                     json={"title": "Alder House", "lang": "en"}).json()["data"]
while site["status"] == "pending":
    time.sleep(5)
    site = requests.get(f"https://whitepagekit.com/api/v1/sites/{site['uuid']}", headers=headers).json()["data"]

การยืนยันตัวตน

ส่งคีย์ API กับทุกคำขอยกเว้นเอกสาร OpenAPI เก็บคีย์ไว้บนเซิร์ฟเวอร์ของคุณ อย่าใส่ในโค้ดเบราว์เซอร์หรือ URL

  • เฮดเดอร์: Authorization: Bearer YOUR_API_KEY หรือ X-API-Key: YOUR_API_KEY
  • สร้าง ยกเลิก และจำกัดอัตราคีย์ในแดชบอร์ด คีย์สามารถมีวันหมดอายุและรายการอนุญาต IP
  • คุณจะเห็นเฉพาะไซต์ของคุณเอง เว็บไซต์ที่เป็นเจ้าของโดยบัญชีอื่นจะแสดง 404 not_found
  • เพิ่ม ?lang=xx หรือ Accept-Language เพื่อแปลข้อความแสดงข้อผิดพลาด

ความไม่เปลี่ยนแปลง

ส่ง Idempotency-Key (8–80 ตัวอักษร: ตัวอักษร ตัวเลข _ และ -) บน POST /sites การใช้คีย์เดิมจะส่งคืนไซต์เดิมและไม่คิดค่าบริการสองครั้ง ดังนั้นการลองใหม่หลังหมดเวลาเป็นปลอดภัย ใช้คีย์ใหม่เมื่อจะลองใหม่การสร้างที่ล้มเหลว

เว็บฮุก (คอลแบ็ก)

ส่ง callback_url ไปที่ POST /sites (หรือกำหนดเว็บฮุกของบัญชี) และรับการโพสต์ JSON ครั้งหนึ่งเมื่องานเสร็จสิ้น (site.completed) หรือเกิดข้อผิดพลาด (site.failed)

POST callback_url

{
  "event": "site.completed",
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "status": "done",
  "site_title": "Alder House",
  "lang": "en",
  "domain": null,
  "created_at": "2026-01-15T09:30:00+00:00",
  "preview_url": "https://whitepagekit.com/preview?uuid=550e8400-…"
}

เมื่อบัญชีมีความลับเว็บฮุก ทุกคำขอจะมี X-Webhook-Signature: sha256=<hex> ซึ่งเป็น HMAC-SHA256 ของเนื้อดิบ ตรวจสอบก่อนแยกวิเคราะห์ JSON โดยใช้การเปรียบเทียบแบบเวลาคงที่:

PHP

$raw = file_get_contents('php://input');
$expected = 'sha256=' . hash_hmac('sha256', $raw, $webhookSecret);
if (!hash_equals($expected, $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'] ?? '')) {
    http_response_code(401);
    exit;
}

Node.js

import crypto from 'node:crypto';

const expected = 'sha256=' + crypto
  .createHmac('sha256', webhookSecret).update(rawBody).digest('hex');
const received = req.get('x-webhook-signature') ?? '';
const ok = received.length === expected.length
  && crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected));

แต่ละคอลแบ็กจะพยายามส่งเพียงครั้งเดียวโดยมีเวลาไทม์เอาต์ 10 วินาทีและจะไม่พยายามส่งซ้ำ ถือว่าเป็นการแจ้งเตือนและตรวจสอบกับ GET /sites/{uuid} จัดการการซ้ำซ้อนอย่างไม่ส่งผลกระทบโดยใช้ uuid และเหตุการณ์ เป้าหมายในเครือข่ายส่วนตัวจะถูกปฏิเสธ

ข้อผิดพลาด

ทุกการตอบสนองจะใช้ซองจดหมาย ข้อผิดพลาดมีรหัสคงที่ ข้อความแปลภาษา และ สำหรับข้อผิดพลาดการตรวจสอบ จะมีฟิลด์ที่ล้มเหลว

JSON

{
  "success": false,
  "error": {
    "code": "validation_error",
    "message": "...",
    "details": { "field": "title" }
  }
}
ข้อผิดพลาด
HTTPรหัสข้อผิดพลาด
400 validation_error, invalid_json, invalid_webhook_url
401 missing_api_key
402 insufficient_balance
403 api_disabled, invalid_api_key, forbidden
404 not_found, route_not_found
405 method_not_allowed
409 site_not_ready, conflict, edits_reset_required
413 payload_too_large
415 unsupported_media_type
429 rate_limited
500 internal_error, export_failed
502 generation_failed

ข้อจำกัด

ข้อจำกัด
ข้อจำกัด ค่า
คำขอต่อคีย์ 60 ต่อหนึ่งนาทีโดยค่าเริ่มต้น (กำหนดค่าได้ต่อคีย์, 0 = ไม่จำกัด) คีย์ที่ไม่ถูกต้องซ้ำจาก IP เดียวกันจะได้รับ 429 พร้อม Retry-After
เนื้อหาคำขอ 2 MB; POST /sites กับรูปอ้างอิงได้สูงสุด 162 MB; การบันทึกในตัวแก้ไขสูงสุด 4 MB
รูปอ้างอิง สูงสุด 12 รูปภาพ PNG, JPEG หรือ WEBP (base64 หรือ URL ข้อมูล) แต่ละรูปไม่เกิน 10 MB
เนื้อหาหน้าแก้ไข HTML สูงสุด 500,000 ตัวอักษร, CSS สูงสุด 100,000 ตัว อักษร สคริปต์และตัวจัดการเหตุการณ์จะถูกลบออก
รูปภาพเว็บไซต์ PNG, JPEG, WEBP หรือ GIF, 5 MB ต่อรูป, สูงสุด 200 รูปต่อเว็บไซต์
ชื่อเว็บไซต์ ชื่อไซต์ 1–200 ตัวอักษร

Editor API

ทุกสิ่งที่โปรแกรมแก้ไขบนแดชบอร์ดทำได้ จะพร้อมใช้งานสำหรับไซต์ที่เสร็จสมบูรณ์ของคุณ: เนื้อหาหน้า แผนผังหน้าและส่วน สไตล์ ชื่อเรื่อง/ธีม/เค้าโครง/โครงสร้าง การติดตาม และภาพ การแก้ไขหน้าจะแทนที่หน้า; ลบ (DELETE) จะคืนค่าหน้าที่สร้างไว้

curl

# Load, change and save a page
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://whitepagekit.com/api/v1/sites/UUID/editor?page=index"
curl -X PATCH https://whitepagekit.com/api/v1/sites/UUID/editor \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"index","html":"<main>…</main>","css":""}'
# Restore the generated page
curl -X DELETE -H "X-API-Key: YOUR_API_KEY" \
  "https://whitepagekit.com/api/v1/sites/UUID/editor?page=index"

การแก้ไขต้องใช้ไซต์ที่เสร็จสมบูรณ์ (หากไม่เช่นนั้นจะได้ข้อผิดพลาด 409 site_not_ready) การเปลี่ยนธีม เค้าโครง หรือโครงสร้างบนหน้าที่แก้ไขแล้วจะส่งกลับ 409 edits_reset_required เว้นแต่ reset_edits จะเป็นจริง การแก้ไขไม่มีค่าใช้จ่าย

เอกสารอ้างอิงปลายทาง

สร้างขึ้นจากเอกสาร OpenAPI ดังนั้นจึงตรงกับ API ที่ใช้งานจริงเสมอ เส้นทางสัมพันธ์กับ URL ฐาน

บัญชีผู้ใช้

  • GET /me

    Get the authenticated account

  • GET /transactions

    List account balance transactions

แคตตาล็อก

  • GET /languages

    List enabled supported languages

  • GET /themes

    List site themes

  • GET /layouts

    List enabled layouts

ไซต์

  • GET /sites

    List the authenticated account's sites

  • POST /sites

    Start site generation

  • GET /sites/{uuid}

    Get site status and refresh generation state

  • DELETE /sites/{uuid}

    Delete a terminal site and its generated data — Pending, queued and running generation jobs cannot be deleted. Wait for done or error; active deletion returns 409 conflict without refunding or removing the job.

  • GET /sites/{uuid}/download

    Download a completed site archive

AI และระบบอัตโนมัติ

  • GET /ai-tools

    Function-calling tool schemas — The same six tools the MCP endpoint offers, as JSON schemas for your own tool loop. format is openai (Responses API), openai-chat (Chat Completions), anthropic or mcp. Public; no response envelope.

  • GET /docs.md

    Documentation as Markdown — The developer guide, endpoint reference and AI integration guide as one Markdown file, written for language models and quick copy-paste. Public.

  • POST /mcp

    Model Context Protocol endpoint — MCP over Streamable HTTP (JSON-RPC 2.0, one JSON reply per POST). Methods: initialize, ping, tools/list, tools/call. Tools: get_account, list_languages, list_themes, create_site (paid), get_site, list_sites. Authenticate with the same API key; point an MCP client at this URL.

โปรแกรมแก้ไข

  • GET /sites/{uuid}/editor

    Load a page for editing — Editor access for the site owner's API key; mirrors the dashboard editor. Only completed sites (409 site_not_ready otherwise).

  • PATCH /sites/{uuid}/editor

    Save a page's edited content — Replaces the page content and CSS. html must be non-empty (use DELETE to restore the generated page); scripts, event handlers and javascript: URLs are removed, HTML is limited to 500000 and CSS to 100000 characters, request body to 4 MB. Returns the saved page as GET does.

  • DELETE /sites/{uuid}/editor

    Restore a page's generated content — Discards the page's saved edits. Returns the regenerated page.

  • GET /sites/{uuid}/editor/canvas

    Get editing canvas data — Stylesheet, Tailwind theme, body class, direction, section blocks, icons and sample copy an external visual editor needs to render the page like the dashboard editor.

  • GET /sites/{uuid}/pages

    Get the page and section plan — Returns structure, pages with their sections and edited flag, one-page sections and the sections available to add. Same payload as the dashboard.

  • POST /sites/{uuid}/pages

    Save the page and section plan — Body: pages (list of {slug, title, nav, sections}; the first page is index) and, for onepage sites, onepage_sections. Sections of pages with saved edits are locked in the dashboard; edited pages that are removed lose their edits. At most 12 pages.

  • GET /sites/{uuid}/style

    Get style overrides — Returns stored overrides, effective colors, fonts, radius and density, and the allowed font, radius and density values.

  • POST /sites/{uuid}/style

    Save or reset style overrides — Send style ({colors, fonts: {heading, body}, radius, density}) or reset=true to return to the theme.

  • GET /sites/{uuid}/design

    Get site title, theme and layout — Returns site_title, title_suggestions, theme_variant, theme_mode, layout, structure and whether the site has saved edits.

  • POST /sites/{uuid}/design

    Change site title, theme, mode, layout or structure — theme_variant, theme_mode, layout and structure are required; site_title (1-200 characters), apply_blueprint and reset_edits are optional. Changing theme, layout or structure while pages have saved edits returns 409 edits_reset_required unless reset_edits is true; renaming alone keeps edits.

  • GET /sites/{uuid}/tracking

    Get tracking settings

  • POST /sites/{uuid}/tracking

    Save tracking settings — Body: tracking {ga4_measurement_id, google_ads_id, google_ads_conversion_label, meta_pixel_id, privacy_policy_url, terms_url}. Applied to exports; an empty object removes all tracking.

  • GET /sites/{uuid}/media

    List uploaded site images

  • POST /sites/{uuid}/media

    Upload or delete site images — multipart/form-data with one or more files in files[] (PNG, JPEG, WEBP or GIF, 5 MB each, at most 200 images per site), or JSON {"action": "delete", "name": <name>}. Returns the updated list for uploads. 409 conflict when the per-site image limit is reached.

การชำระเงินภายนอก (สำหรับคีย์ผู้ดูแลระบบเท่านั้น)

  • GET /payment-sites

    List external payment sites owned by the admin API account — Admin role required; payment.manage permission alone is insufficient. Webhook secrets are never returned.

  • POST /payment-sites

    Register an external payment site (admin only)

  • PATCH /payment-sites/{id}

    Update an owned external payment site (admin only)

  • DELETE /payment-sites/{id}

    Delete an owned external payment site (admin only) — Deletion is allowed only when the site has no orders. Sites with orders must be disabled instead.

  • GET /payments

    List external orders owned by the admin API account

  • POST /payments

    Create external checkout or automatic subscription (admin only) — Server-to-server only. Separate from wallet top-ups: no White Page Kit balance, bonus or referral credit. Repeated idempotency key returns the original order; a different payload or reused external order ID conflicts. Provider uncertainty never starts a second checkout automatically.

  • GET /payments/{uuid}

    Read owned external payment status (admin only)

  • POST /payments/{uuid}/cancel

    Cancel an owned subscription or locally close a pending one-time order (admin only) — Subscriptions stop future renewals. Pending one-time cancellation is a local close, not a refund; an already-open provider checkout may still accept payment. A late authenticated real payment remains recorded and notified. No payment is marked paid by a browser return.

  • POST /payments/{uuid}/approve

    Approve funds received for an owned pending or locally cancelled bank transfer (admin only) — Manual confirmation of funds received, including a transfer arriving after local cancellation; never approves a Dodo or Enigmoss order and never credits White Page Kit balance.

คำอธิบายมาจากเอกสาร OpenAPI และเป็นภาษาอังกฤษ แบบฟอร์มคำขอและการตอบกลับอยู่ในไฟล์สคีมา

การผสานรวมที่พร้อมใช้งาน

ชุดเครื่องมือสำหรับการผสานรวมเป็นแอปพลิเคชัน PHP ขนาดเล็กพร้อมแบบฟอร์มสร้าง ช่วงตรวจสถานะ คำแนะนำการเรียกกลับที่เซ็น และโปรแกรมแก้ไขภาพเต็มรูปแบบที่สื่อสารกับ API นี้ผ่านพร็อกซีฝั่งเซิร์ฟเวอร์ สร้างบัญชีเพื่อรับคีย์แล้วดูราคาแต่ละการสร้าง