Generation
Generate Sequence (Deprecated)
Deprecated compatibility alias that creates a disabled AI-generated sequence draft
POST
/
api
/
v1
/
generate
/
sequence
Generate Sequence (Deprecated)
curl --request POST \
--url https://api.sequenzy.com/api/v1/generate/sequence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"goal": "<string>",
"name": "<string>",
"listId": "<string>",
"emailCount": 123,
"durationDays": 123
}
'import requests
url = "https://api.sequenzy.com/api/v1/generate/sequence"
payload = {
"goal": "<string>",
"name": "<string>",
"listId": "<string>",
"emailCount": 123,
"durationDays": 123
}
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({
goal: '<string>',
name: '<string>',
listId: '<string>',
emailCount: 123,
durationDays: 123
})
};
fetch('https://api.sequenzy.com/api/v1/generate/sequence', 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/generate/sequence",
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([
'goal' => '<string>',
'name' => '<string>',
'listId' => '<string>',
'emailCount' => 123,
'durationDays' => 123
]),
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/generate/sequence"
payload := strings.NewReader("{\n \"goal\": \"<string>\",\n \"name\": \"<string>\",\n \"listId\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123\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/generate/sequence")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"goal\": \"<string>\",\n \"name\": \"<string>\",\n \"listId\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/generate/sequence")
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 \"goal\": \"<string>\",\n \"name\": \"<string>\",\n \"listId\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"deprecated": true,
"deprecationMessage": "POST /api/v1/generate/sequence is deprecated. Use POST /api/v1/sequences with goal-based creation.",
"sequence": {
"id": "seq_123",
"name": "Workspace onboarding",
"status": "draft",
"trigger": "trigger_list",
"emailCount": 3,
"enrichmentStatus": "processing"
},
"message": "Sequence created. AI is generating email content based on your brand. This typically takes 30-60 seconds."
}
{
"error": "emailCount must be a positive integer"
}
{
"error": "emailCount must be no more than 10"
}
{
"error": "Invalid API key"
}
{
"error": "No companies found. Create a company first using the create_company tool."
}
{
"error": "Failed to create sequence"
}
Generate Sequence (Deprecated)
This endpoint is deprecated. Use
POST /api/v1/sequences with name,
trigger, and goal for new integrations.contact_added trigger.
The endpoint remains as a compatibility alias; it returns Deprecation: true
and a successor Link header. It never enables the sequence.
Request
The sequence goal or desired subscriber journey.
Optional sequence name. Defaults to a normalized version of
goal.Optional list ID that scopes the
contact_added trigger.Number of emails to generate. Defaults to
5. Maximum is 10.Duration used to space suggested delays. Defaults to
14.curl -X POST "https://api.sequenzy.com/api/v1/generate/sequence" \
-H "Authorization: Bearer seq_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Workspace onboarding",
"goal": "Onboard a new workspace admin",
"emailCount": 3,
"durationDays": 7
}'
Responses
{
"success": true,
"deprecated": true,
"deprecationMessage": "POST /api/v1/generate/sequence is deprecated. Use POST /api/v1/sequences with goal-based creation.",
"sequence": {
"id": "seq_123",
"name": "Workspace onboarding",
"status": "draft",
"trigger": "trigger_list",
"emailCount": 3,
"enrichmentStatus": "processing"
},
"message": "Sequence created. AI is generating email content based on your brand. This typically takes 30-60 seconds."
}
{
"error": "emailCount must be a positive integer"
}
{
"error": "emailCount must be no more than 10"
}
{
"error": "Invalid API key"
}
{
"error": "No companies found. Create a company first using the create_company tool."
}
{
"error": "Failed to create sequence"
}
⌘I
Generate Sequence (Deprecated)
curl --request POST \
--url https://api.sequenzy.com/api/v1/generate/sequence \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"goal": "<string>",
"name": "<string>",
"listId": "<string>",
"emailCount": 123,
"durationDays": 123
}
'import requests
url = "https://api.sequenzy.com/api/v1/generate/sequence"
payload = {
"goal": "<string>",
"name": "<string>",
"listId": "<string>",
"emailCount": 123,
"durationDays": 123
}
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({
goal: '<string>',
name: '<string>',
listId: '<string>',
emailCount: 123,
durationDays: 123
})
};
fetch('https://api.sequenzy.com/api/v1/generate/sequence', 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/generate/sequence",
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([
'goal' => '<string>',
'name' => '<string>',
'listId' => '<string>',
'emailCount' => 123,
'durationDays' => 123
]),
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/generate/sequence"
payload := strings.NewReader("{\n \"goal\": \"<string>\",\n \"name\": \"<string>\",\n \"listId\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123\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/generate/sequence")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"goal\": \"<string>\",\n \"name\": \"<string>\",\n \"listId\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/generate/sequence")
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 \"goal\": \"<string>\",\n \"name\": \"<string>\",\n \"listId\": \"<string>\",\n \"emailCount\": 123,\n \"durationDays\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"deprecated": true,
"deprecationMessage": "POST /api/v1/generate/sequence is deprecated. Use POST /api/v1/sequences with goal-based creation.",
"sequence": {
"id": "seq_123",
"name": "Workspace onboarding",
"status": "draft",
"trigger": "trigger_list",
"emailCount": 3,
"enrichmentStatus": "processing"
},
"message": "Sequence created. AI is generating email content based on your brand. This typically takes 30-60 seconds."
}
{
"error": "emailCount must be a positive integer"
}
{
"error": "emailCount must be no more than 10"
}
{
"error": "Invalid API key"
}
{
"error": "No companies found. Create a company first using the create_company tool."
}
{
"error": "Failed to create sequence"
}