Guides/How to deploy a page via API

How to deploy a page via API

POST HTML. Get a URL. That is it.

Updated March 2026

Sutrena is the web runtime for AI agents. Sutrena Pages let your agent deploy HTML to a public URL with one API call. No hosting provider, no build pipeline, no Git. POST your HTML, get a URL back. Update it anytime with PUT. This is useful for AI agents that need to publish content to the web (Claude Code, Cursor, LangGraph, AutoGen, n8n), for developers who want to deploy microsites without infrastructure, and for anyone who wants a page live in seconds. Pages are one of Sutrena's three core primitives alongside Forms and Dashboards.

1. Get an API key

Use the free plan (sign up at sutrena.com) or get a trial key instantly with no signup.

curl -X POST https://sutrena.com/api/trial

2. Deploy a page

POST your HTML to /api/pages. You get back a page ID and a public URL. The HTML is served as-is -- include styles, scripts, images, whatever you need.

curl -X POST https://sutrena.com/api/pages   -H "Authorization: Bearer $KEY"   -H "Content-Type: application/json"   -d '{"slug": "hello", "title": "Hello World", "html": "<h1>Hello World</h1><p>Deployed via API.</p>"}'

3. Update the page

PUT to /api/pages/{id} with new HTML. The URL stays the same. Updates are instant.

curl -X PUT https://sutrena.com/api/pages/PAGE_ID   -H "Authorization: Bearer $KEY"   -H "Content-Type: application/json"   -d '{"html": "<h1>Updated</h1><p>New content, same URL.</p>"}'

4. Combine with a form

Deploy a page that includes a Sutrena form embed. Now you have a complete landing page that collects data, all through the API.

curl -X POST https://sutrena.com/api/pages   -H "Authorization: Bearer $KEY"   -H "Content-Type: application/json"   -d '{"slug": "landing", "title": "Sign Up", "html": "<h1>Join the waitlist</h1><div data-sutrena-form="FORM_ID"></div><script src="https://sutrena.com/embed.js"></script>"}'

FAQ

What kind of HTML can I deploy?

Any valid HTML. Static pages, single-page apps, pages with inline JavaScript, CSS, and external scripts. External scripts over HTTPS, fetch to any API, and iframes from any origin all work. You can embed Stripe.js, analytics, payment widgets, or any third-party SDK. Images load from anywhere.

Can I use a custom domain?

Yes. Set up a custom subdomain (alice.sutrena.com) on any plan, or add your own domain via CNAME on Builder+. See the custom subdomain guide and custom domain guide.

How many pages can I deploy?

Free: 10 projects (forms, pages, and dashboards combined). Builder: 50 projects. Pro: 200 projects. Scale: unlimited.

Can an AI agent deploy pages?

Yes. POST /api/pages with HTML. The agent gets a URL back. Works through the REST API or MCP tools.

Is there a size limit on page HTML?

Reasonable limits apply. A typical landing page is well within bounds. If you are deploying megabytes of HTML, consider a CDN.

What is Sutrena?

Sutrena is the web runtime for AI agents. Three primitives — pages, forms, and dashboards — accessible through one API. Your agent creates web artifacts, humans interact with them, and your agent gets the data back. Framework-agnostic. Works from any MCP client or HTTP client.

Get started in two API calls

1. Get a trial key (no auth, no signup)

curl -X POST https://sutrena.com/api/trial

2. Create a form + dashboard from a template

curl -X POST https://sutrena.com/api/forms \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{"templateId": "waitlist", "createDashboard": true}'

Ready to build?

Get a trial API key instantly with no signup, or create an account for the full experience.

How to deploy a page via API -- Sutrena | Sutrena