Skip to main content
POST
/
v4
/
sequences
/
{sequence_id}
/
emails
Create a sequence email
curl --request POST \
  --url https://api.kit.com/v4/sequences/{sequence_id}/emails \
  --header 'Content-Type: application/json' \
  --header 'X-Kit-Api-Key: <api-key>' \
  --data '
{
  "subject": "Welcome to the sequence",
  "delay_value": 1,
  "delay_unit": "days",
  "preview_text": null,
  "content": null,
  "email_template_id": null,
  "published": null,
  "send_days": null,
  "position": null
}
'
require 'uri'
require 'net/http'

url = URI("https://api.kit.com/v4/sequences/{sequence_id}/emails")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Kit-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subject\": \"Welcome to the sequence\",\n \"delay_value\": 1,\n \"delay_unit\": \"days\",\n \"preview_text\": null,\n \"content\": null,\n \"email_template_id\": null,\n \"published\": null,\n \"send_days\": null,\n \"position\": null\n}"

response = http.request(request)
puts response.read_body
const options = {
method: 'POST',
headers: {'X-Kit-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subject: 'Welcome to the sequence',
delay_value: 1,
delay_unit: 'days',
preview_text: null,
content: null,
email_template_id: null,
published: null,
send_days: null,
position: null
})
};

fetch('https://api.kit.com/v4/sequences/{sequence_id}/emails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.kit.com/v4/sequences/{sequence_id}/emails"

payload := strings.NewReader("{\n \"subject\": \"Welcome to the sequence\",\n \"delay_value\": 1,\n \"delay_unit\": \"days\",\n \"preview_text\": null,\n \"content\": null,\n \"email_template_id\": null,\n \"published\": null,\n \"send_days\": null,\n \"position\": null\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-Kit-Api-Key", "<api-key>")
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))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kit.com/v4/sequences/{sequence_id}/emails",
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([
'subject' => 'Welcome to the sequence',
'delay_value' => 1,
'delay_unit' => 'days',
'preview_text' => null,
'content' => null,
'email_template_id' => null,
'published' => null,
'send_days' => null,
'position' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Kit-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
import requests

url = "https://api.kit.com/v4/sequences/{sequence_id}/emails"

payload = {
"subject": "Welcome to the sequence",
"delay_value": 1,
"delay_unit": "days",
"preview_text": None,
"content": None,
"email_template_id": None,
"published": None,
"send_days": None,
"position": None
}
headers = {
"X-Kit-Api-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "email": {
    "id": 35,
    "sequence_id": 153,
    "subject": "Welcome to the sequence",
    "preview_text": null,
    "email_address": "joe2662@ck.lol",
    "email_template_id": null,
    "published": false,
    "position": 0,
    "delay_value": 1,
    "delay_unit": "days",
    "send_days": [
      "monday",
      "tuesday",
      "wednesday",
      "thursday",
      "friday",
      "saturday",
      "sunday"
    ],
    "content": null
  }
}
{
"errors": [
"The access token is invalid"
]
}
{
"errors": [
"Not Found"
]
}
{
"errors": [
"subject can't be blank"
]
}

Authorizations

X-Kit-Api-Key
string
header
required

Authenticate API requests via an API Key

Path Parameters

sequence_id
integer
required

Body

application/json
subject
string
required

Subject line of the email

delay_value
integer
required

Number of days or hours to wait before sending this email after the previous one

delay_unit
enum<string>
required

Unit for the send delay. Use days for schedule-aware delivery, hours for a fixed hourly delay

Available options:
days,
hours
preview_text
string | null

Preview text shown in email clients before the email is opened

content
string | null

HTML body content of the email

email_template_id
integer | null

ID of the email template to use for layout and styling

published
boolean

Whether the email is active and will be sent to subscribers. Defaults to false (draft)

send_days
string[] | null

Days of the week this email may be sent. Defaults to all 7 days (inherits the sequence schedule). Pass a subset to restrict delivery, or null to reset to all days

position
integer | null

Zero-based position of the email in the sequence. Assigned automatically after the last email if omitted

Response

Creates a new sequence email

email
object
required