Widgets
Get Saved Form Embed
Get client-safe embed recipes for a published saved form
GET
/
api
/
v1
/
forms
/
embed
/
{formId}
Get Saved Form Embed
curl --request GET \
--url https://api.sequenzy.com/api/v1/forms/embed/{formId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/forms/embed/{formId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/forms/embed/{formId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/forms/embed/{formId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/forms/embed/{formId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sequenzy.com/api/v1/forms/embed/{formId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/forms/embed/{formId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"form": {
"id": "form_123",
"name": "Blog newsletter",
"status": "published"
},
"embed": {
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123",
"scriptUrl": "https://api.sequenzy.com/api/v1/forms/form_123/embed.js",
"javascript": "<script async src=\"https://api.sequenzy.com/api/v1/forms/form_123/embed.js\"></script>",
"placeholder": "<div data-sequenzy-form=\"form_123\"></div>",
"nativeForm": "<form id=\"sequenzy-signup\" action=\"https://api.sequenzy.com/api/v1/forms/form_123\" method=\"post\">...</form>",
"fetch": "const form = document.querySelector(\"#sequenzy-signup\"); ...",
"supportedPlatforms": ["Astro", "Hugo", "Jekyll", "Cloudflare Pages", "Netlify", "GitHub Pages"],
"recommendedSnippet": "javascript",
"reducedProtectionWarning": "Plain HTML and fetch code can't run Sequenzy's spam protection, so bots can submit the form freely and add fake or stolen addresses to your list. Use the script embed unless your site can't run scripts."
}
}
{ "error": "Publish the form before requesting public embed code." }
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "error": "API key is missing required scope: widgets:read" }
{ "error": "Form not found" }
Return the public action URL, hosted JavaScript, minimal native form, and fetch
enhancement for a saved form owned by your selected workspace.
Install
javascript (the recommendedSnippet) wherever the page can run a
script tag. It is the only snippet that carries Sequenzy’s spam protection: the
signed signup token and, with bot protection on, the bot check. nativeForm
and fetch are for pages that cannot run scripts; show the person installing
them reducedProtectionWarning, which is worded for the form’s current bot
protection setting.
The form appears right after the javascript script tag. When the script has
to load somewhere else, such as the page head, a tag manager or a site-wide
layout, put placeholder where the form should appear and the script fills
it. Each script tag fills one placeholder.
For a Webflow-connected workspace, this returns
embed.disabled: true, a
reason, and the native Webflow settings path instead of custom code.curl "https://api.sequenzy.com/api/v1/forms/embed/form_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Responses
{
"success": true,
"form": {
"id": "form_123",
"name": "Blog newsletter",
"status": "published"
},
"embed": {
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123",
"scriptUrl": "https://api.sequenzy.com/api/v1/forms/form_123/embed.js",
"javascript": "<script async src=\"https://api.sequenzy.com/api/v1/forms/form_123/embed.js\"></script>",
"placeholder": "<div data-sequenzy-form=\"form_123\"></div>",
"nativeForm": "<form id=\"sequenzy-signup\" action=\"https://api.sequenzy.com/api/v1/forms/form_123\" method=\"post\">...</form>",
"fetch": "const form = document.querySelector(\"#sequenzy-signup\"); ...",
"supportedPlatforms": ["Astro", "Hugo", "Jekyll", "Cloudflare Pages", "Netlify", "GitHub Pages"],
"recommendedSnippet": "javascript",
"reducedProtectionWarning": "Plain HTML and fetch code can't run Sequenzy's spam protection, so bots can submit the form freely and add fake or stolen addresses to your list. Use the script embed unless your site can't run scripts."
}
}
{ "error": "Publish the form before requesting public embed code." }
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "error": "API key is missing required scope: widgets:read" }
{ "error": "Form not found" }
⌘I
Get Saved Form Embed
curl --request GET \
--url https://api.sequenzy.com/api/v1/forms/embed/{formId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/forms/embed/{formId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/forms/embed/{formId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/forms/embed/{formId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/forms/embed/{formId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sequenzy.com/api/v1/forms/embed/{formId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/forms/embed/{formId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"form": {
"id": "form_123",
"name": "Blog newsletter",
"status": "published"
},
"embed": {
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123",
"scriptUrl": "https://api.sequenzy.com/api/v1/forms/form_123/embed.js",
"javascript": "<script async src=\"https://api.sequenzy.com/api/v1/forms/form_123/embed.js\"></script>",
"placeholder": "<div data-sequenzy-form=\"form_123\"></div>",
"nativeForm": "<form id=\"sequenzy-signup\" action=\"https://api.sequenzy.com/api/v1/forms/form_123\" method=\"post\">...</form>",
"fetch": "const form = document.querySelector(\"#sequenzy-signup\"); ...",
"supportedPlatforms": ["Astro", "Hugo", "Jekyll", "Cloudflare Pages", "Netlify", "GitHub Pages"],
"recommendedSnippet": "javascript",
"reducedProtectionWarning": "Plain HTML and fetch code can't run Sequenzy's spam protection, so bots can submit the form freely and add fake or stolen addresses to your list. Use the script embed unless your site can't run scripts."
}
}
{ "error": "Publish the form before requesting public embed code." }
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "error": "API key is missing required scope: widgets:read" }
{ "error": "Form not found" }