Widgets
Update Saved Form
Update a saved form’s name, audience, copy, theme, or content blocks
PATCH
/
api
/
v1
/
forms
/
{formId}
Update Saved Form
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/forms/{formId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"listIds": [
"<string>"
],
"tagIds": [
"<string>"
],
"duplicateStrategy": "<string>",
"headline": "<string>",
"description": "<string>",
"buttonText": "<string>",
"successMessage": "<string>",
"redirectUrl": "<string>",
"theme": {},
"blocks": [
{}
]
}
'import requests
url = "https://api.sequenzy.com/api/v1/forms/{formId}"
payload = {
"name": "<string>",
"listIds": ["<string>"],
"tagIds": ["<string>"],
"duplicateStrategy": "<string>",
"headline": "<string>",
"description": "<string>",
"buttonText": "<string>",
"successMessage": "<string>",
"redirectUrl": "<string>",
"theme": {},
"blocks": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
listIds: ['<string>'],
tagIds: ['<string>'],
duplicateStrategy: '<string>',
headline: '<string>',
description: '<string>',
buttonText: '<string>',
successMessage: '<string>',
redirectUrl: '<string>',
theme: {},
blocks: [{}]
})
};
fetch('https://api.sequenzy.com/api/v1/forms/{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/{formId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'listIds' => [
'<string>'
],
'tagIds' => [
'<string>'
],
'duplicateStrategy' => '<string>',
'headline' => '<string>',
'description' => '<string>',
'buttonText' => '<string>',
'successMessage' => '<string>',
'redirectUrl' => '<string>',
'theme' => [
],
'blocks' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/forms/{formId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"duplicateStrategy\": \"<string>\",\n \"headline\": \"<string>\",\n \"description\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"successMessage\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"theme\": {},\n \"blocks\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sequenzy.com/api/v1/forms/{formId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"duplicateStrategy\": \"<string>\",\n \"headline\": \"<string>\",\n \"description\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"successMessage\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"theme\": {},\n \"blocks\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/forms/{formId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"duplicateStrategy\": \"<string>\",\n \"headline\": \"<string>\",\n \"description\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"successMessage\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"theme\": {},\n \"blocks\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"form": {
"id": "form_123",
"name": "Blog newsletter",
"status": "published",
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123"
},
"embed": {
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123",
"scriptUrl": "https://api.sequenzy.com/api/v1/forms/form_123/embed.js"
},
"message": "Form updated."
}
{ "error": "Forms must contain exactly one email field." }
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "error": "API key is missing required scope: widgets:write" }
{ "error": "Form not found" }
{ "error": "Failed to update form." }
Update an existing saved form. Every field is optional - send only what should
change. Use this to retarget the audience, edit copy, restyle the form to
match your brand, or replace the content blocks (for example to remove blocks
you no longer want rendered publicly).
Request
string
required
Saved form ID.
string
New internal form name.
string[]
Replacement list targeting. Every submission joins these lists.
string[]
Replacement tag IDs. Pass an empty array to clear tags.
string
skip, merge, or overwrite.string
New text for the form’s first heading block. Fails if the form has no heading
block - edit
blocks instead.string
New text for the form’s first paragraph block. Fails if the form has no
paragraph block - edit
blocks instead.string
New submit button label.
string
New confirmation message on the success screen.
string
HTTP or HTTPS success redirect. Pass an empty string to switch back to the
confirmation message.
object
Visual overrides merged into the current theme. Any subset of
accentColor,
backgroundColor, textColor, mutedTextColor, cardColor, borderColor
(all #rrggbb), borderRadius (0-32), headingFontFamily, bodyFontFamily,
and density (compact | balanced | spacious).object[]
Full replacement for the form’s content blocks. Read the current blocks with
GET /api/v1/forms, modify them, and send the complete array. The form must
keep exactly one email field and one submit button.curl -X PATCH "https://api.sequenzy.com/api/v1/forms/form_123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"buttonText": "Get the planner",
"theme": { "accentColor": "#0f766e" }
}'
Responses
{
"success": true,
"form": {
"id": "form_123",
"name": "Blog newsletter",
"status": "published",
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123"
},
"embed": {
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123",
"scriptUrl": "https://api.sequenzy.com/api/v1/forms/form_123/embed.js"
},
"message": "Form updated."
}
{ "error": "Forms must contain exactly one email field." }
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "error": "API key is missing required scope: widgets:write" }
{ "error": "Form not found" }
{ "error": "Failed to update form." }
⌘I
Update Saved Form
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/forms/{formId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"listIds": [
"<string>"
],
"tagIds": [
"<string>"
],
"duplicateStrategy": "<string>",
"headline": "<string>",
"description": "<string>",
"buttonText": "<string>",
"successMessage": "<string>",
"redirectUrl": "<string>",
"theme": {},
"blocks": [
{}
]
}
'import requests
url = "https://api.sequenzy.com/api/v1/forms/{formId}"
payload = {
"name": "<string>",
"listIds": ["<string>"],
"tagIds": ["<string>"],
"duplicateStrategy": "<string>",
"headline": "<string>",
"description": "<string>",
"buttonText": "<string>",
"successMessage": "<string>",
"redirectUrl": "<string>",
"theme": {},
"blocks": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
listIds: ['<string>'],
tagIds: ['<string>'],
duplicateStrategy: '<string>',
headline: '<string>',
description: '<string>',
buttonText: '<string>',
successMessage: '<string>',
redirectUrl: '<string>',
theme: {},
blocks: [{}]
})
};
fetch('https://api.sequenzy.com/api/v1/forms/{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/{formId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'listIds' => [
'<string>'
],
'tagIds' => [
'<string>'
],
'duplicateStrategy' => '<string>',
'headline' => '<string>',
'description' => '<string>',
'buttonText' => '<string>',
'successMessage' => '<string>',
'redirectUrl' => '<string>',
'theme' => [
],
'blocks' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/forms/{formId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"duplicateStrategy\": \"<string>\",\n \"headline\": \"<string>\",\n \"description\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"successMessage\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"theme\": {},\n \"blocks\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sequenzy.com/api/v1/forms/{formId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"duplicateStrategy\": \"<string>\",\n \"headline\": \"<string>\",\n \"description\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"successMessage\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"theme\": {},\n \"blocks\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/forms/{formId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"tagIds\": [\n \"<string>\"\n ],\n \"duplicateStrategy\": \"<string>\",\n \"headline\": \"<string>\",\n \"description\": \"<string>\",\n \"buttonText\": \"<string>\",\n \"successMessage\": \"<string>\",\n \"redirectUrl\": \"<string>\",\n \"theme\": {},\n \"blocks\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"form": {
"id": "form_123",
"name": "Blog newsletter",
"status": "published",
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123"
},
"embed": {
"actionUrl": "https://api.sequenzy.com/api/v1/forms/form_123",
"scriptUrl": "https://api.sequenzy.com/api/v1/forms/form_123/embed.js"
},
"message": "Form updated."
}
{ "error": "Forms must contain exactly one email field." }
{
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "error": "API key is missing required scope: widgets:write" }
{ "error": "Form not found" }
{ "error": "Failed to update form." }