// api reference
Create, update, and list hosted HTML pages programmatically. Push markup once and get a live URL back. Wire it into your own backend, or use the native Make.com module and n8n node.
Base URL
https://api.app.customjs.ioGet your API key from app.customjs.space. Prefer no code? The HTML Hosting product wraps this API in a UI and Make/n8n modules.
Pass your API key in the x-api-key header on every request.
curl https://api.app.customjs.io/pages/api/page \
-H "x-api-key: YOUR_API_KEY"/pages/api/pageList every page in your workspace. Returns an array of page objects. Use this to find a page's pageId before updating it.
curl https://api.app.customjs.io/pages/api/page \
-H "x-api-key: YOUR_API_KEY"[
{
"pageId": "pg_8f21",
"name": "Launch page",
"htmlFileUrl": "https://pages.customjs.io/launch-page.html"
}
]/pages/page/upload-htmlCreate a new hosted page. The response contains the live htmlFileUrl.
| Field | Type | Description |
|---|---|---|
| name | string | Required. A unique name for the page, also used to find it later |
| htmlContent | string | Required. The full HTML document to host |
| slug | string | Optional custom slug for the page URL |
curl -X POST https://api.app.customjs.io/pages/page/upload-html \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch page",
"htmlContent": "<h1>Launch day</h1>"
}'{
"pageId": "pg_8f21",
"htmlFileUrl": "https://pages.customjs.io/launch-page.html",
"name": "Launch page",
"message": "Page created",
"created": true
}/pages/api/page/id/{pageId}/update-htmlReplace the HTML of an existing page. The live URL stays the same, so the page updates in place.
| Field | Type | Description |
|---|---|---|
| htmlContent | string | Required. The new HTML document |
| name | string | Updated page name |
The pageId comes from the create response or the list endpoint.
curl -X PUT https://api.app.customjs.io/pages/api/page/id/pg_8f21/update-html \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Launch page",
"htmlContent": "<h1>Launch day v2</h1>"
}'{
"pageId": "pg_8f21",
"htmlFileUrl": "https://pages.customjs.io/launch-page.html",
"name": "Launch page",
"message": "Page updated"
}To publish idempotently, list the pages, match by name, then update or create. This is exactly what the Make module and n8n node do.
// Create the first time, update on every run after
const pages = await api.get('/pages/api/page');
const existing = pages.find(p => p.name === name);
if (existing) {
await api.put('/pages/api/page/id/' + existing.pageId + '/update-html', { name, htmlContent });
} else {
await api.post('/pages/page/upload-html', { name, htmlContent });
}| Field | Type | Description |
|---|---|---|
| pageId | string | Unique ID of the page, used to update it later |
| htmlFileUrl | string | The live URL where the page is served |
| name | string | The page name |
| message | string | Human-readable status message |
| created | boolean | On create: true for a new page (omitted on update) |
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request: missing name or htmlContent |
| 401 | Unauthorized: missing or invalid API key |
| 404 | Page not found. Check the pageId |
| 500 | Internal error |
// no-code option
The HTML Hosting product wraps this API in a UI, one-click custom domains, and native Make.com and n8n modules. Generate pages and forms without touching a request.
curl -X POST https://api.app.customjs.io/pages/page/upload-html \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"name": "Launch page",
"htmlContent": "<h1>Launch day</h1>"
}'Custom domains · SSL · global CDN