Guides/How to deploy a landing page with lead capture

How to deploy a landing page with lead capture

Page for the pitch. Form for the leads.

Updated March 2026

Sutrena is the web runtime for AI agents. Combine a page and a form to create a complete landing page with lead capture. Deploy the page with your HTML, create a form for data collection, and embed the form in the page. Two API calls, one live landing page that collects emails. Perfect for product launches, event signups, and waitlists.

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. Create the form

Create a form with the fields you want to collect. Set uniqueBy to prevent duplicate signups from the same email address.

curl -X POST https://sutrena.com/api/forms \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Launch Waitlist",
    "fields": [
      { "name": "email", "label": "Email", "type": "email", "required": true },
      { "name": "name", "label": "Name", "type": "text", "required": false }
    ],
    "uniqueBy": ["email"]
  }'

# Response:
# {
#   "id": "frm_abc123",
#   "hostedUrl": "https://sutrena.com/f/frm_abc123"
# }

3. Deploy the landing page

Create a page with HTML that includes the Sutrena embed snippet. Replace FORM_ID with the form ID from the previous step. The embed script renders the form inline with its own styling and success message.

curl -X POST https://sutrena.com/api/pages \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "index",
    "title": "Join the Waitlist",
    "html": "<!DOCTYPE html><html><head><style>body{font-family:system-ui;max-width:640px;margin:4rem auto;padding:0 1rem;text-align:center}h1{font-size:2.5rem;margin-bottom:0.5rem}p{color:#666;font-size:1.2rem;margin-bottom:2rem}</style></head><body><h1>Something big is coming</h1><p>Be the first to know. Join the waitlist.</p><div data-sutrena-form=\"FORM_ID\"></div><script src=\"https://sutrena.com/embed.js\"></script></body></html>"
  }'

4. Add a webhook for notifications

Get notified every time someone signs up. Create a webhook pointing to a Slack incoming webhook URL. Use the slack template for formatted messages.

curl -X POST https://sutrena.com/api/webhooks \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "formId": "frm_abc123",
    "url": "https://hooks.slack.com/services/T00/B00/xxx",
    "template": "slack",
    "events": ["form.submission"]
  }'

FAQ

Can I style the embedded form?

The embed renders in an iframe with its own default styling. For full control, skip the embed and build a custom HTML form that POSTs to /api/forms/FORM_ID/submit. Your page, your CSS, same data collection.

How do I see submissions?

GET /api/forms/FORM_ID/submissions to list all submissions. You can also set up a webhook to get notified in Slack, Discord, or Telegram on each signup.

What is Sutrena?

Sutrena is the web runtime for AI agents. Forms, Pages, Analytics, Webhooks, Automations — all through 67 MCP tools and one REST API. Your agent creates web artifacts, humans interact with them, and your agent gets the data back. Use any one feature or all of them together.

Pages

Deploy HTML instantly

Forms

Collect structured data

Automations

DSL-based pipelines with 14 step types

Analytics

Privacy-first, no cookies

Webhooks

Slack, Discord, Telegram

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 anything — a page, form, automation, or analytics site

# Create a form
curl -X POST https://sutrena.com/api/forms \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{"name": "waitlist", "fields": [{"name": "email", "label": "Email", "type": "email", "required": true}]}'

# Or deploy a page
curl -X POST https://sutrena.com/api/pages \
  -H "Authorization: Bearer st_trial_xxx" \
  -H "Content-Type: application/json" \
  -d '{"slug": "index", "title": "My Site", "html": "<h1>Live</h1>"}'

Ready to build?

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

Deploy a landing page with lead capture — Sutrena | Sutrena