curl --request POST \
--url https://api.extole.io/v2/campaigns/{campaignId}/publish \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"launch": true,
"message": "message"
}
'import requests
url = "https://api.extole.io/v2/campaigns/{campaignId}/publish"
payload = {
"launch": True,
"message": "message"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({launch: true, message: 'message'})
};
fetch('https://api.extole.io/v2/campaigns/{campaignId}/publish', 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.extole.io/v2/campaigns/{campaignId}/publish",
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([
'launch' => true,
'message' => 'message'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.extole.io/v2/campaigns/{campaignId}/publish"
payload := strings.NewReader("{\n \"launch\": true,\n \"message\": \"message\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.extole.io/v2/campaigns/{campaignId}/publish")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"launch\": true,\n \"message\": \"message\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v2/campaigns/{campaignId}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"launch\": true,\n \"message\": \"message\"\n}"
response = http.request(request)
puts response.read_body{
"campaign_id": "<string>",
"campaign_locks": [
"DUPLICATE"
],
"campaign_type": "CONFIGURATION",
"components": [
{
"assets": [
{
"description": "<string>",
"filename": "<string>",
"id": "<string>",
"name": "<string>",
"tags": [
"<string>"
]
}
],
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"created_date": "2025-10-24T02:00:00-07:00",
"description": "<string>",
"display_name": "<string>",
"facets": [
{
"name": "<string>",
"value": "<string>"
}
],
"id": "<string>",
"install": {},
"installed_into_socket": "<string>",
"name": "<string>",
"origin": {
"client_id": "<string>",
"component_id": "<string>",
"component_version": 123
},
"tags": [
"<string>"
],
"type": "<string>",
"types": [
"<string>"
],
"updated_date": "2025-10-24T02:00:00-07:00",
"upload_version": "<string>",
"variables": [
{
"description": "<string>",
"display_name": "<string>",
"name": "<string>",
"priority": "10",
"tags": [
"<string>"
],
"type": "ADMIN_ICON",
"source": "INHERITED",
"values": {
"default": {},
"en": {}
}
}
],
"version": 123
}
],
"description": "<string>",
"end_date": "2025-10-24T02:00:00-07:00",
"flow_steps": [
{
"apps": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"description": "<string>",
"id": "<string>",
"name": "<string>",
"type": {
"name": "<string>"
}
}
],
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"description": "<string>",
"flow_path": "<string>",
"flow_step_id": "<string>",
"icon_color": "<string>",
"icon_type": "<string>",
"metrics": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"description": "<string>",
"expression": "<string>",
"id": "<string>",
"name": "<string>",
"tags": [
"<string>"
],
"unit": "<string>"
}
],
"name": "<string>",
"sequence": 123,
"step_name": "<string>",
"tags": [
"<string>"
],
"words": {
"person_counting_name": "<string>",
"plural_noun_name": "<string>",
"rate_name": "<string>",
"singular_noun_name": "<string>",
"verb_name": "<string>"
}
}
],
"incentive": {
"id": "<string>",
"quality_rules": [
{
"action_types": [
"ANY_CLICK"
],
"enabled": true,
"id": "<string>",
"properties": {},
"rule_type": "BAD_COUNTRY"
}
],
"reward_rules": [
{
"count_rewards_based_on_partner_user_id": true,
"data_attribute_matcher_type": "EXACT",
"data_attribute_name": "<string>",
"data_attribute_value": "<string>",
"expression": {
"type": "JS",
"value": "<string>"
},
"id": "<string>",
"is_email_required": true,
"is_referral_loop_allowed": true,
"is_unique_friend_required": true,
"min_cart_value": 123,
"referrals_per_reward": 123,
"reward_count_limit": 123,
"reward_count_since_days": 123,
"reward_count_since_month": 123,
"reward_every_x_friend_actions": 123,
"reward_slots": [
"<string>"
],
"reward_supplier_id": "<string>",
"reward_value_limit": 123,
"reward_value_since_days": 123,
"reward_value_since_month": 123,
"rewardee": "ADVOCATE",
"trigger_action_type": "ANY_CLICK"
}
],
"transition_rules": [
{
"action_type": "ANY_CLICK",
"approve_high_quality": true,
"approve_low_quality": true,
"transition_period_milliseconds": 123,
"transition_rule_id": "<string>"
}
]
},
"incentive_id": "<string>",
"is_published": true,
"labels": [
{
"name": "<string>",
"type": "DATA"
}
],
"last_published_date": "2025-10-24T02:00:00-07:00",
"name": "<string>",
"parent_version": 123,
"pause_date": "2025-10-24T02:00:00-07:00",
"program_label": "<string>",
"program_type": "<string>",
"start_date": "2025-10-24T02:00:00-07:00",
"state": "ARCHIVED",
"steps": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"created_date": "2025-10-24T02:00:00-07:00",
"data": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"default_value": {},
"dimension": true,
"enabled": true,
"id": "<string>",
"key_type": "NONE",
"name": "<string>",
"persist_types": [
"JOURNEY"
],
"scope": "CLIENT",
"value": {}
}
],
"enabled": true,
"id": "<string>",
"step_builder": {},
"triggers": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"enabled": true,
"negated": true,
"parent_trigger_group_name": "<string>",
"trigger_description": "<string>",
"trigger_id": "<string>",
"trigger_name": "<string>",
"trigger_phase": "MATCHING",
"trigger_type": "ACCESS",
"trusted_scopes": [
"BACKEND"
]
}
],
"type": "CONTROLLER",
"updated_date": "2025-10-24T02:00:00-07:00",
"actions": [
{
"action_id": "<string>",
"action_type": "APPROVE",
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"enabled": true,
"quality": "ALWAYS",
"cause_type": "<string>",
"event_type": "<string>",
"force": "<string>",
"legacy_action_id": "<string>",
"note": "<string>",
"partner_event_id": "<string>",
"polling_id": "<string>",
"polling_name": "<string>",
"reward_tags": [
"<string>"
]
}
],
"aliases": [
"<string>"
],
"controller_id": "<string>",
"enabled_on_states": [
"ARCHIVED"
],
"journey_names": [
"<string>"
],
"name": "<string>",
"scope": "CLIENT",
"selectors": [
"BEST_REFERRAL"
],
"send_policy": "ALL"
}
],
"stop_date": "2025-10-24T02:00:00-07:00",
"tags": [
"<string>"
],
"theme_name": "<string>",
"updated_date": "2025-10-24T02:00:00-07:00",
"variant_selector": "<string>",
"variants": [
"<string>"
],
"version": 123
}Publish a campaign
Validates, builds, and publishes the campaign, making it live for participants. The optional request body lets callers override the publish schedule. Returns the published campaign. Validates all components, controllers, flow steps, and reward rules before publishing; validation failures return descriptive 4xx errors from the various validation exception types.
curl --request POST \
--url https://api.extole.io/v2/campaigns/{campaignId}/publish \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"launch": true,
"message": "message"
}
'import requests
url = "https://api.extole.io/v2/campaigns/{campaignId}/publish"
payload = {
"launch": True,
"message": "message"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({launch: true, message: 'message'})
};
fetch('https://api.extole.io/v2/campaigns/{campaignId}/publish', 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.extole.io/v2/campaigns/{campaignId}/publish",
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([
'launch' => true,
'message' => 'message'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.extole.io/v2/campaigns/{campaignId}/publish"
payload := strings.NewReader("{\n \"launch\": true,\n \"message\": \"message\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.extole.io/v2/campaigns/{campaignId}/publish")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"launch\": true,\n \"message\": \"message\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v2/campaigns/{campaignId}/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"launch\": true,\n \"message\": \"message\"\n}"
response = http.request(request)
puts response.read_body{
"campaign_id": "<string>",
"campaign_locks": [
"DUPLICATE"
],
"campaign_type": "CONFIGURATION",
"components": [
{
"assets": [
{
"description": "<string>",
"filename": "<string>",
"id": "<string>",
"name": "<string>",
"tags": [
"<string>"
]
}
],
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"created_date": "2025-10-24T02:00:00-07:00",
"description": "<string>",
"display_name": "<string>",
"facets": [
{
"name": "<string>",
"value": "<string>"
}
],
"id": "<string>",
"install": {},
"installed_into_socket": "<string>",
"name": "<string>",
"origin": {
"client_id": "<string>",
"component_id": "<string>",
"component_version": 123
},
"tags": [
"<string>"
],
"type": "<string>",
"types": [
"<string>"
],
"updated_date": "2025-10-24T02:00:00-07:00",
"upload_version": "<string>",
"variables": [
{
"description": "<string>",
"display_name": "<string>",
"name": "<string>",
"priority": "10",
"tags": [
"<string>"
],
"type": "ADMIN_ICON",
"source": "INHERITED",
"values": {
"default": {},
"en": {}
}
}
],
"version": 123
}
],
"description": "<string>",
"end_date": "2025-10-24T02:00:00-07:00",
"flow_steps": [
{
"apps": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"description": "<string>",
"id": "<string>",
"name": "<string>",
"type": {
"name": "<string>"
}
}
],
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"description": "<string>",
"flow_path": "<string>",
"flow_step_id": "<string>",
"icon_color": "<string>",
"icon_type": "<string>",
"metrics": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"description": "<string>",
"expression": "<string>",
"id": "<string>",
"name": "<string>",
"tags": [
"<string>"
],
"unit": "<string>"
}
],
"name": "<string>",
"sequence": 123,
"step_name": "<string>",
"tags": [
"<string>"
],
"words": {
"person_counting_name": "<string>",
"plural_noun_name": "<string>",
"rate_name": "<string>",
"singular_noun_name": "<string>",
"verb_name": "<string>"
}
}
],
"incentive": {
"id": "<string>",
"quality_rules": [
{
"action_types": [
"ANY_CLICK"
],
"enabled": true,
"id": "<string>",
"properties": {},
"rule_type": "BAD_COUNTRY"
}
],
"reward_rules": [
{
"count_rewards_based_on_partner_user_id": true,
"data_attribute_matcher_type": "EXACT",
"data_attribute_name": "<string>",
"data_attribute_value": "<string>",
"expression": {
"type": "JS",
"value": "<string>"
},
"id": "<string>",
"is_email_required": true,
"is_referral_loop_allowed": true,
"is_unique_friend_required": true,
"min_cart_value": 123,
"referrals_per_reward": 123,
"reward_count_limit": 123,
"reward_count_since_days": 123,
"reward_count_since_month": 123,
"reward_every_x_friend_actions": 123,
"reward_slots": [
"<string>"
],
"reward_supplier_id": "<string>",
"reward_value_limit": 123,
"reward_value_since_days": 123,
"reward_value_since_month": 123,
"rewardee": "ADVOCATE",
"trigger_action_type": "ANY_CLICK"
}
],
"transition_rules": [
{
"action_type": "ANY_CLICK",
"approve_high_quality": true,
"approve_low_quality": true,
"transition_period_milliseconds": 123,
"transition_rule_id": "<string>"
}
]
},
"incentive_id": "<string>",
"is_published": true,
"labels": [
{
"name": "<string>",
"type": "DATA"
}
],
"last_published_date": "2025-10-24T02:00:00-07:00",
"name": "<string>",
"parent_version": 123,
"pause_date": "2025-10-24T02:00:00-07:00",
"program_label": "<string>",
"program_type": "<string>",
"start_date": "2025-10-24T02:00:00-07:00",
"state": "ARCHIVED",
"steps": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"created_date": "2025-10-24T02:00:00-07:00",
"data": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"default_value": {},
"dimension": true,
"enabled": true,
"id": "<string>",
"key_type": "NONE",
"name": "<string>",
"persist_types": [
"JOURNEY"
],
"scope": "CLIENT",
"value": {}
}
],
"enabled": true,
"id": "<string>",
"step_builder": {},
"triggers": [
{
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"enabled": true,
"negated": true,
"parent_trigger_group_name": "<string>",
"trigger_description": "<string>",
"trigger_id": "<string>",
"trigger_name": "<string>",
"trigger_phase": "MATCHING",
"trigger_type": "ACCESS",
"trusted_scopes": [
"BACKEND"
]
}
],
"type": "CONTROLLER",
"updated_date": "2025-10-24T02:00:00-07:00",
"actions": [
{
"action_id": "<string>",
"action_type": "APPROVE",
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"enabled": true,
"quality": "ALWAYS",
"cause_type": "<string>",
"event_type": "<string>",
"force": "<string>",
"legacy_action_id": "<string>",
"note": "<string>",
"partner_event_id": "<string>",
"polling_id": "<string>",
"polling_name": "<string>",
"reward_tags": [
"<string>"
]
}
],
"aliases": [
"<string>"
],
"controller_id": "<string>",
"enabled_on_states": [
"ARCHIVED"
],
"journey_names": [
"<string>"
],
"name": "<string>",
"scope": "CLIENT",
"selectors": [
"BEST_REFERRAL"
],
"send_policy": "ALL"
}
],
"stop_date": "2025-10-24T02:00:00-07:00",
"tags": [
"<string>"
],
"theme_name": "<string>",
"updated_date": "2025-10-24T02:00:00-07:00",
"variant_selector": "<string>",
"variants": [
"<string>"
],
"version": 123
}Authorizations
Path Parameters
Response
Published campaign.
Stored campaign definition. Fields variant_selector and variants are unevaluated and appear in buildtime-evaluatable form.
DUPLICATE, EDIT CONFIGURATION, EXTENSION, INTEGRATION, MARKETING Show child attributes
Show child attributes
RFC 3339 or RFC 9557 date-time with a numeric UTC offset and an optional IANA time-zone suffix in square brackets. Precision up to milliseconds.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])(\[[^\]]+\])?$"2025-10-24T02:00:00-07:00"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
RFC 3339 or RFC 9557 date-time with a numeric UTC offset and an optional IANA time-zone suffix in square brackets. Precision up to milliseconds.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])(\[[^\]]+\])?$"2025-10-24T02:00:00-07:00"
RFC 3339 or RFC 9557 date-time with a numeric UTC offset and an optional IANA time-zone suffix in square brackets. Precision up to milliseconds.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])(\[[^\]]+\])?$"2025-10-24T02:00:00-07:00"
RFC 3339 or RFC 9557 date-time with a numeric UTC offset and an optional IANA time-zone suffix in square brackets. Precision up to milliseconds.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])(\[[^\]]+\])?$"2025-10-24T02:00:00-07:00"
ARCHIVED, ENDED, LIVE, NOT_LAUNCHED, PAUSED, STOPPED Stored campaign controller definition. Fields enabled, name, scope, enabled_on_states, selectors, aliases, journey_names, send_policy, and step_builder are unevaluated and appear in buildtime-evaluatable form.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
RFC 3339 or RFC 9557 date-time with a numeric UTC offset and an optional IANA time-zone suffix in square brackets. Precision up to milliseconds.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])(\[[^\]]+\])?$"2025-10-24T02:00:00-07:00"
RFC 3339 or RFC 9557 date-time with a numeric UTC offset and an optional IANA time-zone suffix in square brackets. Precision up to milliseconds.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?(Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9])(\[[^\]]+\])?$"2025-10-24T02:00:00-07:00"
The variant selector as configured: a literal value, or an expression (type:string) when defined dynamically. Buildtime expressions use CampaignBuildtimeContext. Runtime expressions use VariantSelectionContext.
The variants as configured: a literal value, or an expression (type:string) when defined dynamically. Buildtime expressions use CampaignBuildtimeContext.
