Email Blocks
List Email Block Types
List every email block type with its required and optional fields.
GET
/
api
/
v1
/
email-blocks
List Email Block Types
curl --request GET \
--url https://api.sequenzy.com/api/v1/email-blocks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/email-blocks"
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/email-blocks', 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/email-blocks",
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/email-blocks"
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/email-blocks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/email-blocks")
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,
"blockTypes": [
{
"type": "list",
"creatable": true,
"required": ["variant", "items"],
"optional": ["id", "color", "styles", "conditions"],
"fields": [
{
"name": "variant",
"required": true,
"type": "enum",
"values": ["bullet", "numbered", "checklist"]
},
{
"name": "items",
"required": true,
"type": "array",
"itemFields": [
{ "name": "id", "required": false, "type": "string" },
{ "name": "content", "required": true, "type": "string" },
{ "name": "color", "required": false, "type": "string" }
]
}
],
"example": {
"type": "list",
"variant": "bullet",
"items": [{ "content": "First point" }, { "content": "Second point" }]
},
"notes": ["Variants: \"bullet\", \"numbered\", or \"checklist\"."]
}
]
}
{
"success": false,
"error": "Invalid API key"
}
List Email Block Types
You can list every block type accepted by theblocks array on campaigns, sequence email steps, templates, transactional emails, and email components. Each entry names the required and optional fields, the allowed values of every enum field, and the shape of nested item arrays.
This reference is derived from the same schemas that validate a write, so it cannot drift from what those endpoints accept.
Request
string
Pass
true to hide structural block types the editor manages for you, such as
conditional-group and footer.curl "https://api.sequenzy.com/api/v1/email-blocks?creatableOnly=true" \
-H "Authorization: Bearer API_KEY"
Responses
{
"success": true,
"blockTypes": [
{
"type": "list",
"creatable": true,
"required": ["variant", "items"],
"optional": ["id", "color", "styles", "conditions"],
"fields": [
{
"name": "variant",
"required": true,
"type": "enum",
"values": ["bullet", "numbered", "checklist"]
},
{
"name": "items",
"required": true,
"type": "array",
"itemFields": [
{ "name": "id", "required": false, "type": "string" },
{ "name": "content", "required": true, "type": "string" },
{ "name": "color", "required": false, "type": "string" }
]
}
],
"example": {
"type": "list",
"variant": "bullet",
"items": [{ "content": "First point" }, { "content": "Second point" }]
},
"notes": ["Variants: \"bullet\", \"numbered\", or \"checklist\"."]
}
]
}
{
"success": false,
"error": "Invalid API key"
}
Authoring notes
Lists are their own block type rather than a text variant. Atext block accepts only variant: "paragraph", "lead", or "html", and never accepts items.
{ "type": "list", "variant": "numbered", "items": [{ "content": "First" }] }
{ "type": "steps", "variant": "numbered", "items": [{ "title": "Step one", "description": "What happens" }, { "title": "Step two", "description": "What happens next" }] }
list for a plain numbered or bulleted list, and steps for a visual numbered walkthrough. List items carry content; steps items carry title and an optional description.
Related
⌘I
List Email Block Types
curl --request GET \
--url https://api.sequenzy.com/api/v1/email-blocks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/email-blocks"
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/email-blocks', 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/email-blocks",
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/email-blocks"
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/email-blocks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/email-blocks")
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,
"blockTypes": [
{
"type": "list",
"creatable": true,
"required": ["variant", "items"],
"optional": ["id", "color", "styles", "conditions"],
"fields": [
{
"name": "variant",
"required": true,
"type": "enum",
"values": ["bullet", "numbered", "checklist"]
},
{
"name": "items",
"required": true,
"type": "array",
"itemFields": [
{ "name": "id", "required": false, "type": "string" },
{ "name": "content", "required": true, "type": "string" },
{ "name": "color", "required": false, "type": "string" }
]
}
],
"example": {
"type": "list",
"variant": "bullet",
"items": [{ "content": "First point" }, { "content": "Second point" }]
},
"notes": ["Variants: \"bullet\", \"numbered\", or \"checklist\"."]
}
]
}
{
"success": false,
"error": "Invalid API key"
}