Update Email Sequence
curl --request PATCH \
--url https://api.deliveryman.ai/api/v1/email-sequence/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"sequence_id": 123,
"update_data": {
"order": 1,
"subject": "<string>",
"body": "<string>",
"next_message_days": 2
}
}
'import requests
url = "https://api.deliveryman.ai/api/v1/email-sequence/"
payload = {
"sequence_id": 123,
"update_data": {
"order": 1,
"subject": "<string>",
"body": "<string>",
"next_message_days": 2
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sequence_id: 123,
update_data: {
order: 1,
subject: '<string>',
body: JSON.stringify('<string>'),
next_message_days: 2
}
})
};
fetch('https://api.deliveryman.ai/api/v1/email-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.deliveryman.ai/api/v1/email-sequence/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'sequence_id' => 123,
'update_data' => [
'order' => 1,
'subject' => '<string>',
'body' => '<string>',
'next_message_days' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.deliveryman.ai/api/v1/email-sequence/"
payload := strings.NewReader("{\n \"sequence_id\": 123,\n \"update_data\": {\n \"order\": 1,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"next_message_days\": 2\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-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))
}HttpResponse<String> response = Unirest.patch("https://api.deliveryman.ai/api/v1/email-sequence/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sequence_id\": 123,\n \"update_data\": {\n \"order\": 1,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"next_message_days\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/email-sequence/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sequence_id\": 123,\n \"update_data\": {\n \"order\": 1,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"next_message_days\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"subject": "<string>",
"body": "<string>",
"order": -1,
"next_message_days": 16383,
"score": 1073741823,
"verdict": "<string>",
"suggestions": "<unknown>",
"blocked_reason": "<string>",
"is_flagged_for_approval": true,
"block_approval": true
}{
"message": "<string>"
}{
"message": "<string>"
}Campaign Email Sequence
Update Email Sequence
Updates details for the given campaign email sequence. Updates can only be performed if the campaign is in created state. Use existing values for update_data by fetching them from Retrieve Email Sequence API, and then only update the required fieds.
PATCH
/
api
/
v1
/
email-sequence
/
Update Email Sequence
curl --request PATCH \
--url https://api.deliveryman.ai/api/v1/email-sequence/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"sequence_id": 123,
"update_data": {
"order": 1,
"subject": "<string>",
"body": "<string>",
"next_message_days": 2
}
}
'import requests
url = "https://api.deliveryman.ai/api/v1/email-sequence/"
payload = {
"sequence_id": 123,
"update_data": {
"order": 1,
"subject": "<string>",
"body": "<string>",
"next_message_days": 2
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sequence_id: 123,
update_data: {
order: 1,
subject: '<string>',
body: JSON.stringify('<string>'),
next_message_days: 2
}
})
};
fetch('https://api.deliveryman.ai/api/v1/email-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.deliveryman.ai/api/v1/email-sequence/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'sequence_id' => 123,
'update_data' => [
'order' => 1,
'subject' => '<string>',
'body' => '<string>',
'next_message_days' => 2
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.deliveryman.ai/api/v1/email-sequence/"
payload := strings.NewReader("{\n \"sequence_id\": 123,\n \"update_data\": {\n \"order\": 1,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"next_message_days\": 2\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-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))
}HttpResponse<String> response = Unirest.patch("https://api.deliveryman.ai/api/v1/email-sequence/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sequence_id\": 123,\n \"update_data\": {\n \"order\": 1,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"next_message_days\": 2\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/email-sequence/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sequence_id\": 123,\n \"update_data\": {\n \"order\": 1,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"next_message_days\": 2\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"subject": "<string>",
"body": "<string>",
"order": -1,
"next_message_days": 16383,
"score": 1073741823,
"verdict": "<string>",
"suggestions": "<unknown>",
"blocked_reason": "<string>",
"is_flagged_for_approval": true,
"block_approval": true
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Enter your API key in the format: X-Api-Key <your_key>
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Success
Required range:
-2147483648 <= x <= 2147483647Required range:
0 <= x <= 32767Required range:
0 <= x <= 2147483647passed- Passedblocked- Blockedrejected- Rejectedapproved- Approved
Available options:
passed, blocked, rejected, approved text/plain- Plain Texttext/html- HTMLtext/rich- Rich Text
Available options:
text/plain, text/html, text/rich ⌘I