Update drip campaign
curl --request PUT \
--url https://api.paubox.com/v1/marketing/drip_campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'authorization: <api-key>' \
--data '
{
"drip_campaign": {
"name": "Welcome Series",
"subscription_list_id": "123e4567-e89b-12d3-a456-426614174000",
"start_trigger": "subscription",
"drip_campaign_nodes": "{\"nodes\": [], \"edges\": []}"
}
}
'import requests
url = "https://api.paubox.com/v1/marketing/drip_campaigns/{id}"
payload = { "drip_campaign": {
"name": "Welcome Series",
"subscription_list_id": "123e4567-e89b-12d3-a456-426614174000",
"start_trigger": "subscription",
"drip_campaign_nodes": "{\"nodes\": [], \"edges\": []}"
} }
headers = {
"authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
drip_campaign: {
name: 'Welcome Series',
subscription_list_id: '123e4567-e89b-12d3-a456-426614174000',
start_trigger: 'subscription',
drip_campaign_nodes: '{"nodes": [], "edges": []}'
}
})
};
fetch('https://api.paubox.com/v1/marketing/drip_campaigns/{id}', 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.paubox.com/v1/marketing/drip_campaigns/{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([
'drip_campaign' => [
'name' => 'Welcome Series',
'subscription_list_id' => '123e4567-e89b-12d3-a456-426614174000',
'start_trigger' => 'subscription',
'drip_campaign_nodes' => '{"nodes": [], "edges": []}'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <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.paubox.com/v1/marketing/drip_campaigns/{id}"
payload := strings.NewReader("{\n \"drip_campaign\": {\n \"name\": \"Welcome Series\",\n \"subscription_list_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"start_trigger\": \"subscription\",\n \"drip_campaign_nodes\": \"{\\\"nodes\\\": [], \\\"edges\\\": []}\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "<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.put("https://api.paubox.com/v1/marketing/drip_campaigns/{id}")
.header("authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"drip_campaign\": {\n \"name\": \"Welcome Series\",\n \"subscription_list_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"start_trigger\": \"subscription\",\n \"drip_campaign_nodes\": \"{\\\"nodes\\\": [], \\\"edges\\\": []}\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paubox.com/v1/marketing/drip_campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"drip_campaign\": {\n \"name\": \"Welcome Series\",\n \"subscription_list_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"start_trigger\": \"subscription\",\n \"drip_campaign_nodes\": \"{\\\"nodes\\\": [], \\\"edges\\\": []}\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "drip_campaign",
"attributes": {
"name": "<string>",
"subscription_list_id": "<string>",
"subscription_list_name": "<string>",
"state": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"start_trigger": "<string>",
"subscriber_count": 123,
"subscriber_completed_count": 123,
"drip_campaign_nodes": "<string>",
"drip_campaign_tree_blob": "<string>"
}
}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Marketing · Drip campaigns
Update a drip campaign
Updates drip campaign attributes
PUT
/
drip_campaigns
/
{id}
Update drip campaign
curl --request PUT \
--url https://api.paubox.com/v1/marketing/drip_campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'authorization: <api-key>' \
--data '
{
"drip_campaign": {
"name": "Welcome Series",
"subscription_list_id": "123e4567-e89b-12d3-a456-426614174000",
"start_trigger": "subscription",
"drip_campaign_nodes": "{\"nodes\": [], \"edges\": []}"
}
}
'import requests
url = "https://api.paubox.com/v1/marketing/drip_campaigns/{id}"
payload = { "drip_campaign": {
"name": "Welcome Series",
"subscription_list_id": "123e4567-e89b-12d3-a456-426614174000",
"start_trigger": "subscription",
"drip_campaign_nodes": "{\"nodes\": [], \"edges\": []}"
} }
headers = {
"authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
drip_campaign: {
name: 'Welcome Series',
subscription_list_id: '123e4567-e89b-12d3-a456-426614174000',
start_trigger: 'subscription',
drip_campaign_nodes: '{"nodes": [], "edges": []}'
}
})
};
fetch('https://api.paubox.com/v1/marketing/drip_campaigns/{id}', 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.paubox.com/v1/marketing/drip_campaigns/{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([
'drip_campaign' => [
'name' => 'Welcome Series',
'subscription_list_id' => '123e4567-e89b-12d3-a456-426614174000',
'start_trigger' => 'subscription',
'drip_campaign_nodes' => '{"nodes": [], "edges": []}'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <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.paubox.com/v1/marketing/drip_campaigns/{id}"
payload := strings.NewReader("{\n \"drip_campaign\": {\n \"name\": \"Welcome Series\",\n \"subscription_list_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"start_trigger\": \"subscription\",\n \"drip_campaign_nodes\": \"{\\\"nodes\\\": [], \\\"edges\\\": []}\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("authorization", "<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.put("https://api.paubox.com/v1/marketing/drip_campaigns/{id}")
.header("authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"drip_campaign\": {\n \"name\": \"Welcome Series\",\n \"subscription_list_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"start_trigger\": \"subscription\",\n \"drip_campaign_nodes\": \"{\\\"nodes\\\": [], \\\"edges\\\": []}\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paubox.com/v1/marketing/drip_campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"drip_campaign\": {\n \"name\": \"Welcome Series\",\n \"subscription_list_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"start_trigger\": \"subscription\",\n \"drip_campaign_nodes\": \"{\\\"nodes\\\": [], \\\"edges\\\": []}\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "drip_campaign",
"attributes": {
"name": "<string>",
"subscription_list_id": "<string>",
"subscription_list_name": "<string>",
"state": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"start_trigger": "<string>",
"subscriber_count": 123,
"subscriber_completed_count": 123,
"drip_campaign_nodes": "<string>",
"drip_campaign_tree_blob": "<string>"
}
}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Token-based authentication. Use format: "Token token=<API_KEY>" where <API_KEY> is your API key
Path Parameters
The ID of the drip campaign to update
Body
application/json
Show child attributes
Show child attributes
Response
Drip campaign updated successfully
Show child attributes
Show child attributes
⌘I