Documentazione API
L’API di hdply consente a script e agenti IA di gestire i tuoi siti in modo programmatico: elencare i progetti, leggere l’HTML, pubblicare aggiornamenti e creare nuovi siti. È una API REST piccola e prevedibile: se sai usare curl, sai usare hdply.
Autenticazione
Crea la tua chiave API personale nella dashboard della console (scheda "Chiave API"). Inviala come token bearer in ogni richiesta:
Authorization: Bearer hdply_sk_…
La chiave viene mostrata una sola volta alla creazione; rigenerarla la sostituisce, eliminarla la revoca immediatamente. Tienila segreta: dà accesso a tutti i tuoi progetti.
URL di base
https://api.app.hdply.com
Endpoint
GET /v1/projects— elenca i tuoi progetti.POST /v1/projects— crea un progetto. Corpo JSON:{"name": "opzionale", "html": "opzionale"}. Conhtmlil sito è subito online; senza nome si usa il<title>dell’HTML. Il server assegna un sottodominio casuale.GET /v1/projects/{id}— un progetto.{id}accetta l’id numerico o il sottodominio (es.k3v9x2m7q1).GET /v1/projects/{id}/html— l’HTML attualmente online.PUT /v1/projects/{id}/html— pubblica nuovo HTML (corpotext/htmlgrezzo, online appena torna la risposta).GET /v1/projects/{id}/deployments— cronologia dei deploy (quelli via API sono etichettati"source": "api").
Non esiste DELETE. La rimozione di un sito è volutamente solo via web, così un agente automatizzato non potrà mai distruggere il tuo lavoro. Ogni deploy via API è versionato: puoi ripristinare qualsiasi versione dalla console.
Avvio rapido
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
Limiti ed errori
- L’HTML è limitato a 1 MB per sito (funziona meglio un singolo file autonomo).
- Il piano gratuito include 20 siti; Pro è illimitato.
- Gli errori sono JSON:
{"code": "…", "error": "messaggio"}. Codici comuni:unauthorized(401),project_not_found(404),project_limit(403),file_too_large(413).
Claude e MCP
hdply include un server MCP integrato: Claude Code e Claude Desktop possono usare i tuoi siti come strumenti nativi (list_sites, create_site, get_site_html, deploy_site, get_deploy_history). Collega Claude Code con un comando:
claude mcp add --transport http hdply https://api.app.hdply.com/mcp \ --header "Authorization: Bearer hdply_sk_…"
Per Claude Desktop, aggiungi questo alle impostazioni MCP (claude_desktop_config.json):
{
"mcpServers": {
"hdply": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.app.hdply.com/mcp",
"--header", "Authorization: Bearer hdply_sk_…"]
}
}
}
Uso con agenti IA
Incolla il blocco qui sotto in ChatGPT, Claude o qualsiasi agente con accesso alla shell, insieme alla tua chiave. Da quel momento basterà dire "aggiorna il mio sito".
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.
Riepilogo leggibile dalle macchine per crawler e agenti: hdply.com/llms.txt