Documentation Index Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
Use this file to discover all available pages before exploring further.
API Reference
The Sequenzy API lets you programmatically manage subscribers, send emails, trigger events, and integrate email marketing into your application.
Base URL
All API requests are made to:
https://api.sequenzy.com/api/v1
For backwards compatibility, requests to https://api.sequenzy.com/v1 are still accepted as an alias.
Authentication
All endpoints require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Get your API key from the Sequenzy dashboard . After you sign in, go to Settings → API Keys .
Authentication Guide Learn more about API authentication
All responses return JSON with a consistent structure.
Success Response
{
"success" : true ,
"data" : { ... }
}
Error Response
{
"success" : false ,
"error" : "Human readable error message"
}
HTTP Status Codes
Status Description 200Success 400Bad request (validation error, missing fields, disabled resource) 401Unauthorized (invalid or missing API key) 404Resource not found 409Conflict (resource already exists) 500Internal server error
Available Endpoints
Subscribers
Manage your subscriber list.
Method Endpoint Description POST/subscribersCreate subscriber GET/subscribersList subscribers GET/subscribers/:emailGet subscriber PATCH/subscribers/:emailUpdate subscriber DELETE/subscribers/:emailDelete subscriber
Segment subscribers with tags.
Method Endpoint Description POST/subscribers/tagsAdd tag to subscriber POST/subscribers/tags/bulkAdd multiple tags
Events
Track subscriber actions and trigger automations.
Method Endpoint Description POST/subscribers/eventsTrigger event POST/subscribers/events/bulkTrigger multiple events
Sequences
Create and manage automation sequences.
Method Endpoint Description GET/sequencesList sequences POST/sequencesCreate sequence GET/sequences/:sequenceIdGet sequence PUT/sequences/:sequenceIdUpdate sequence POST/sequences/:sequenceId/enableEnable sequence POST/sequences/:sequenceId/disableDisable sequence DELETE/sequences/:sequenceIdDelete sequence
Generation
Generate draft email content for review.
Method Endpoint Description POST/generate/emailGenerate a draft email POST/generate/sequenceGenerate sequence email HTML POST/generate/subjectsGenerate subject line ideas
Transactional Emails
Send programmatic emails.
Method Endpoint Description POST/transactional/sendSend email GET/transactionalList templates GET/transactional/:slugGet template details
Auto-Creation Behavior
The API automatically creates resources when they don’t exist:
Resource When Created Subscribers When adding tags, triggering events, or sending transactional emails to a new email Tags When adding a tag that doesn’t exist Events When triggering an event type that doesn’t exist
This makes integration seamless—you don’t need to pre-configure anything in the dashboard.
Example
# This single request will:
# 1. Create the subscriber (if new)
# 2. Create the "customer" tag (if new)
# 3. Add the tag to the subscriber
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/tags" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "new-user@example.com",
"tag": "customer"
}'
Rate Limiting
The API is rate limited to protect service stability:
Standard limit : 100 requests per minute per API key
Burst limit : 20 requests per second
When rate limited, you’ll receive a 429 Too Many Requests response with a Retry-After header.
List endpoints support pagination:
Parameter Type Default Description pageinteger 1 Page number limitinteger 20 Items per page (max 100)
Example
curl "https://api.sequenzy.com/api/v1/subscribers?page=2&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"success" : true ,
"data" : [ ... ],
"pagination" : {
"page" : 2 ,
"limit" : 50 ,
"total" : 1250 ,
"totalPages" : 25
}
}
Error Handling
Common Error Codes
Error Description Solution UnauthorizedInvalid or missing API key Check your API key Subscriber not foundEmail doesn’t exist Create the subscriber first Template not foundInvalid template slug Check the slug spelling Template disabledTemplate is deactivated Enable in dashboard Validation errorMissing or invalid fields Check request body
Example Error Response
{
"success" : false ,
"error" : "Subscriber not found"
}
SDK & Libraries
Node.js / TypeScript SDK (Recommended)
Install the official Sequenzy SDK for the best developer experience:
npm install sequenzy
# or
pnpm add sequenzy
# or
bun add sequenzy
import Sequenzy from "sequenzy" ;
const client = new Sequenzy ({
apiKey: process . env . SEQUENZY_API_KEY ,
});
// Create a subscriber
await client . subscribers . create ({
email: "user@example.com" ,
firstName: "John" ,
tags: [ "new-signup" ],
customAttributes: { plan: "pro" },
});
// Add a tag
await client . subscribers . tags . add ({
email: "user@example.com" ,
tag: "customer" ,
});
// Trigger an event
await client . subscribers . events . trigger ({
email: "user@example.com" ,
event: "purchase_completed" ,
properties: { orderId: "ORD-123" , amount: 99.99 },
});
// Send a transactional email
await client . transactional . send ({
to: "user@example.com" ,
slug: "welcome-email" ,
variables: { firstName: "John" },
});
TypeScript/JavaScript (Fetch API)
If you prefer to use the REST API directly:
async function addTag ( email , tag ) {
const response = await fetch (
"https://api.sequenzy.com/api/v1/subscribers/tags" ,
{
method: "POST" ,
headers: {
Authorization: `Bearer ${ process . env . SEQUENZY_API_KEY } ` ,
"Content-Type" : "application/json" ,
},
body: JSON . stringify ({ email , tag }),
}
);
return response . json ();
}
Python
import requests
def add_tag ( email , tag ):
response = requests.post(
"https://api.sequenzy.com/api/v1/subscribers/tags" ,
headers = {
"Authorization" : f "Bearer { SEQUENZY_API_KEY } " ,
"Content-Type" : "application/json"
},
json = { "email" : email, "tag" : tag}
)
return response.json()
cURL
curl -X POST "https://api.sequenzy.com/api/v1/subscribers/tags" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "tag": "customer"}'
Need Help?