Emails
Update Email
Update email metadata or replace the email body.
PATCH
/
api
/
v1
/
emails
/
{emailId}
Update Email
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/emails/{emailId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"subject": "<string>",
"previewText": "<string>",
"html": "<string>",
"blocks": [
{}
]
}
'import requests
url = "https://api.sequenzy.com/api/v1/emails/{emailId}"
payload = {
"name": "<string>",
"subject": "<string>",
"previewText": "<string>",
"html": "<string>",
"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>',
subject: '<string>',
previewText: '<string>',
html: '<string>',
blocks: [{}]
})
};
fetch('https://api.sequenzy.com/api/v1/emails/{emailId}', 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/emails/{emailId}",
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>',
'subject' => '<string>',
'previewText' => '<string>',
'html' => '<string>',
'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/emails/{emailId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"html\": \"<string>\",\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/emails/{emailId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/emails/{emailId}")
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 \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"email": {
"id": "email_123",
"companyId": "company_123",
"name": "Welcome",
"subject": "Updated welcome",
"previewText": null,
"blocks": [{ "id": "block_123", "type": "text", "variant": "html", "content": "<p>Updated body</p>" }],
"createdAt": "2026-04-19T12:00:00.000Z",
"updatedAt": "2026-04-19T12:05:00.000Z"
}
}
{ "success": false, "error": "No supported fields provided" }
{
"success": false,
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "success": false, "error": "No company selected" }
{ "success": false, "error": "Email not found" }
{ "success": false, "error": "Internal server error" }
Update Email
You can update an email’s metadata and replace its body with either raw HTML or structured blocks.Request
Email ID.
Email name.
Email subject line.
Inbox preview text. Use
null to clear it.Raw HTML body. Provide either
html or blocks, not both.Structured email blocks. Provide either
blocks or html, not both. Put
block styling under styles; top-level style keys like backgroundColor,
backgroundOpacity, borderColor, borderWidth, and borderRadius are
normalized into styles.curl -X PATCH "https://api.sequenzy.com/api/v1/emails/email_123" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{"subject":"Updated welcome","html":"<p>Updated body</p>"}'
Responses
{
"success": true,
"email": {
"id": "email_123",
"companyId": "company_123",
"name": "Welcome",
"subject": "Updated welcome",
"previewText": null,
"blocks": [{ "id": "block_123", "type": "text", "variant": "html", "content": "<p>Updated body</p>" }],
"createdAt": "2026-04-19T12:00:00.000Z",
"updatedAt": "2026-04-19T12:05:00.000Z"
}
}
{ "success": false, "error": "No supported fields provided" }
{
"success": false,
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "success": false, "error": "No company selected" }
{ "success": false, "error": "Email not found" }
{ "success": false, "error": "Internal server error" }
⌘I
Update Email
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/emails/{emailId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"subject": "<string>",
"previewText": "<string>",
"html": "<string>",
"blocks": [
{}
]
}
'import requests
url = "https://api.sequenzy.com/api/v1/emails/{emailId}"
payload = {
"name": "<string>",
"subject": "<string>",
"previewText": "<string>",
"html": "<string>",
"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>',
subject: '<string>',
previewText: '<string>',
html: '<string>',
blocks: [{}]
})
};
fetch('https://api.sequenzy.com/api/v1/emails/{emailId}', 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/emails/{emailId}",
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>',
'subject' => '<string>',
'previewText' => '<string>',
'html' => '<string>',
'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/emails/{emailId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"html\": \"<string>\",\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/emails/{emailId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/emails/{emailId}")
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 \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"email": {
"id": "email_123",
"companyId": "company_123",
"name": "Welcome",
"subject": "Updated welcome",
"previewText": null,
"blocks": [{ "id": "block_123", "type": "text", "variant": "html", "content": "<p>Updated body</p>" }],
"createdAt": "2026-04-19T12:00:00.000Z",
"updatedAt": "2026-04-19T12:05:00.000Z"
}
}
{ "success": false, "error": "No supported fields provided" }
{
"success": false,
"error": "Missing API key. Provide via x-api-key header or Authorization: Bearer <key>"
}
{ "success": false, "error": "No company selected" }
{ "success": false, "error": "Email not found" }
{ "success": false, "error": "Internal server error" }