---
title: "Host generated HTML as a shareable web page (turn any HTML into a webpage): POST HTML + payment, get back a permanent private link."
method: POST
path: "/publish"
tags: ["Provision"]
---

# Host generated HTML as a shareable web page (turn any HTML into a webpage): POST HTML + payment, get back a permanent private link.

`POST /publish`

## Request

- Base URL: `https://api.stacktr.ee`
- URL: `https://api.stacktr.ee/publish`
- Auth: none required

Agent-native, no human and no account. POST your HTML with no payment to receive a 402 carrying x402 (PAYMENT-REQUIRED header) and MPP-evm (WWW-Authenticate: Payment) requirements. Pay $0.50 in USDC on Base (accepts[0]) or on Solana (accepts[1]) and retry with the same body; on settlement the page publishes to a permanent, unguessable link and you get back the URL plus a one-time claim token. The entry rung of the agentic ladder — vs $1 for a reusable key via /provision. Settled through the Coinbase CDP facilitator. Read the accepts array from the 402 rather than hardcoding a rail: the requirements differ per network (an EIP-712 domain on Base, a sponsoring feePayer on Solana), and free keyless revisions afterwards are EVM-only.

## Request body

- object
  - `html` string, required: The full HTML document to host.
  - `filename` string: Optional logical filename; defaults to index.html.
  - `agent_context` object: Optional discovery telemetry, never required and never affecting the response: which client is paying (e.g. agentcash, awal, pay.sh, bazaar-mcp), the kind of agent, and the search query that led here. Recorded only to improve how Stacktree describes itself to agents.
    - `client` string
    - `agentType` string: Codex, Claude Code, Hermes, OpenClaw, or Others (Specify).
    - `agentTypeOther` string
    - `discovery_query` string: The search that led here, verbatim.

## Response `201`

Paid and published. Returns the permanent URL + the claim token. The claim token adopts the page into an account, and until it is used for that it is also the page's keyless update credential: PUT /sites/{id} with `Authorization: Claim <claim_token>` replaces the content at the same URL, on Base and Solana alike, with no account and no signature. The `next.update_in_place` hint in the response body carries the exact request.

- object
  - `url` string
  - `unlisted_token` string
  - `claim_token` string
  - `expires_at` integer, nullable: null: the payment bought permanence outright, outside the plan ladder.
  - `expires_at_iso` string, nullable
  - `ttl_seconds` integer, nullable
  - `expiry_clamped` boolean: Always false on this rail: a paid one-off page has no plan ceiling to be clamped by.
  - `expiry_ceiling_hours` integer, nullable
  - `expiry_source` string

## Other responses

- `402`: Payment Required. x402 requirements in the PAYMENT-REQUIRED header; MPP-evm in WWW-Authenticate.
- `502`: Facilitator verify/settle error.

---

[API](https://skmtc.dev/stacktr/apis/stacktree-api.md) · [All operations](https://skmtc.dev/stacktr/apis/stacktree-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stacktr/apis/stacktree-api/revisions/5878cce46977?raw)
