API Documentation

Last updated: 2026-07-05

The hdply API lets scripts and AI agents manage your sites programmatically: list projects, read HTML, publish updates, and create new sites. It is a small, predictable REST API — if you can use curl, you can use hdply.

Authentication

Create your personal API key in the console dashboard ("API key" card). Send it as a bearer token on every request:

Authorization: Bearer hdply_sk_…

The key is shown once at creation; regenerating replaces it, deleting revokes it immediately. Keep it secret — it grants access to all of your projects.

Base URL

https://api.app.hdply.com

Endpoints

There is no DELETE. Removing a site is intentionally web-only, so an automated agent can never destroy your work. Every API deploy is versioned — you can restore any previous version from the console.

Quickstart

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

Limits and errors

Claude & MCP

hdply ships a built-in MCP server, so Claude Code and Claude Desktop can use your sites as native tools (list_sites, create_site, get_site_html, deploy_site, get_deploy_history). Connect Claude Code with one command:

claude mcp add --transport http hdply https://api.app.hdply.com/mcp \
  --header "Authorization: Bearer hdply_sk_…"

For Claude Desktop, add this to your MCP settings (claude_desktop_config.json):

{
  "mcpServers": {
    "hdply": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.app.hdply.com/mcp",
               "--header", "Authorization: Bearer hdply_sk_…"]
    }
  }
}

Using with AI agents

Paste the block below into ChatGPT, Claude, or any agent with shell access, together with your key. From then on you can just say "update my site" and it will know how.

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.

Machine-readable summary for crawlers and agents: hdply.com/llms.txt