API Belgeleri
hdply API’si, script’lerin ve yapay zekâ ajanlarının sitelerini programatik olarak yönetmesini sağlar: projeleri listele, HTML oku, güncelleme yayınla ve yeni site oluştur. Küçük ve öngörülebilir bir REST API’dir — curl kullanabiliyorsan hdply’yi de kullanabilirsin.
Kimlik doğrulama
Kişisel API anahtarını konsol panelinden ("API anahtarı" kartı) oluştur. Her istekte bearer token olarak gönder:
Authorization: Bearer hdply_sk_…
Anahtar yalnızca oluşturulduğunda bir kez gösterilir; yeniden oluşturmak eskisini değiştirir, silmek anında geçersiz kılar. Gizli tut — tüm projelerine erişim sağlar.
Temel URL
https://api.app.hdply.com
Uç noktalar
GET /v1/projects— projelerini listeler.POST /v1/projects— proje oluşturur. JSON gövdesi:{"name": "isteğe bağlı", "html": "isteğe bağlı"}.htmlverilirse site anında yayına girer; ad verilmezse HTML’in<title>etiketi kullanılır. Alt alan adını sunucu rastgele atar.GET /v1/projects/{id}— tek bir proje.{id}sayısal id veya alt alan adı (örn.k3v9x2m7q1) kabul eder.GET /v1/projects/{id}/html— şu anda yayında olan HTML.PUT /v1/projects/{id}/html— yeni HTML yayınlar (hamtext/htmlgövde, yanıt döner dönmez yayında).GET /v1/projects/{id}/deployments— dağıtım geçmişi (API dağıtımları"source": "api"etiketi taşır).
DELETE yoktur. Site silme bilerek yalnızca web üzerinden yapılır; böylece otomatik bir ajan işini asla yok edemez. Her API dağıtımı sürümlenir — konsoldan herhangi bir önceki sürüme dönebilirsin.
Hızlı başlangıç
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
Sınırlar ve hatalar
- HTML site başına 1 MB ile sınırlıdır (kendi kendine yeten tek dosya en iyisidir).
- Ücretsiz plan 20 site içerir; Pro sınırsızdır.
- Hatalar JSON’dur:
{"code": "…", "error": "mesaj"}. Yaygın kodlar:unauthorized(401),project_not_found(404),project_limit(403),file_too_large(413).
Claude ve MCP
hdply yerleşik bir MCP sunucusuyla gelir; Claude Code ve Claude Desktop sitelerini yerel araçlar olarak kullanabilir (list_sites, create_site, get_site_html, deploy_site, get_deploy_history). Claude Code’u tek komutla bağla:
claude mcp add --transport http hdply https://api.app.hdply.com/mcp \ --header "Authorization: Bearer hdply_sk_…"
Claude Desktop için MCP ayarlarına (claude_desktop_config.json) şunu ekle:
{
"mcpServers": {
"hdply": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.app.hdply.com/mcp",
"--header", "Authorization: Bearer hdply_sk_…"]
}
}
}
Yapay zekâ ajanlarıyla kullanım
Aşağıdaki bloğu anahtarınla birlikte ChatGPT, Claude veya shell erişimi olan herhangi bir ajana yapıştır. Sonrasında "sitemi güncelle" demen yeterli.
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.
Tarayıcılar ve ajanlar için makine tarafından okunabilir özet: hdply.com/llms.txt