curl --request PATCH \
--url https://api.deliveryman.ai/api/v1/campaign/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"campaign_uid": "<string>",
"update_data": {
"name": "<string>",
"daily_email_limit": 55,
"single_subject": true,
"from_time": "<string>",
"to_time": "<string>",
"time_zone": "<string>",
"add_unsub_link": true,
"custom_unsub_text": "<string>",
"click_tracking_enabled": true,
"open_tracking_enabled": true,
"skip_dangerous_emails": true,
"skip_disposable_emails": true,
"skip_catchall_emails": true,
"skip_full_inbox_emails": true,
"skip_invalid_emails": true,
"forward_negative_emails": true,
"forward_netural_emails": true,
"sending_domains": [
123
],
"reply_to_address": "jsmith@example.com",
"skip_days": []
}
}
'import requests
url = "https://api.deliveryman.ai/api/v1/campaign/"
payload = {
"campaign_uid": "<string>",
"update_data": {
"name": "<string>",
"daily_email_limit": 55,
"single_subject": True,
"from_time": "<string>",
"to_time": "<string>",
"time_zone": "<string>",
"add_unsub_link": True,
"custom_unsub_text": "<string>",
"click_tracking_enabled": True,
"open_tracking_enabled": True,
"skip_dangerous_emails": True,
"skip_disposable_emails": True,
"skip_catchall_emails": True,
"skip_full_inbox_emails": True,
"skip_invalid_emails": True,
"forward_negative_emails": True,
"forward_netural_emails": True,
"sending_domains": [123],
"reply_to_address": "jsmith@example.com",
"skip_days": []
}
}
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({
campaign_uid: '<string>',
update_data: {
name: '<string>',
daily_email_limit: 55,
single_subject: true,
from_time: '<string>',
to_time: '<string>',
time_zone: '<string>',
add_unsub_link: true,
custom_unsub_text: '<string>',
click_tracking_enabled: true,
open_tracking_enabled: true,
skip_dangerous_emails: true,
skip_disposable_emails: true,
skip_catchall_emails: true,
skip_full_inbox_emails: true,
skip_invalid_emails: true,
forward_negative_emails: true,
forward_netural_emails: true,
sending_domains: [123],
reply_to_address: 'jsmith@example.com',
skip_days: []
}
})
};
fetch('https://api.deliveryman.ai/api/v1/campaign/', 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/campaign/",
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([
'campaign_uid' => '<string>',
'update_data' => [
'name' => '<string>',
'daily_email_limit' => 55,
'single_subject' => true,
'from_time' => '<string>',
'to_time' => '<string>',
'time_zone' => '<string>',
'add_unsub_link' => true,
'custom_unsub_text' => '<string>',
'click_tracking_enabled' => true,
'open_tracking_enabled' => true,
'skip_dangerous_emails' => true,
'skip_disposable_emails' => true,
'skip_catchall_emails' => true,
'skip_full_inbox_emails' => true,
'skip_invalid_emails' => true,
'forward_negative_emails' => true,
'forward_netural_emails' => true,
'sending_domains' => [
123
],
'reply_to_address' => 'jsmith@example.com',
'skip_days' => [
]
]
]),
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/campaign/"
payload := strings.NewReader("{\n \"campaign_uid\": \"<string>\",\n \"update_data\": {\n \"name\": \"<string>\",\n \"daily_email_limit\": 55,\n \"single_subject\": true,\n \"from_time\": \"<string>\",\n \"to_time\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"add_unsub_link\": true,\n \"custom_unsub_text\": \"<string>\",\n \"click_tracking_enabled\": true,\n \"open_tracking_enabled\": true,\n \"skip_dangerous_emails\": true,\n \"skip_disposable_emails\": true,\n \"skip_catchall_emails\": true,\n \"skip_full_inbox_emails\": true,\n \"skip_invalid_emails\": true,\n \"forward_negative_emails\": true,\n \"forward_netural_emails\": true,\n \"sending_domains\": [\n 123\n ],\n \"reply_to_address\": \"jsmith@example.com\",\n \"skip_days\": []\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/campaign/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_uid\": \"<string>\",\n \"update_data\": {\n \"name\": \"<string>\",\n \"daily_email_limit\": 55,\n \"single_subject\": true,\n \"from_time\": \"<string>\",\n \"to_time\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"add_unsub_link\": true,\n \"custom_unsub_text\": \"<string>\",\n \"click_tracking_enabled\": true,\n \"open_tracking_enabled\": true,\n \"skip_dangerous_emails\": true,\n \"skip_disposable_emails\": true,\n \"skip_catchall_emails\": true,\n \"skip_full_inbox_emails\": true,\n \"skip_invalid_emails\": true,\n \"forward_negative_emails\": true,\n \"forward_netural_emails\": true,\n \"sending_domains\": [\n 123\n ],\n \"reply_to_address\": \"jsmith@example.com\",\n \"skip_days\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/campaign/")
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 \"campaign_uid\": \"<string>\",\n \"update_data\": {\n \"name\": \"<string>\",\n \"daily_email_limit\": 55,\n \"single_subject\": true,\n \"from_time\": \"<string>\",\n \"to_time\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"add_unsub_link\": true,\n \"custom_unsub_text\": \"<string>\",\n \"click_tracking_enabled\": true,\n \"open_tracking_enabled\": true,\n \"skip_dangerous_emails\": true,\n \"skip_disposable_emails\": true,\n \"skip_catchall_emails\": true,\n \"skip_full_inbox_emails\": true,\n \"skip_invalid_emails\": true,\n \"forward_negative_emails\": true,\n \"forward_netural_emails\": true,\n \"sending_domains\": [\n 123\n ],\n \"reply_to_address\": \"jsmith@example.com\",\n \"skip_days\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"uid": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"workspace_id": 123,
"settings": {
"name": "<string>",
"skip_days": [],
"sending_domains": [
123
],
"reply_to_address": "<string>",
"daily_email_limit": 1073741823,
"single_subject": true,
"from_time": "<string>",
"to_time": "<string>",
"time_zone": "<string>",
"add_unsub_link": true,
"unsub_link_type": "<string>",
"custom_unsub_text": "<string>",
"click_tracking_enabled": true,
"open_tracking_enabled": true,
"skip_dangerous_emails": true,
"skip_disposable_emails": true,
"skip_catchall_emails": true,
"skip_full_inbox_emails": true,
"skip_invalid_emails": true,
"forward_negative_emails": true,
"forward_netural_emails": true
},
"selected_contact_lists": [
{}
],
"scheduled_start_datetime": "2023-11-07T05:31:56Z",
"bounces": 1073741823,
"campaign_paused": true,
"campaign_paused_on": "2023-11-07T05:31:56Z",
"is_generating_schedules": true,
"is_deleting_schedules": true,
"archived": true,
"is_campaign_bounce_blocked": true,
"started_running_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Update Campaign
Updates details for a single campaign. Updates can only be performed on campaigns in created state. Use this by first fetching campaign settings data using GET request. Update the required values in there and pass that entire object in update_data.
curl --request PATCH \
--url https://api.deliveryman.ai/api/v1/campaign/ \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"campaign_uid": "<string>",
"update_data": {
"name": "<string>",
"daily_email_limit": 55,
"single_subject": true,
"from_time": "<string>",
"to_time": "<string>",
"time_zone": "<string>",
"add_unsub_link": true,
"custom_unsub_text": "<string>",
"click_tracking_enabled": true,
"open_tracking_enabled": true,
"skip_dangerous_emails": true,
"skip_disposable_emails": true,
"skip_catchall_emails": true,
"skip_full_inbox_emails": true,
"skip_invalid_emails": true,
"forward_negative_emails": true,
"forward_netural_emails": true,
"sending_domains": [
123
],
"reply_to_address": "jsmith@example.com",
"skip_days": []
}
}
'import requests
url = "https://api.deliveryman.ai/api/v1/campaign/"
payload = {
"campaign_uid": "<string>",
"update_data": {
"name": "<string>",
"daily_email_limit": 55,
"single_subject": True,
"from_time": "<string>",
"to_time": "<string>",
"time_zone": "<string>",
"add_unsub_link": True,
"custom_unsub_text": "<string>",
"click_tracking_enabled": True,
"open_tracking_enabled": True,
"skip_dangerous_emails": True,
"skip_disposable_emails": True,
"skip_catchall_emails": True,
"skip_full_inbox_emails": True,
"skip_invalid_emails": True,
"forward_negative_emails": True,
"forward_netural_emails": True,
"sending_domains": [123],
"reply_to_address": "jsmith@example.com",
"skip_days": []
}
}
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({
campaign_uid: '<string>',
update_data: {
name: '<string>',
daily_email_limit: 55,
single_subject: true,
from_time: '<string>',
to_time: '<string>',
time_zone: '<string>',
add_unsub_link: true,
custom_unsub_text: '<string>',
click_tracking_enabled: true,
open_tracking_enabled: true,
skip_dangerous_emails: true,
skip_disposable_emails: true,
skip_catchall_emails: true,
skip_full_inbox_emails: true,
skip_invalid_emails: true,
forward_negative_emails: true,
forward_netural_emails: true,
sending_domains: [123],
reply_to_address: 'jsmith@example.com',
skip_days: []
}
})
};
fetch('https://api.deliveryman.ai/api/v1/campaign/', 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/campaign/",
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([
'campaign_uid' => '<string>',
'update_data' => [
'name' => '<string>',
'daily_email_limit' => 55,
'single_subject' => true,
'from_time' => '<string>',
'to_time' => '<string>',
'time_zone' => '<string>',
'add_unsub_link' => true,
'custom_unsub_text' => '<string>',
'click_tracking_enabled' => true,
'open_tracking_enabled' => true,
'skip_dangerous_emails' => true,
'skip_disposable_emails' => true,
'skip_catchall_emails' => true,
'skip_full_inbox_emails' => true,
'skip_invalid_emails' => true,
'forward_negative_emails' => true,
'forward_netural_emails' => true,
'sending_domains' => [
123
],
'reply_to_address' => 'jsmith@example.com',
'skip_days' => [
]
]
]),
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/campaign/"
payload := strings.NewReader("{\n \"campaign_uid\": \"<string>\",\n \"update_data\": {\n \"name\": \"<string>\",\n \"daily_email_limit\": 55,\n \"single_subject\": true,\n \"from_time\": \"<string>\",\n \"to_time\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"add_unsub_link\": true,\n \"custom_unsub_text\": \"<string>\",\n \"click_tracking_enabled\": true,\n \"open_tracking_enabled\": true,\n \"skip_dangerous_emails\": true,\n \"skip_disposable_emails\": true,\n \"skip_catchall_emails\": true,\n \"skip_full_inbox_emails\": true,\n \"skip_invalid_emails\": true,\n \"forward_negative_emails\": true,\n \"forward_netural_emails\": true,\n \"sending_domains\": [\n 123\n ],\n \"reply_to_address\": \"jsmith@example.com\",\n \"skip_days\": []\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/campaign/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_uid\": \"<string>\",\n \"update_data\": {\n \"name\": \"<string>\",\n \"daily_email_limit\": 55,\n \"single_subject\": true,\n \"from_time\": \"<string>\",\n \"to_time\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"add_unsub_link\": true,\n \"custom_unsub_text\": \"<string>\",\n \"click_tracking_enabled\": true,\n \"open_tracking_enabled\": true,\n \"skip_dangerous_emails\": true,\n \"skip_disposable_emails\": true,\n \"skip_catchall_emails\": true,\n \"skip_full_inbox_emails\": true,\n \"skip_invalid_emails\": true,\n \"forward_negative_emails\": true,\n \"forward_netural_emails\": true,\n \"sending_domains\": [\n 123\n ],\n \"reply_to_address\": \"jsmith@example.com\",\n \"skip_days\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v1/campaign/")
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 \"campaign_uid\": \"<string>\",\n \"update_data\": {\n \"name\": \"<string>\",\n \"daily_email_limit\": 55,\n \"single_subject\": true,\n \"from_time\": \"<string>\",\n \"to_time\": \"<string>\",\n \"time_zone\": \"<string>\",\n \"add_unsub_link\": true,\n \"custom_unsub_text\": \"<string>\",\n \"click_tracking_enabled\": true,\n \"open_tracking_enabled\": true,\n \"skip_dangerous_emails\": true,\n \"skip_disposable_emails\": true,\n \"skip_catchall_emails\": true,\n \"skip_full_inbox_emails\": true,\n \"skip_invalid_emails\": true,\n \"forward_negative_emails\": true,\n \"forward_netural_emails\": true,\n \"sending_domains\": [\n 123\n ],\n \"reply_to_address\": \"jsmith@example.com\",\n \"skip_days\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"uid": "<string>",
"created_on": "2023-11-07T05:31:56Z",
"workspace_id": 123,
"settings": {
"name": "<string>",
"skip_days": [],
"sending_domains": [
123
],
"reply_to_address": "<string>",
"daily_email_limit": 1073741823,
"single_subject": true,
"from_time": "<string>",
"to_time": "<string>",
"time_zone": "<string>",
"add_unsub_link": true,
"unsub_link_type": "<string>",
"custom_unsub_text": "<string>",
"click_tracking_enabled": true,
"open_tracking_enabled": true,
"skip_dangerous_emails": true,
"skip_disposable_emails": true,
"skip_catchall_emails": true,
"skip_full_inbox_emails": true,
"skip_invalid_emails": true,
"forward_negative_emails": true,
"forward_netural_emails": true
},
"selected_contact_lists": [
{}
],
"scheduled_start_datetime": "2023-11-07T05:31:56Z",
"bounces": 1073741823,
"campaign_paused": true,
"campaign_paused_on": "2023-11-07T05:31:56Z",
"is_generating_schedules": true,
"is_deleting_schedules": true,
"archived": true,
"is_campaign_bounce_blocked": true,
"started_running_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"cancelled_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Enter your API key in the format: X-Api-Key <your_key>
Body
Response
Success
Unique identifier of the campaign.
255Date when the campaign was created. ISO format date string in UTC timezone.
The ID of the workspace associated with the campaign.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Datetime when the campaign is scheduled to start. ISO format date string in UTC timezone.
Current status of the campaign.
creating- Creatingcreated- Createdscheduled- Scheduledrunning- Runningpaused- Pausedcomplete- Completecancelled- Cancelledfailed- Failed
creating, created, scheduled, running, paused, complete, cancelled, failed Number of bounced emails in the campaign.
0 <= x <= 2147483647Indicates whether the campaign is paused.
Datetime when the campaign was paused.
Indicates if schedules are being generated for the campaign.
Indicates if schedules are being deleted for the campaign.
Flag indicating if the campaign is archived.
Flag indicating if the campaign is bounce-blocked.
Datetime when the campaign started running. ISO format date string in UTC timezone.
Datetime when the campaign was completed. ISO format date string in UTC timezone.
Datetime when the campaign was cancelled. ISO format date string in UTC timezone.