Dokumentasi API

Terakhir diperbarui: 2026-07-05

API hdply memungkinkan skrip dan agen AI mengelola situs Anda secara terprogram: melihat daftar proyek, membaca HTML, menerbitkan pembaruan, dan membuat situs baru. API REST yang kecil dan mudah ditebak — kalau bisa pakai curl, bisa pakai hdply.

Autentikasi

Buat kunci API pribadi Anda di dasbor konsol (kartu "Kunci API"). Kirim sebagai token bearer pada setiap permintaan:

Authorization: Bearer hdply_sk_…

Kunci hanya ditampilkan sekali saat dibuat; membuat ulang akan menggantinya, menghapus akan mencabutnya seketika. Rahasiakan — kunci ini memberi akses ke semua proyek Anda.

URL dasar

https://api.app.hdply.com

Endpoint

Tidak ada DELETE. Menghapus situs sengaja hanya bisa lewat web, sehingga agen otomatis tidak akan pernah bisa menghancurkan karya Anda. Setiap deploy API memiliki versi — pulihkan versi mana pun dari konsol.

Mulai cepat

export HDPLY_KEY=hdply_sk_…

# create a site and go live in one call
curl -X POST https://api.app.hdply.com/v1/projects \
  -H "Authorization: Bearer $HDPLY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html": "<!doctype html><title>Hello</title><h1>Hi!</h1>"}'
# → {"project": {"subroute": "k3v9x2m7q1", "url": "https://k3v9x2m7q1.hdply.com", …}}

# read the live HTML
curl https://api.app.hdply.com/v1/projects/k3v9x2m7q1/html \
  -H "Authorization: Bearer $HDPLY_KEY"

# publish an update
curl -X PUT https://api.app.hdply.com/v1/projects/k3v9x2m7q1/html \
  -H "Authorization: Bearer $HDPLY_KEY" \
  -H "Content-Type: text/html" \
  --data-binary @index.html

Batasan dan galat

Claude & MCP

hdply dilengkapi server MCP bawaan, sehingga Claude Code dan Claude Desktop dapat memakai situs Anda sebagai alat native (list_sites, create_site, get_site_html, deploy_site, get_deploy_history). Hubungkan Claude Code dengan satu perintah:

claude mcp add --transport http hdply https://api.app.hdply.com/mcp \
  --header "Authorization: Bearer hdply_sk_…"

Untuk Claude Desktop, tambahkan ini ke pengaturan MCP Anda (claude_desktop_config.json):

{
  "mcpServers": {
    "hdply": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.app.hdply.com/mcp",
               "--header", "Authorization: Bearer hdply_sk_…"]
    }
  }
}

Menggunakan dengan agen AI

Tempel blok di bawah ke ChatGPT, Claude, atau agen apa pun dengan akses shell, bersama kunci Anda. Setelah itu cukup katakan "perbarui situs saya".

You can manage my hdply websites via its REST API.
Base URL: https://api.app.hdply.com
Auth header on every request: "Authorization: Bearer <MY_KEY>"

Endpoints:
- GET  /v1/projects                     -> list my sites
- POST /v1/projects                     -> create; JSON {"name"?, "html"?}; html goes live instantly
- GET  /v1/projects/{id}/html           -> current HTML ({id} = numeric id or subdomain)
- PUT  /v1/projects/{id}/html           -> publish new HTML (raw text/html body)
- GET  /v1/projects/{id}/deployments    -> version history

Rules: HTML max 1MB, single self-contained file preferred (inline CSS/JS).
There is no delete endpoint. Every deploy is versioned and restorable.
After publishing, the site is live at https://{subroute}.hdply.com immediately.

Ringkasan yang dapat dibaca mesin untuk crawler dan agen: hdply.com/llms.txt