Ship confidently. Preview before you publish. One account, multiple environments.
Updated March 2026
Use Sutrena subdomains as separate environments for your site. Deploy to a staging subdomain, preview changes, then promote to production by switching your custom domain — no DNS changes, no downtime. This pattern works for any static site, landing page, or form-backed app.
1. Create subdomains for each environment
Create separate subdomains for production, staging, and preview. Each subdomain is an independent site with its own pages. Subdomains are unlimited on all plans.
# Create production subdomain
curl -X POST https://sutrena.com/api/account/subdomains \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"name": "myapp"}'
# Create staging subdomain
curl -X POST https://sutrena.com/api/account/subdomains \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"name": "myapp-staging"}'
# Create preview subdomain
curl -X POST https://sutrena.com/api/account/subdomains \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"name": "myapp-preview"}'2. Deploy pages to your staging subdomain
Build and test on staging first. Deploy pages using the subdomainId from the staging subdomain. Your staging site is immediately live at myapp-staging.sutrena.com.
# Get your subdomain IDs
curl https://sutrena.com/api/account/subdomains \
-H "Authorization: Bearer $KEY"
# Deploy to staging
curl -X POST https://sutrena.com/api/pages \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "index",
"title": "My App",
"html": "<h1>Welcome to My App</h1><p>New feature goes here</p>",
"subdomainId": "STAGING_SUBDOMAIN_ID"
}'3. Preview and verify at the staging URL
Visit myapp-staging.sutrena.com to review your changes. Share the staging URL with teammates for review. Each environment is fully isolated — changes to staging never affect production.
4. Promote to production
When you are ready, deploy the same pages to your production subdomain. You can copy pages between subdomains, or redeploy from your build pipeline targeting the production subdomainId.
# Deploy the same content to production
curl -X POST https://sutrena.com/api/pages \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"slug": "index",
"title": "My App",
"html": "<h1>Welcome to My App</h1><p>New feature goes here</p>",
"subdomainId": "PROD_SUBDOMAIN_ID"
}'5. Point your custom domain to the production subdomain
Add your custom domain and link it to the production subdomain. Your site is now live at both myapp.sutrena.com and myapp.com. The CNAME only needs to be set up once — after that, switching environments is instant via the API.
# Add custom domain linked to production subdomain
curl -X POST https://sutrena.com/api/account/domains \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "myapp.com",
"subdomainId": "PROD_SUBDOMAIN_ID"
}'
# Add staging custom domain (optional)
curl -X POST https://sutrena.com/api/account/domains \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{
"domain": "staging.myapp.com",
"subdomainId": "STAGING_SUBDOMAIN_ID"
}'6. Instant rollback or environment switching
The real power: switch which subdomain a custom domain serves from with one API call. No DNS changes, no propagation wait. Point myapp.com to your staging subdomain for a canary deploy, or back to production for an instant rollback.
# Switch myapp.com to serve from staging (canary deploy)
curl -X PATCH https://sutrena.com/api/account/domains/DOMAIN_ID \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"subdomainId": "STAGING_SUBDOMAIN_ID"}'
# Rollback: switch myapp.com back to production
curl -X PATCH https://sutrena.com/api/account/domains/DOMAIN_ID \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"subdomainId": "PROD_SUBDOMAIN_ID"}'No. Subdomains are unlimited on all plans, including the free plan. Create as many environments as you need.
No. You can use the free subdomain URLs (myapp-staging.sutrena.com) for non-production environments. Custom domains are optional and primarily useful for your production site. If you want staging.myapp.com, that counts toward your domain quota.
Instant. PATCH /api/account/domains/:id changes the subdomain association immediately. No DNS propagation, no SSL re-provisioning. The next request to your domain serves from the new subdomain.
Yes. Agents can use sutrena_create_subdomain, sutrena_create_page, and sutrena_update_custom_domain to build a full deploy pipeline. Deploy to a preview subdomain, verify, then switch the production domain — all via API or MCP tools.
Forms are account-level, not subdomain-level. If you embed a form on pages across different subdomains, they all submit to the same form and share the same submissions. Use separate forms per environment if you need isolated test data.
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.
1. Get a trial key (no auth, no signup)
curl -X POST https://sutrena.com/api/trial2. 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}'Get a trial API key instantly with no signup, or create an account for the full experience.