Landing pages
Publish a hosted page with your sign-up form, set its search details, watch visits and sign-ups, and group pages into a site.
A landing page is a hosted web page built from blocks, with an optional form under them.
What you need first
A published form, if the page collects sign-ups (see Sign-up forms).
A key with
forms:write.
1. Create the page
curl -s -X POST "$BASE/v1/landing-pages" \
-H "Authorization: Bearer $HERMETICA_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"Webinar: Bring your own provider","slug":"webinar-byo-provider","locale":"en",
"seoTitle":"Webinar: send through the provider you already use",
"seoDescription":"A 30-minute walkthrough on 19 November. Save your seat.",
"formId":"<formId>",
"doc":{"blocks":[
{"type":"text","html":"<h1>Bring your own provider</h1><p>A 30-minute walkthrough on 19 November.</p>"},
{"type":"image","src":"https://example.com/webinar.png","alt":"Webinar host"}]}}'slugis lowercase letters, digits and dashes. It is the end of the page address.Blocks are the same as in email templates:
text,image,button,columns,section,dividerand more.noindex: truekeeps the page out of search engines.
2. Publish it
curl -s -X POST "$BASE/v1/landing-pages/<pageId>/publish" -H "Authorization: Bearer $HERMETICA_API_KEY"The page is live at the url in the answer: $BASE/p/l/<workspaceId>.webinar-byo-provider. Later edits stay in a draft until you publish again.
3. See how it does
curl -s "$BASE/v1/landing-pages/<pageId>/analytics" -H "Authorization: Bearer $HERMETICA_API_KEY"
# {"visits":..., "signups":..., "conversion":...}
curl -s "$BASE/v1/landing-pages/<pageId>/analytics/daily?days=30" -H "Authorization: Bearer $HERMETICA_API_KEY"
curl -s "$BASE/v1/landing-pages/<pageId>/seo" -H "Authorization: Bearer $HERMETICA_API_KEY"4. Group pages into a site
curl -s -X POST "$BASE/v1/page-sites" \
-H "Authorization: Bearer $HERMETICA_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"Example Co events","menu":[{"label":"Webinar","pageId":"<pageId>"}]}'Every page in the site shows the same menu.
Other options
redirect: {"url":"https://example.com/recording","status":302}sends visitors elsewhere, for example once the webinar is over.unpublishAttakes the page down at a set time.
Next: Monthly newsletter.