Widgets
Get Popup Runtime
Load the hosted JavaScript runtime for popup signup widgets.
GET
/
api
/
v1
/
widgets
/
popup.js
Get Popup Runtime
curl --request GET \
--url https://api.sequenzy.com/api/v1/widgets/popup.js \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/widgets/popup.js"
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/widgets/popup.js', 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/widgets/popup.js",
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/widgets/popup.js"
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/widgets/popup.js")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/widgets/popup.js")
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(function () {
"use strict";
// Popup runtime
})();
Get Popup Runtime
Load this public JavaScript file from your website to render popup signup widgets. The runtime readswindow.SequenzyPopupConfig and submits subscribers
through the public Forms API.
Request
This endpoint does not require authentication.curl "https://api.sequenzy.com/api/v1/widgets/popup.js"
Usage
<script>
window.SequenzyPopupConfig = {
companyId: "company_123",
apiBaseUrl: "https://api.sequenzy.com",
listMode: "all",
listIds: [],
tagIds: [],
templateId: "newsletter",
layout: "fullscreen",
trigger: { type: "delay", delaySeconds: 5 },
content: {
title: "Join the newsletter",
description: "Get practical updates delivered to your inbox.",
buttonText: "Subscribe",
successMessage: "Thanks for subscribing.",
badgeText: "Newsletter",
},
visual: { style: "accent", placement: "top" },
fields: { email: { placeholder: "you@example.com" } },
theme: {
accentColor: "#f97316",
backgroundColor: "#ffffff",
textColor: "#111827",
},
};
</script>
<script async src="https://api.sequenzy.com/api/v1/widgets/popup.js"></script>
Responses
(function () {
"use strict";
// Popup runtime
})();
Previous
Get Preferences TokenGenerate a signed token to embed the subscription preferences widget
Next
⌘I
Get Popup Runtime
curl --request GET \
--url https://api.sequenzy.com/api/v1/widgets/popup.js \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/widgets/popup.js"
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/widgets/popup.js', 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/widgets/popup.js",
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/widgets/popup.js"
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/widgets/popup.js")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/widgets/popup.js")
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(function () {
"use strict";
// Popup runtime
})();