Documentazione API

Ultimo aggiornamento: 2026-07-05

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

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

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