Documentación de la API
La API de hdply permite que scripts y agentes de IA gestionen tus sitios de forma programática: listar proyectos, leer HTML, publicar actualizaciones y crear sitios nuevos. Es una API REST pequeña y predecible: si sabes usar curl, sabes usar hdply.
Autenticación
Crea tu clave API personal en el panel de la consola (tarjeta "Clave API"). Envíala como token bearer en cada solicitud:
Authorization: Bearer hdply_sk_…
La clave se muestra una sola vez al crearla; regenerarla la reemplaza y eliminarla la revoca al instante. Mantenla en secreto: da acceso a todos tus proyectos.
URL base
https://api.app.hdply.com
Endpoints
GET /v1/projects— lista tus proyectos.POST /v1/projects— crea un proyecto. Cuerpo JSON:{"name": "opcional", "html": "opcional"}. Si incluyeshtml, el sitio queda en línea de inmediato; sin nombre, se usa el<title>del HTML. El servidor asigna un subdominio aleatorio.GET /v1/projects/{id}— un proyecto.{id}acepta el id numérico o el subdominio (p. ej.k3v9x2m7q1).GET /v1/projects/{id}/html— el HTML actualmente en línea.PUT /v1/projects/{id}/html— publica HTML nuevo (cuerpotext/htmlsin procesar, en línea en cuanto vuelve la respuesta).GET /v1/projects/{id}/deployments— historial de despliegues (los de API llevan la etiqueta"source": "api").
No hay DELETE. Eliminar un sitio es deliberadamente solo web, así un agente automatizado nunca puede destruir tu trabajo. Cada despliegue por API queda versionado: puedes restaurar cualquier versión desde la consola.
Inicio rápido
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
Límites y errores
- El HTML está limitado a 1 MB por sitio (funciona mejor un único archivo autocontenido).
- El plan gratis incluye 20 sitios; Pro es ilimitado.
- Los errores son JSON:
{"code": "…", "error": "mensaje"}. Códigos comunes:unauthorized(401),project_not_found(404),project_limit(403),file_too_large(413).
Claude y MCP
hdply incluye un servidor MCP integrado, así Claude Code y Claude Desktop pueden usar tus sitios como herramientas nativas (list_sites, create_site, get_site_html, deploy_site, get_deploy_history). Conecta Claude Code con un comando:
claude mcp add --transport http hdply https://api.app.hdply.com/mcp \ --header "Authorization: Bearer hdply_sk_…"
Para Claude Desktop, añade esto a tu configuración 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 agentes de IA
Pega el bloque de abajo en ChatGPT, Claude o cualquier agente con acceso a shell, junto con tu clave. A partir de ahí basta decir "actualiza mi sitio" y sabrá cómo.
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.
Resumen legible por máquinas para crawlers y agentes: hdply.com/llms.txt