Documentación de la API

Última actualización: 2026-07-05

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

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

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