Launch Campaign
curl --request POST \
--url https://api.example.com/api/v1/campaigns/{campaign_id}/launch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"force": false
}'import requests
url = "https://api.example.com/api/v1/campaigns/{campaign_id}/launch"
payload = { "force": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({force: false})
};
fetch('https://api.example.com/api/v1/campaigns/{campaign_id}/launch', 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.example.com/api/v1/campaigns/{campaign_id}/launch",
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([
'force' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/campaigns/{campaign_id}/launch"
payload := strings.NewReader("{\n \"force\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.example.com/api/v1/campaigns/{campaign_id}/launch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"force\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/campaigns/{campaign_id}/launch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"force\": false\n}"
response = http.request(request)
puts response.read_body{
"campaign": {
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>",
"status": "draft",
"launch_type": "immediate",
"daily_limit": 123,
"sending_window_start": "<string>",
"sending_window_end": "<string>",
"min_interval_seconds": 123,
"timezone": "<string>",
"steps_config": [
{
"step": 2,
"delay_days": 1,
"channel": "email",
"variants": [
{
"label": "<string>",
"weight": 50,
"type": "TEMPLATE",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_template": "<string>",
"prompt_name": "<string>"
}
],
"include_catch_all": false,
"ai_personalization_enabled": true,
"track_clicks": false,
"track_opens": false,
"attachments": [
{
"attachment_id": "<string>",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 2000000,
"sha256": "<string>"
}
],
"action_type": "connection_request",
"message_template": "<string>",
"media": {
"url": "<string>",
"media_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"gate": {
"gate_on": "<string>",
"gate_timeout_days": 15,
"gate_on_timeout_step": 2
},
"end_sequence": false
}
],
"send_days": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_enabled": false,
"discovery_targeting": {
"enforced": [
"<string>"
],
"not_enforceable": [
"<string>"
]
},
"description": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"alias_ids": [
"<string>"
],
"connected_mailbox_ids": [
"<string>"
],
"connected_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_leads": 123,
"processed_leads": 0,
"launch_job_id": "<string>",
"launch_requested_at": "2023-11-07T05:31:56Z",
"launch_error": "<string>",
"system_prompt": "<string>",
"unreviewed_launch_policy": "launch_default",
"paused_reason": "<string>",
"playground_discovery_dismissed_at": "2023-11-07T05:31:56Z",
"locked_through": 123,
"metrics": {
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"replied": 0,
"bounced": 0,
"unsubscribed": 0,
"open_rate": "0.0",
"click_rate": "0.0",
"reply_rate": "0.0",
"bounce_rate": "0.0",
"delivery_rate": "0.0",
"linkedin_requests_sent": 0,
"linkedin_accepted": 0,
"linkedin_replied": 0,
"linkedin_acceptance_rate": "0.0",
"linkedin_reply_rate": "0.0",
"channel": "email"
},
"compliance_footer_enabled": false,
"list_unsub_enabled": false,
"compliance_risk_ack_at": "2023-11-07T05:31:56Z",
"compliance_risk_ack_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"summary": {
"total_rows": 123,
"launchable_rows": 123,
"warning_count": 123,
"skipped_by_reason": {},
"verified_rows": 0,
"force_enrolled_rows": 0,
"held_rows": 0,
"secure_gateway_rows": 0,
"secure_gateway_by_provider": {}
},
"warnings": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}campaigns
Launch Campaign
Launch a campaign.
Returns campaign data with any warnings and a summary of launch results.
ORG-scoped (PR2d): any member of the owning org may launch the campaign;
current_user is the actor (carried through for the BaviMail user_context).
POST
/
api
/
v1
/
campaigns
/
{campaign_id}
/
launch
Launch Campaign
curl --request POST \
--url https://api.example.com/api/v1/campaigns/{campaign_id}/launch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"force": false
}'import requests
url = "https://api.example.com/api/v1/campaigns/{campaign_id}/launch"
payload = { "force": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({force: false})
};
fetch('https://api.example.com/api/v1/campaigns/{campaign_id}/launch', 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.example.com/api/v1/campaigns/{campaign_id}/launch",
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([
'force' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/campaigns/{campaign_id}/launch"
payload := strings.NewReader("{\n \"force\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.example.com/api/v1/campaigns/{campaign_id}/launch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"force\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/campaigns/{campaign_id}/launch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"force\": false\n}"
response = http.request(request)
puts response.read_body{
"campaign": {
"campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>",
"status": "draft",
"launch_type": "immediate",
"daily_limit": 123,
"sending_window_start": "<string>",
"sending_window_end": "<string>",
"min_interval_seconds": 123,
"timezone": "<string>",
"steps_config": [
{
"step": 2,
"delay_days": 1,
"channel": "email",
"variants": [
{
"label": "<string>",
"weight": 50,
"type": "TEMPLATE",
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_template": "<string>",
"prompt_name": "<string>"
}
],
"include_catch_all": false,
"ai_personalization_enabled": true,
"track_clicks": false,
"track_opens": false,
"attachments": [
{
"attachment_id": "<string>",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 2000000,
"sha256": "<string>"
}
],
"action_type": "connection_request",
"message_template": "<string>",
"media": {
"url": "<string>",
"media_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"gate": {
"gate_on": "<string>",
"gate_timeout_days": 15,
"gate_on_timeout_step": 2
},
"end_sequence": false
}
],
"send_days": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"discovery_enabled": false,
"discovery_targeting": {
"enforced": [
"<string>"
],
"not_enforceable": [
"<string>"
]
},
"description": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"alias_ids": [
"<string>"
],
"connected_mailbox_ids": [
"<string>"
],
"connected_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"total_leads": 123,
"processed_leads": 0,
"launch_job_id": "<string>",
"launch_requested_at": "2023-11-07T05:31:56Z",
"launch_error": "<string>",
"system_prompt": "<string>",
"unreviewed_launch_policy": "launch_default",
"paused_reason": "<string>",
"playground_discovery_dismissed_at": "2023-11-07T05:31:56Z",
"locked_through": 123,
"metrics": {
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"replied": 0,
"bounced": 0,
"unsubscribed": 0,
"open_rate": "0.0",
"click_rate": "0.0",
"reply_rate": "0.0",
"bounce_rate": "0.0",
"delivery_rate": "0.0",
"linkedin_requests_sent": 0,
"linkedin_accepted": 0,
"linkedin_replied": 0,
"linkedin_acceptance_rate": "0.0",
"linkedin_reply_rate": "0.0",
"channel": "email"
},
"compliance_footer_enabled": false,
"list_unsub_enabled": false,
"compliance_risk_ack_at": "2023-11-07T05:31:56Z",
"compliance_risk_ack_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"summary": {
"total_rows": 123,
"launchable_rows": 123,
"warning_count": 123,
"skipped_by_reason": {},
"verified_rows": 0,
"force_enrolled_rows": 0,
"held_rows": 0,
"secure_gateway_rows": 0,
"secure_gateway_by_provider": {}
},
"warnings": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Optional controls for a campaign launch request.
Response
Successful Response
Response for campaign launch (includes warnings).
⌘I