Transactional
Create Transactional Email
Create a saved transactional email template
POST
/
api
/
v1
/
transactional
Create Transactional Email
curl --request POST \
--url https://api.sequenzy.com/api/v1/transactional \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"subject": "<string>",
"previewText": "<string>",
"prompt": "<string>",
"style": "<string>",
"tone": "<string>",
"html": "<string>",
"blocks": [
{}
],
"enabled": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/transactional"
payload = {
"name": "<string>",
"slug": "<string>",
"subject": "<string>",
"previewText": "<string>",
"prompt": "<string>",
"style": "<string>",
"tone": "<string>",
"html": "<string>",
"blocks": [{}],
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
subject: '<string>',
previewText: '<string>',
prompt: '<string>',
style: '<string>',
tone: '<string>',
html: '<string>',
blocks: [{}],
enabled: true
})
};
fetch('https://api.sequenzy.com/api/v1/transactional', 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/transactional",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'subject' => '<string>',
'previewText' => '<string>',
'prompt' => '<string>',
'style' => '<string>',
'tone' => '<string>',
'html' => '<string>',
'blocks' => [
[
]
],
'enabled' => true
]),
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/transactional"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"tone\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ],\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.sequenzy.com/api/v1/transactional")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"tone\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ],\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/transactional")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"tone\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ],\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"transactional": {
"id": "txn_abc123",
"name": "Password Reset",
"slug": "password-reset",
"emailId": "email_abc123",
"enabled": true,
"subject": "Reset your password, {{NAME}}",
"previewText": "Use this link to reset your password.",
"blocks": [
{
"id": "block_123",
"type": "text",
"content": "<p>Reset link: {{RESET_URL}}</p>",
"variant": "html"
}
],
"variables": ["NAME", "RESET_URL"],
"createdAt": "2026-05-01T10:30:00Z",
"updatedAt": "2026-05-01T10:30:00Z"
}
}
{
"success": false,
"error": "Provide exactly one of prompt, html, or blocks."
}
{
"success": false,
"error": "No sender profile configured. Please create a sender profile first."
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A transactional email with slug \"password-reset\" already exists"
}
{
"success": false,
"error": "Internal server error"
}
Create a transactional email template with exactly one content source:
prompt for Sequenzy-generated transactional blocks, blocks for finished caller-supplied content, or html for preserved/imported markup. Prompt-created templates default to disabled; explicit HTML or blocks retain the compatibility default of enabled. Generated transactional footers omit unsubscribe treatment.
Request
string
required
Transactional email name.
string
API slug used when sending by slug. If omitted, Sequenzy generates one from
the name.
string
Email subject line. Required with
html or blocks; optional with prompt,
where it overrides the generated subject.string
Optional preview override. With
prompt, the generated preview is used when
this field is omitted. Pass null to suppress preview text.string
Natural-language request for Sequenzy to generate branded transactional blocks
with a footer that omits unsubscribe treatment.
string
Optional generation style. Valid only with
prompt.string
Optional generation tone. Valid only with
prompt.string
Raw HTML body. Provide either
html or blocks, not both.array
Sequenzy 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.boolean
Whether this transactional email can be sent immediately. Defaults to
false
with prompt and true with explicit html or blocks.curl -X POST "https://api.sequenzy.com/api/v1/transactional" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Password Reset",
"slug": "password-reset",
"prompt": "Write a concise password reset email using {{RESET_URL}}"
}'
curl -X POST "https://api.sequenzy.com/api/v1/transactional" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Password Reset",
"slug": "password-reset",
"subject": "Reset your password, {{NAME}}",
"previewText": "Use this link to reset your password.",
"html": "<p>Reset link: {{RESET_URL}}</p>"
}'
Responses
{
"success": true,
"transactional": {
"id": "txn_abc123",
"name": "Password Reset",
"slug": "password-reset",
"emailId": "email_abc123",
"enabled": true,
"subject": "Reset your password, {{NAME}}",
"previewText": "Use this link to reset your password.",
"blocks": [
{
"id": "block_123",
"type": "text",
"content": "<p>Reset link: {{RESET_URL}}</p>",
"variant": "html"
}
],
"variables": ["NAME", "RESET_URL"],
"createdAt": "2026-05-01T10:30:00Z",
"updatedAt": "2026-05-01T10:30:00Z"
}
}
{
"success": false,
"error": "Provide exactly one of prompt, html, or blocks."
}
{
"success": false,
"error": "No sender profile configured. Please create a sender profile first."
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A transactional email with slug \"password-reset\" already exists"
}
{
"success": false,
"error": "Internal server error"
}
Previous
List Transactional EmailsSearch, filter, and sort transactional templates with their email subjects and delivery metrics.
Next
⌘I
Create Transactional Email
curl --request POST \
--url https://api.sequenzy.com/api/v1/transactional \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"subject": "<string>",
"previewText": "<string>",
"prompt": "<string>",
"style": "<string>",
"tone": "<string>",
"html": "<string>",
"blocks": [
{}
],
"enabled": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/transactional"
payload = {
"name": "<string>",
"slug": "<string>",
"subject": "<string>",
"previewText": "<string>",
"prompt": "<string>",
"style": "<string>",
"tone": "<string>",
"html": "<string>",
"blocks": [{}],
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
subject: '<string>',
previewText: '<string>',
prompt: '<string>',
style: '<string>',
tone: '<string>',
html: '<string>',
blocks: [{}],
enabled: true
})
};
fetch('https://api.sequenzy.com/api/v1/transactional', 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/transactional",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'subject' => '<string>',
'previewText' => '<string>',
'prompt' => '<string>',
'style' => '<string>',
'tone' => '<string>',
'html' => '<string>',
'blocks' => [
[
]
],
'enabled' => true
]),
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/transactional"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"tone\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ],\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.sequenzy.com/api/v1/transactional")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"tone\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ],\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/transactional")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"subject\": \"<string>\",\n \"previewText\": \"<string>\",\n \"prompt\": \"<string>\",\n \"style\": \"<string>\",\n \"tone\": \"<string>\",\n \"html\": \"<string>\",\n \"blocks\": [\n {}\n ],\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"transactional": {
"id": "txn_abc123",
"name": "Password Reset",
"slug": "password-reset",
"emailId": "email_abc123",
"enabled": true,
"subject": "Reset your password, {{NAME}}",
"previewText": "Use this link to reset your password.",
"blocks": [
{
"id": "block_123",
"type": "text",
"content": "<p>Reset link: {{RESET_URL}}</p>",
"variant": "html"
}
],
"variables": ["NAME", "RESET_URL"],
"createdAt": "2026-05-01T10:30:00Z",
"updatedAt": "2026-05-01T10:30:00Z"
}
}
{
"success": false,
"error": "Provide exactly one of prompt, html, or blocks."
}
{
"success": false,
"error": "No sender profile configured. Please create a sender profile first."
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "A transactional email with slug \"password-reset\" already exists"
}
{
"success": false,
"error": "Internal server error"
}