API 문서
hdply API로 스크립트와 AI 에이전트가 사이트를 프로그래밍 방식으로 관리할 수 있습니다: 프로젝트 목록 조회, HTML 읽기, 업데이트 배포, 새 사이트 생성. 작고 예측 가능한 REST API라서 curl을 쓸 줄 알면 바로 쓸 수 있습니다.
인증
콘솔 대시보드의 "API 키" 카드에서 개인 API 키를 발급하세요. 모든 요청에 Bearer 토큰으로 보냅니다:
Authorization: Bearer hdply_sk_…
키는 발급 시 한 번만 표시됩니다. 재발급하면 기존 키가 교체되고, 삭제하면 즉시 무효화됩니다. 모든 프로젝트에 접근할 수 있는 키이므로 비밀로 보관하세요.
기본 URL
https://api.app.hdply.com
엔드포인트
GET /v1/projects— 내 프로젝트 목록.POST /v1/projects— 프로젝트 생성. JSON 본문:{"name": "선택", "html": "선택"}.html을 넣으면 즉시 라이브되며, 이름이 없으면 HTML의<title>을 사용합니다. 서브도메인은 서버가 무작위로 배정합니다.GET /v1/projects/{id}— 프로젝트 1개 조회.{id}에는 숫자 id 또는 서브도메인(예:k3v9x2m7q1)을 쓸 수 있습니다.GET /v1/projects/{id}/html— 현재 라이브 중인 HTML.PUT /v1/projects/{id}/html— 새 HTML 배포 (본문에text/html원문 그대로, 응답이 오는 순간 라이브).GET /v1/projects/{id}/deployments— 배포 히스토리 (API 배포는"source": "api"로 기록).
DELETE는 없습니다. 사이트 삭제는 의도적으로 웹에서만 가능해서, 자동화된 에이전트가 작업물을 파괴할 수 없습니다. 모든 API 배포는 버전으로 남고 콘솔에서 언제든 이전 버전으로 복원할 수 있습니다.
퀵스타트
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
제한과 에러
- HTML은 사이트당 1 MB까지입니다 (CSS/JS를 인라인한 단일 파일이 가장 좋습니다).
- 무료 플랜은 사이트 20개, Pro는 무제한입니다.
- 에러는 JSON입니다:
{"code": "…", "error": "설명"}. 주요 코드:unauthorized(401),project_not_found(404),project_limit(403),file_too_large(413).
Claude · MCP 연동
hdply에는 MCP 서버가 내장되어 있어 Claude Code와 Claude Desktop이 내 사이트를 네이티브 도구(list_sites, create_site, get_site_html, deploy_site, get_deploy_history)로 사용할 수 있습니다. Claude Code는 명령 한 줄로 연결됩니다:
claude mcp add --transport http hdply https://api.app.hdply.com/mcp \ --header "Authorization: Bearer hdply_sk_…"
Claude Desktop은 MCP 설정 파일(claude_desktop_config.json)에 다음을 추가하세요:
{
"mcpServers": {
"hdply": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.app.hdply.com/mcp",
"--header", "Authorization: Bearer hdply_sk_…"]
}
}
}
AI 에이전트와 함께 쓰기
아래 블록을 키와 함께 ChatGPT, Claude 등 셸을 쓸 수 있는 에이전트에 붙여넣으세요. 그 다음부터는 "내 사이트 업데이트해줘" 한마디면 알아서 처리합니다.
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.
크롤러·에이전트용 기계 판독 요약: hdply.com/llms.txt