Stacktree Provision API
The Provision API from Stacktree — 6 operation(s) for provision.
The Provision API from Stacktree — 6 operation(s) for provision.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/stacktr-ee:stacktr-ee-provision-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Stacktree Provision API
version: 1.0.0
summary: 'Agent-first private-by-default HTML hosting: host a web page from any agent.'
description: 'Stacktree hosts web pages for AI agents: turn generated HTML (a report, dashboard, landing page or static site) into a live, shareable webpage on a permanent private link. Publish, manage, and share static HTML sites from AI agents. Supports anonymous publishing for one-shot artefacts, API-key auth for long-lived agent jobs, and OAuth 2.1 with Dynamic Client Registration for in-product agent connectors (claude.ai, ChatGPT custom connectors, etc.). ## Versioning and deprecation The API is major version 1. Every unversioned path is also served under the `/v1/` prefix (`/v1/sites` = `/sites`); pin `/v1/` if you want the version in the URL. Breaking changes only ever ship under a new prefix (`/v2/`), never in place. Deprecations are signalled in-band with `Deprecation` and `Sunset` response headers (RFC 8594) at least 90 days before removal, and listed in the changelog at https://stacktr.ee/changelog. Nothing is deprecated today. ## Rate limits Rate-limited surfaces return standard headers on every response: `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` (seconds until the rolling window frees), the combined `RateLimit` field, and `RateLimit-Policy`. A `429` additionally carries `Retry-After` in seconds. Current windows: anonymous publishes and per-plan daily publish caps roll over 24 h; OAuth dynamic client registration is per-IP per hour. Read the caps from `GET /me` rather than hardcoding them. See /llms.txt for the agent-readable overview, and /docs for human docs.'
contact:
name: Stacktree
url: https://stacktr.ee
email: gm@stacktr.ee
license:
name: Proprietary
termsOfService: https://stacktr.ee/terms
x-guidance: 'Stacktree hosts generated HTML (reports, dashboards, landing pages, static sites) as private, shareable web pages. Anonymous: POST /sites with a multipart `file` field to get a private 24h URL, no auth. One permanent page, no key: POST /publish and pay $0.50 over x402 or MPP. Persistent: pay $1 once over x402 at POST /provision to receive an stk_live_ API key, then POST /sites with `Authorization: Bearer <key>`. That key starts on free-tier limits (3 pages in total, each expiring after 7 days, passcodes included); POST /unlock buys more. Each response returns the private URL. Gate a site with a passcode or email domain, set an expiry, or attach your own domain via the /sites and /custom-domains routes. Plan ceilings return HTTP 402 with a plan_* error code, described in the 402 responses below.'
servers:
- url: https://api.stacktr.ee
description: Production API host (current major version; /v1 is an identical alias)
security:
- bearerApiKey: []
- oauth2:
- sites:write
- sites:read
tags:
- name: Provision
paths:
/provision:
post:
tags:
- Provision
security: []
summary: 'Pay to provision a persistent API key (x402): get an API key after one payment…'
description: 'Agent-native, no human in the loop. POST with no payment to receive a 402 with x402 payment requirements (PAYMENT-REQUIRED header for v2; the accepts list in the body for v1). Pay $1.00 in USDC on Base (accepts[0], an EIP-3009 authorization) or on Solana (accepts[1], an `exact` transfer sponsored by the fee payer in extra.feePayer) and retry; on settlement you receive a one-time stk_live_ API key. The key is a free-tier identity: 3 pages in total, each expiring after 7 days, passcodes included. POST /unlock lifts those limits (higher_limits $25/30 days) or cancels the expiry on one page (make_permanent $5). Settled through the Coinbase CDP facilitator. Read the accepts array from the 402 rather than hardcoding a rail: the requirements differ per network, and the v1 rail (X-PAYMENT, accepts in the body) is Base only. Other agentic rails (MPP, ACP, AP2) are advertised in the rail menu when enabled.'
x-payment-info:
price:
mode: fixed
currency: USD
amount: '1.00'
protocols:
- x402: {}
- mpp:
method: evm
intent: charge
currency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
intent: charge
method: evm
amount: '1000000'
currency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
offers:
- amount: '1000000'
currency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
description: Provision a persistent Stacktree API key (returned once in the body).
intent: charge
method: evm
extensions:
bazaar:
serviceName: Stacktree — provision
description: 'Stacktree x402 API key provisioning: get an API key after one x402 payment ($1.00 in USDC on Base, shown once), so an agent sets up its own credentials without human approval. It is for hosting HTML pages as private, shareable web pages: send it as Authorization: Bearer to publish reports, dashboards, landing pages and static sites to permanent unguessable links, and to update them at the same URL. For a single page, POST /publish ($0.50) needs no key at all.'
serviceRecord: https://api.stacktr.ee/.well-known/x402-service
tags:
- html
- hosting
- host
- web-page
- publishing
- private
- static-site
- api-key
- share-link
- agents
info:
input:
type: http
method: POST
bodyType: json
body: {}
output:
type: json
example:
ok: true
api_key: stk_live_…
usage: 'Authorization: Bearer stk_live_…'
schema:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
input:
type: object
properties:
body:
type: object
description: Optional JSON body. Payment is carried in the PAYMENT-SIGNATURE header (x402 v2), so no body is required. Fields apply only to the token-carried rails (ACP / AP2).
properties:
acp_shared_payment_token:
type: string
description: 'ACP rail: a Stripe Shared Payment Token (spt_...).'
ap2_mandate:
type: object
description: 'AP2 rail: an AP2 mandate object.'
output:
type: object
properties:
example:
type: object
description: Returned once payment settles.
properties:
ok:
type: boolean
protocol:
type: string
api_key:
type: string
description: The provisioned stk_live_ API key, shown once.
prefix:
type: string
usage:
type: string
description: 'How to use the key, e.g. "Authorization: Bearer stk_live_...".'
requestBody:
required: false
description: No body is required for the x402 rail — payment is carried in the PAYMENT-SIGNATURE header (x402 v2) or X-PAYMENT (v1). Body fields apply only to the token-carried rails (ACP / AP2).
content:
application/json:
schema:
type: object
properties:
acp_shared_payment_token:
type: string
description: 'ACP rail: a Stripe Shared Payment Token (spt_...).'
ap2_mandate:
type: object
description: 'AP2 rail: an AP2 mandate object (supports human-not-present).'
agent_context:
type: object
description: '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.'
properties:
client:
type: string
maxLength: 64
agentType:
type: string
maxLength: 64
description: Codex, Claude Code, Hermes, OpenClaw, or Others (Specify).
agentTypeOther:
type: string
maxLength: 64
discovery_query:
type: string
maxLength: 300
description: The search that led here, verbatim.
responses:
'200':
description: Paid and provisioned. Returns the API key once.
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
protocol:
type: string
api_key:
type: string
prefix:
type: string
'402':
description: Payment Required. x402 requirements are in the PAYMENT-REQUIRED header (v2) and the response body (v1).
content:
application/json:
schema:
type: object
'502':
description: Facilitator verify/settle error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postProvision
/publish:
post:
tags:
- Provision
summary: Host generated HTML as a shareable web page (turn any HTML into a webpage)…
description: '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. With a card and no payment client: publish free with POST /sites, then keep that page for the same price by card in a browser (POST /pay/sessions with feature "keep_page", or https://stacktr.ee/pay).'
security: []
x-payment-info:
price:
mode: fixed
currency: USD
amount: '0.50'
protocols:
- x402: {}
- mpp:
method: evm
intent: charge
currency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
intent: charge
method: evm
amount: '500000'
currency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
offers:
- amount: '500000'
currency: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
description: Publish an HTML page to a permanent private link.
intent: charge
method: evm
extensions:
bazaar:
serviceName: Stacktree — publish
description: 'Host an HTML page and get back a permanent, private, shareable link. Turns generated HTML (a report, plan, dashboard, landing page, static site, or any web page an agent produced) into a live, shareable webpage: POST your HTML with payment; no account, no key, no human in the loop. Free updates by the paying wallet at the same URL; restorable for 30 days if deleted.'
tags:
- html
- hosting
- host
- web-page
- publishing
- private
- static-site
- landing-page
- report
- dashboard
- generated-html
- share-link
- shareable-link
- agents
info:
input:
type: http
method: POST
bodyType: json
body:
html: <!doctype html>...
output:
type: json
example:
url: https://stacktr.ee/p/<token>/
claim_token: <one-time-secret>
schema:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
input:
type: object
properties:
body:
type: object
description: 'The page to publish. Send { "html": "<!doctype html>..." } (or a raw text/html body). Payment is carried in the PAYMENT-SIGNATURE header (x402 v2).'
properties:
html:
type: string
description: The full HTML document to host.
filename:
type: string
description: Optional logical filename; defaults to index.html.
required:
- html
output:
type: object
properties:
example:
type: object
description: Returned once payment settles and the page is live.
properties:
url:
type: string
description: The permanent private link to share.
unlisted_token:
type: string
claim_token:
type: string
description: One-time secret to adopt this page into an account later.
requestBody:
required: true
description: 'The page to publish. Payment is carried in the PAYMENT-SIGNATURE header (x402 v2) or Authorization: Payment (MPP-evm).'
content:
application/json:
schema:
type: object
required:
- html
properties:
html:
type: string
description: The full HTML document to host.
filename:
type: string
description: Optional logical filename; defaults to index.html.
agent_context:
type: object
description: '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.'
properties:
client:
type: string
maxLength: 64
agentType:
type: string
maxLength: 64
description: Codex, Claude Code, Hermes, OpenClaw, or Others (Specify).
agentTypeOther:
type: string
maxLength: 64
discovery_query:
type: string
maxLength: 300
description: The search that led here, verbatim.
text/html:
schema:
type: string
description: The raw HTML document.
responses:
'201':
description: '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.'
content:
application/json:
schema:
type: object
properties:
url:
type: string
unlisted_token:
type: string
claim_token:
type: string
expires_at:
type:
- integer
- 'null'
description: 'null: the payment bought permanence outright, outside the plan ladder.'
expires_at_iso:
type:
- string
- 'null'
ttl_seconds:
type:
- integer
- 'null'
expiry_clamped:
type: boolean
description: 'Always false on this rail: a paid one-off page has no plan ceiling to be clamped by.'
expiry_ceiling_hours:
type:
- integer
- 'null'
expiry_source:
type: string
'402':
description: Payment Required. x402 requirements in the PAYMENT-REQUIRED header; MPP-evm in WWW-Authenticate.
content:
application/json:
schema:
type: object
'502':
description: Facilitator verify/settle error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postPublish
/unlock:
get:
tags:
- Provision
summary: The à-la-carte unlock catalog (SKUs and prices)
description: 'Live prices, always authoritative over any copy: make_permanent $5 one-time per page, custom_domain $5 / 30 days, higher_limits $25 / 30 days.'
security: []
responses:
'200':
description: Catalog of purchasable feature unlocks.
content:
application/json:
schema:
type: object
properties:
unlocks:
type: array
items:
type: object
operationId: getUnlock
post:
tags:
- Provision
summary: Buy a feature unlock over x402 (make-permanent, custom domain, higher limits)
description: POST with the feature and no payment to receive a 402 carrying x402 requirements; sign the EIP-3009 USDC authorization and retry to activate the entitlement. `make_permanent` ($5) cancels the expiry on one page; `higher_limits` ($25 / 30 days) lifts the identity to fleet limits (1 GB per site, unlimited daily publishes, no page cap, pages that do not expire); `custom_domain` ($5 / 30 days) allows a custom hostname. Live on Base mainnet.
security:
- bearerApiKey: []
- oauth2:
- sites:write
parameters:
- name: feature
in: query
required: true
schema:
type: string
description: The feature SKU to unlock (see GET /unlock for the catalog).
responses:
'200':
description: Unlock activated.
content:
application/json:
schema:
type: object
'402':
description: Payment Required (x402 requirements in the PAYMENT-REQUIRED header and body).
content:
application/json:
schema:
type: object
operationId: postUnlock
/pay/sessions:
post:
tags:
- Provision
security:
- {}
- bearerApiKey: []
summary: 'Create a card payment session: a scan-to-pay link for a human, or a card…'
description: 'No wallet, no account required. Returns a short pay URL, a terminal-printable QR, and a poll URL. A human scans and pays by card; the agent polls and continues mid-task. Paying above the price leaves a prepaid balance future paid actions draw from silently. Card checkout with no account: feature "keep_page" with a claim_token keeps one page published without an account (one-time, the page stops expiring), and feature "plan" with plan "solo", "studio" or "firm" buys a plan that renews monthly until canceled. Those two answer with checkout_url, amount, currency, recurring and expires_at; open checkout_url in a browser, where the total is shown before the pay button and the card is entered on Stripe''s checkout page. Any agent with a card can use it, including one paying with ChatGPT''s Wallet. The same thing as a web page: https://stacktr.ee/pay.'
requestBody:
content:
application/json:
schema:
type: object
properties:
feature:
type: string
description: provision | topup | make_permanent | custom_domain | higher_limits | keep_page | plan
amount_minor:
type: integer
description: Optional amount in minor units; surplus becomes a prepaid balance. Ignored for keep_page and plan, whose prices are fixed.
claim_token:
type: string
description: 'For keep_page: the claim_token of the page to keep (its claim_url or keep_url is accepted too). It only buys for its own page.'
plan:
type: string
enum:
- solo
- studio
- firm
description: For feature "plan".
site:
type: string
description: The page id. Required for make_permanent and custom_domain; optional for keep_page, where it must name the page the claim_token belongs to.
responses:
'201':
description: Session created.
content:
application/json:
schema:
type: object
properties:
code:
type: string
description: The order reference.
url:
type: string
qr:
type: string
amount:
type: string
checkout_url:
type: string
description: 'keep_page and plan: the page to open in a browser to review and pay.'
amount_minor:
type: integer
currency:
type: string
example: usd
recurring:
type: boolean
description: true for a plan (renews monthly until canceled), false for keep_page.
recurring_interval:
type: string
nullable: true
example: month
terms:
type: string
expires_at:
type: integer
description: Unix seconds. The session must be paid before this.
'404':
description: 'keep_page: no page matches that claim_token.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: 'keep_page: the page is already paid for, or cannot be kept.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: 'keep_page and plan: too many sessions from this network today.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postPaySessions
/pay/sessions/{code}/poll:
parameters:
- name: code
in: path
required: true
schema:
type: string
get:
tags:
- Provision
security: []
summary: Poll a pay session; returns the minted key (provision) or confirms the unlock…
responses:
'200':
description: Session status. Includes the stk_live_ API key once, on a completed provision.
content:
application/json:
schema:
type: object
operationId: getPaySessionsByCodePoll
/wallet-auth/challenge:
post:
tags:
- Provision
security: []
summary: Get a single-use challenge so the wallet that paid for a page can update it…
description: 'Public. Send { "wallet": "0x…" } (EVM, lowercase or checksummed). Returns { challenge, message, expires_at }: personal_sign (EIP-191) the message with that wallet, then send `Authorization: Wallet challenge=…,sig=0x…` on PUT /sites/{id}. One challenge per request, 5-minute TTL. 404 for a wallet with no pages here (pages are keyed to the wallet that PAID at publish time).'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- wallet
properties:
wallet:
type: string
description: The EVM address that paid at POST /publish (or is linked to the owning account).
responses:
'200':
description: Challenge issued.
content:
application/json:
schema:
type: object
properties:
challenge:
type: string
example: WAUTH-3F9K2M7Q1XZC
message:
type: string
description: Sign exactly this with personal_sign.
expires_at:
type: integer
description: Unix ms.
'404':
description: This wallet has no pages here.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: postWalletAuthChallenge
components:
schemas:
Error:
type: object
required:
- error
properties:
error:
type: string
description: Stable machine-readable error code.
error_description:
type: string
description: Human-readable detail (optional).
example:
error: auth required
securitySchemes:
bearerApiKey:
type: http
scheme: bearer
bearerFormat: API key (stk_live_…)
description: 'Long-lived API key, created from app.stacktr.ee, bought over x402 at POST /provision, or minted headlessly via the RFC 8628 device-code flow (POST /api-keys/device-code). Pass as `Authorization: Bearer stk_live_…`. Accepted on every REST route AND on the MCP transport at POST /mcp.'
walletSignature:
type: apiKey
in: header
name: Authorization
description: 'Keyless auth for the wallet that PAID for a page (x402 pay-per-publish): POST /wallet-auth/challenge {"wallet":"0x…"}, personal_sign (EIP-191) the returned message with that wallet, then send `Authorization: Wallet challenge=WAUTH-…,sig=0x…`. Single-use, 5-minute TTL, EVM EOA only. Scope: PUT /sites/{id} on pages carrying that payer_wallet (adopted pages while the wallet stays account-linked).'
claimToken:
type: apiKey
in: header
name: Authorization
description: 'Keyless auth for an UNCLAIMED page, using the `claim_token` that page''s own publish response returned: send `Authorization: Claim <claim_token>`. Works on any rail (no wallet, no signature), which is what a Solana x402 payer and a free anonymous publisher have. Scope is deliberately that one page: PUT /sites/{idOrSlug} replaces its content, DELETE /sites/{idOrSlug} takes it down for good (an unclaimed page has no account to restore it to), and GET /sites/{idOrSlug}/activity reads whether it was opened. Never another page, never claiming or settings. It stops working the moment the page is claimed (claiming rotates the token into the account), when the page expires, and for a blocked actor. Anonymous updates are rate limited per IP (RateLimit headers on every response) and require a direct client connection. Treat the token as being as sensitive as the page: anyone holding it can replace the content behind a link already sent to a client.'
oauth2:
type: oauth2
description: OAuth 2.1 with PKCE + Dynamic Client Registration (RFC 7591). Used by claude.ai connectors and other agent runtimes.
flows:
authorizationCode:
authorizationUrl: https://api.stacktr.ee/oauth/authorize
tokenUrl: https://api.stacktr.ee/oauth/token
refreshUrl: https://api.stacktr.ee/oauth/token
scopes:
sites:read: List and read site metadata.
sites:write: Create, update, and delete sites.
externalDocs:
description: Human-readable docs
url: https://stacktr.ee/docs
x-service-info:
categories:
- web
- storage
docs:
homepage: https://stacktr.ee
apiReference: https://api.stacktr.ee/openapi.json
llms: https://stacktr.ee/llms.txt
x-discovery:
ownershipProofs:
- '0x3ff8b9344028603569a7eab333dc9e50c4b62a1056c0814dfcf109d30f2bb44841a0e694a1697db648082192a71ca3b76c7cee3d8c7c696c0ae1f38ef8a8996f1c'