API overview
REST API for publishing and managing HTMLDrop pages programmatically.
Last updated June 27, 2026
HTMLDrop exposes a versioned REST API at /api/v1/* for automation, CI/CD pipelines, and AI tool integrations.
Base URL
https://htmldrop.in/api/v1
Use your production or staging host when testing locally.
Authentication
All v1 endpoints require a signed-in account. Pass an API key as a Bearer token:
Authorization: Bearer htmd_live_…
Create keys in Settings. Session cookies also work for same-user tooling.
Postman collection
Import the ready-made collection and an environment to test every v1 endpoint without writing curl commands.
Download
| File | Description |
|---|---|
| HTMLDrop-API.postman_collection.json | All v1 requests (pages, settings, analytics) |
| HTMLDrop-Production.postman_environment.json | https://htmldrop.in/api/v1 |
| HTMLDrop-Staging.postman_environment.json | https://staging.htmldrop.in/api/v1 |
Import steps
- Open Postman → Import → drag the collection and one environment file
- Select the environment (Production or Staging) in the top-right dropdown
- Edit environment variables:
api_key— your key from Settings (htmd_live_…orhtmd_test_…)vercel_bypass— staging only; your Deployment Protection bypass secret (leave blank on production)
- Run Create page — the response slug is saved to
{{slug}}for the other requests
New and existing users can test the API in Postman as long as they are signed in and have created an API key. Free accounts get one key during early access.
The API is free during early access for all signed-in users. When billing launches, API access will move to Pro — see Plans & limits.
Versioning
Breaking changes ship under a new path (/api/v2/*). Non-breaking additions may appear on v1 without a version bump.
OpenAPI
Machine-readable spec: /openapi.yaml
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /pages | Publish a page |
| GET | /pages | List your pages |
| GET | /pages/[slug] | Get page metadata |
| PATCH | /pages/[slug] | Update page content |
| DELETE | /pages/[slug] | Delete a page |
| GET/PATCH | /pages/[slug]/settings | Password and expiry |
| GET | /pages/[slug]/analytics | View counts |
AI endpoints (/ai/*) require provider keys (OPENROUTER_API_KEY or AI_GATEWAY_API_KEY). When keys are unset, they return 503.
| Method | Path | Description |
|---|---|---|
| POST | /ai/metadata | Generate title, description, and keywords from page content |
| POST | /ai/generate | Generate, improve, or fix HTML/Markdown content |
Both endpoints require drops:write scope, enforce daily quota (AI_DAILY_QUOTA) and per-minute rate limits (AI_RATE_PER_MINUTE). Test API keys skip daily quota.