Skip to main content
PUT
/
v4
/
sequences
/
{sequence_id}
/
emails
/
{id}
Update a sequence email
curl --request PUT \
  --url https://api.kit.com/v4/sequences/{sequence_id}/emails/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-Kit-Api-Key: <api-key>' \
  --data '
{
  "subject": "Updated subject",
  "preview_text": "Updated preview",
  "content": null,
  "delay_value": 3,
  "delay_unit": "days",
  "email_template_id": null,
  "published": true,
  "send_days": [
    "monday",
    "wednesday",
    "friday"
  ],
  "position": null
}
'
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Put.new(url)
request["X-Kit-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"subject\": \"Updated subject\",\n  \"preview_text\": \"Updated preview\",\n  \"content\": null,\n  \"delay_value\": 3,\n  \"delay_unit\": \"days\",\n  \"email_template_id\": null,\n  \"published\": true,\n  \"send_days\": [\n    \"monday\",\n    \"wednesday\",\n    \"friday\"\n  ],\n  \"position\": null\n}"

response = http.request(request)
puts response.read_body
const options = {
  method: 'PUT',
  headers: {'X-Kit-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    subject: 'Updated subject',
    preview_text: 'Updated preview',
    content: null,
    delay_value: 3,
    delay_unit: 'days',
    email_template_id: null,
    published: true,
    send_days: ['monday', 'wednesday', 'friday'],
    position: null
  })
};

fetch('https://api.kit.com/v4/sequences/{sequence_id}/emails/{id}', 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/{id}"

	payload := strings.NewReader("{\n  \"subject\": \"Updated subject\",\n  \"preview_text\": \"Updated preview\",\n  \"content\": null,\n  \"delay_value\": 3,\n  \"delay_unit\": \"days\",\n  \"email_template_id\": null,\n  \"published\": true,\n  \"send_days\": [\n    \"monday\",\n    \"wednesday\",\n    \"friday\"\n  ],\n  \"position\": null\n}")

	req, _ := http.NewRequest("PUT", 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/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => json_encode([
    'subject' => 'Updated subject',
    'preview_text' => 'Updated preview',
    'content' => null,
    'delay_value' => 3,
    'delay_unit' => 'days',
    'email_template_id' => null,
    'published' => true,
    'send_days' => [
        'monday',
        'wednesday',
        'friday'
    ],
    '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/{id}"

payload = {
    "subject": "Updated subject",
    "preview_text": "Updated preview",
    "content": None,
    "delay_value": 3,
    "delay_unit": "days",
    "email_template_id": None,
    "published": True,
    "send_days": ["monday", "wednesday", "friday"],
    "position": None
}
headers = {
    "X-Kit-Api-Key": "<api-key>",
    "Content-Type": "application/json"
}

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

print(response.text)
{
  "email": {
    "id": 66,
    "sequence_id": 187,
    "subject": "Updated subject",
    "preview_text": "Updated preview",
    "email_address": "joe2570@ck.lol",
    "email_template_id": null,
    "published": true,
    "position": null,
    "delay_value": 3,
    "delay_unit": "days",
    "send_days": [
      "monday",
      "wednesday",
      "friday"
    ],
    "content": "Content 37"
  }
}
{
  "errors": [
    "The access token is invalid"
  ]
}
{
  "errors": [
    "Not Found"
  ]
}
{
  "errors": [
    "delay_unit must be one of: days, hours"
  ]
}

Authorizations

X-Kit-Api-Key
string
header
required

Authenticate API requests via an API Key

Path Parameters

id
integer
required
sequence_id
integer
required

Body

application/json
subject
string

New subject line for the email

preview_text
string | null

New preview text shown in email clients before the email is opened

content
string | null

New HTML body content of the email

delay_value
integer

New delay value

delay_unit
enum<string>

New delay unit. Use days for schedule-aware delivery, hours for a fixed hourly delay

Available options:
days,
hours
email_template_id
integer | null

New email template ID for layout and styling. Pass null to clear

published
boolean

Pass true to publish a draft email or false to unpublish it

send_days
string[] | null

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

position
integer | null

New zero-based position of the email in the sequence

Response

Updates the sequence email and returns its details

email
object
required