curl --request PUT \
--url https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_ids": [
"component_id"
],
"component_references": [
{
"component_id": "component_id",
"socket_names": [
"socket_name"
]
}
],
"data": {
"data_key": {}
},
"enabled": true,
"event_time": "2025-10-24T09:00:00.000Z",
"extra_data": {
"extra_data_key": {}
},
"polling_id": "polling_id",
"program_domain_id": "program_domain_id",
"quality": "ALWAYS",
"reward_action_id": "reward_action_id",
"reward_name": "reward_name",
"reward_supplier_id": {},
"sandbox": "sandbox",
"slots": [
"slot"
],
"tags": [
"tag"
],
"value_of_event_being_rewarded": {}
}
'import requests
url = "https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}"
payload = {
"component_ids": ["component_id"],
"component_references": [
{
"component_id": "component_id",
"socket_names": ["socket_name"]
}
],
"data": { "data_key": {} },
"enabled": True,
"event_time": "2025-10-24T09:00:00.000Z",
"extra_data": { "extra_data_key": {} },
"polling_id": "polling_id",
"program_domain_id": "program_domain_id",
"quality": "ALWAYS",
"reward_action_id": "reward_action_id",
"reward_name": "reward_name",
"reward_supplier_id": {},
"sandbox": "sandbox",
"slots": ["slot"],
"tags": ["tag"],
"value_of_event_being_rewarded": {}
}
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({
component_ids: ['component_id'],
component_references: [{component_id: 'component_id', socket_names: ['socket_name']}],
data: {data_key: {}},
enabled: true,
event_time: '2025-10-24T09:00:00.000Z',
extra_data: {extra_data_key: {}},
polling_id: 'polling_id',
program_domain_id: 'program_domain_id',
quality: 'ALWAYS',
reward_action_id: 'reward_action_id',
reward_name: 'reward_name',
reward_supplier_id: {},
sandbox: 'sandbox',
slots: ['slot'],
tags: ['tag'],
value_of_event_being_rewarded: {}
})
};
fetch('https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}', 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}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}",
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([
'component_ids' => [
'component_id'
],
'component_references' => [
[
'component_id' => 'component_id',
'socket_names' => [
'socket_name'
]
]
],
'data' => [
'data_key' => [
]
],
'enabled' => true,
'event_time' => '2025-10-24T09:00:00.000Z',
'extra_data' => [
'extra_data_key' => [
]
],
'polling_id' => 'polling_id',
'program_domain_id' => 'program_domain_id',
'quality' => 'ALWAYS',
'reward_action_id' => 'reward_action_id',
'reward_name' => 'reward_name',
'reward_supplier_id' => [
],
'sandbox' => 'sandbox',
'slots' => [
'slot'
],
'tags' => [
'tag'
],
'value_of_event_being_rewarded' => [
]
]),
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}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}"
payload := strings.NewReader("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"data\": {\n \"data_key\": {}\n },\n \"enabled\": true,\n \"event_time\": \"2025-10-24T09:00:00.000Z\",\n \"extra_data\": {\n \"extra_data_key\": {}\n },\n \"polling_id\": \"polling_id\",\n \"program_domain_id\": \"program_domain_id\",\n \"quality\": \"ALWAYS\",\n \"reward_action_id\": \"reward_action_id\",\n \"reward_name\": \"reward_name\",\n \"reward_supplier_id\": {},\n \"sandbox\": \"sandbox\",\n \"slots\": [\n \"slot\"\n ],\n \"tags\": [\n \"tag\"\n ],\n \"value_of_event_being_rewarded\": {}\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.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"data\": {\n \"data_key\": {}\n },\n \"enabled\": true,\n \"event_time\": \"2025-10-24T09:00:00.000Z\",\n \"extra_data\": {\n \"extra_data_key\": {}\n },\n \"polling_id\": \"polling_id\",\n \"program_domain_id\": \"program_domain_id\",\n \"quality\": \"ALWAYS\",\n \"reward_action_id\": \"reward_action_id\",\n \"reward_name\": \"reward_name\",\n \"reward_supplier_id\": {},\n \"sandbox\": \"sandbox\",\n \"slots\": [\n \"slot\"\n ],\n \"tags\": [\n \"tag\"\n ],\n \"value_of_event_being_rewarded\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}")
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 \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"data\": {\n \"data_key\": {}\n },\n \"enabled\": true,\n \"event_time\": \"2025-10-24T09:00:00.000Z\",\n \"extra_data\": {\n \"extra_data_key\": {}\n },\n \"polling_id\": \"polling_id\",\n \"program_domain_id\": \"program_domain_id\",\n \"quality\": \"ALWAYS\",\n \"reward_action_id\": \"reward_action_id\",\n \"reward_name\": \"reward_name\",\n \"reward_supplier_id\": {},\n \"sandbox\": \"sandbox\",\n \"slots\": [\n \"slot\"\n ],\n \"tags\": [\n \"tag\"\n ],\n \"value_of_event_being_rewarded\": {}\n}"
response = http.request(request)
puts response.read_body{
"action_id": "<string>",
"action_type": "EARN_REWARD",
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"enabled": true,
"data": {},
"event_time": "2025-10-24T09:00:00.000Z",
"extra_data": {},
"reward_action_id": "<string>",
"reward_name": "<string>",
"reward_supplier_id": "<string>",
"slots": [
"<string>"
],
"tags": [
"<string>"
],
"value_of_event_being_rewarded": {}
}Update an earn-reward action
Updates the earn-reward action on the specified campaign controller. Only fields present in the request body are changed. Returns the updated action.
curl --request PUT \
--url https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_ids": [
"component_id"
],
"component_references": [
{
"component_id": "component_id",
"socket_names": [
"socket_name"
]
}
],
"data": {
"data_key": {}
},
"enabled": true,
"event_time": "2025-10-24T09:00:00.000Z",
"extra_data": {
"extra_data_key": {}
},
"polling_id": "polling_id",
"program_domain_id": "program_domain_id",
"quality": "ALWAYS",
"reward_action_id": "reward_action_id",
"reward_name": "reward_name",
"reward_supplier_id": {},
"sandbox": "sandbox",
"slots": [
"slot"
],
"tags": [
"tag"
],
"value_of_event_being_rewarded": {}
}
'import requests
url = "https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}"
payload = {
"component_ids": ["component_id"],
"component_references": [
{
"component_id": "component_id",
"socket_names": ["socket_name"]
}
],
"data": { "data_key": {} },
"enabled": True,
"event_time": "2025-10-24T09:00:00.000Z",
"extra_data": { "extra_data_key": {} },
"polling_id": "polling_id",
"program_domain_id": "program_domain_id",
"quality": "ALWAYS",
"reward_action_id": "reward_action_id",
"reward_name": "reward_name",
"reward_supplier_id": {},
"sandbox": "sandbox",
"slots": ["slot"],
"tags": ["tag"],
"value_of_event_being_rewarded": {}
}
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({
component_ids: ['component_id'],
component_references: [{component_id: 'component_id', socket_names: ['socket_name']}],
data: {data_key: {}},
enabled: true,
event_time: '2025-10-24T09:00:00.000Z',
extra_data: {extra_data_key: {}},
polling_id: 'polling_id',
program_domain_id: 'program_domain_id',
quality: 'ALWAYS',
reward_action_id: 'reward_action_id',
reward_name: 'reward_name',
reward_supplier_id: {},
sandbox: 'sandbox',
slots: ['slot'],
tags: ['tag'],
value_of_event_being_rewarded: {}
})
};
fetch('https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}', 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}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}",
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([
'component_ids' => [
'component_id'
],
'component_references' => [
[
'component_id' => 'component_id',
'socket_names' => [
'socket_name'
]
]
],
'data' => [
'data_key' => [
]
],
'enabled' => true,
'event_time' => '2025-10-24T09:00:00.000Z',
'extra_data' => [
'extra_data_key' => [
]
],
'polling_id' => 'polling_id',
'program_domain_id' => 'program_domain_id',
'quality' => 'ALWAYS',
'reward_action_id' => 'reward_action_id',
'reward_name' => 'reward_name',
'reward_supplier_id' => [
],
'sandbox' => 'sandbox',
'slots' => [
'slot'
],
'tags' => [
'tag'
],
'value_of_event_being_rewarded' => [
]
]),
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}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}"
payload := strings.NewReader("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"data\": {\n \"data_key\": {}\n },\n \"enabled\": true,\n \"event_time\": \"2025-10-24T09:00:00.000Z\",\n \"extra_data\": {\n \"extra_data_key\": {}\n },\n \"polling_id\": \"polling_id\",\n \"program_domain_id\": \"program_domain_id\",\n \"quality\": \"ALWAYS\",\n \"reward_action_id\": \"reward_action_id\",\n \"reward_name\": \"reward_name\",\n \"reward_supplier_id\": {},\n \"sandbox\": \"sandbox\",\n \"slots\": [\n \"slot\"\n ],\n \"tags\": [\n \"tag\"\n ],\n \"value_of_event_being_rewarded\": {}\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.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"data\": {\n \"data_key\": {}\n },\n \"enabled\": true,\n \"event_time\": \"2025-10-24T09:00:00.000Z\",\n \"extra_data\": {\n \"extra_data_key\": {}\n },\n \"polling_id\": \"polling_id\",\n \"program_domain_id\": \"program_domain_id\",\n \"quality\": \"ALWAYS\",\n \"reward_action_id\": \"reward_action_id\",\n \"reward_name\": \"reward_name\",\n \"reward_supplier_id\": {},\n \"sandbox\": \"sandbox\",\n \"slots\": [\n \"slot\"\n ],\n \"tags\": [\n \"tag\"\n ],\n \"value_of_event_being_rewarded\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/earn-rewards/{actionId}")
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 \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"data\": {\n \"data_key\": {}\n },\n \"enabled\": true,\n \"event_time\": \"2025-10-24T09:00:00.000Z\",\n \"extra_data\": {\n \"extra_data_key\": {}\n },\n \"polling_id\": \"polling_id\",\n \"program_domain_id\": \"program_domain_id\",\n \"quality\": \"ALWAYS\",\n \"reward_action_id\": \"reward_action_id\",\n \"reward_name\": \"reward_name\",\n \"reward_supplier_id\": {},\n \"sandbox\": \"sandbox\",\n \"slots\": [\n \"slot\"\n ],\n \"tags\": [\n \"tag\"\n ],\n \"value_of_event_being_rewarded\": {}\n}"
response = http.request(request)
puts response.read_body{
"action_id": "<string>",
"action_type": "EARN_REWARD",
"component_ids": [
"<string>"
],
"component_references": [
{
"component_id": "<string>",
"socket_names": [
"<string>"
]
}
],
"enabled": true,
"data": {},
"event_time": "2025-10-24T09:00:00.000Z",
"extra_data": {},
"reward_action_id": "<string>",
"reward_name": "<string>",
"reward_supplier_id": "<string>",
"slots": [
"<string>"
],
"tags": [
"<string>"
],
"value_of_event_being_rewarded": {}
}Authorizations
Path Parameters
(/version/.+)?Body
Body of a PUT /v2/campaigns/{campaignId}{version:(/version/.+)?}/controllers/{controllerId}/actions/earn-rewards/{actionId} request.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Choose between static or dynamic enabled
Choose between static or dynamic event time
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$"2025-10-24T09:00:00.000Z"
Choose between static or dynamic extra data
Show child attributes
Show child attributes
ALWAYS, HIGH, LOW Choose between static or dynamic reward action id
Choose between static or dynamic reward name
Choose between static or dynamic reward supplier id
Choose between static or dynamic slots
Choose between static or dynamic tags
Choose between static or dynamic value of event being rewarded
Response
Successful response
EARN_REWARD Show child attributes
Show child attributes
The enabled as configured: a literal value, or an expression (type:string) when defined dynamically.
ALWAYS, HIGH, LOW Show child attributes
Show child attributes
The event time as configured: a literal value, or an expression (type:string) when defined dynamically.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,3})?Z$"2025-10-24T09:00:00.000Z"
The extra data as configured: a literal value, or an expression (type:string) when defined dynamically.
Show child attributes
Show child attributes
The reward action id as configured: a literal value, or an expression (type:string) when defined dynamically.
The reward name as configured: a literal value, or an expression (type:string) when defined dynamically.
The reward supplier id as configured: a literal value, or an expression (type:string) when defined dynamically.
The slots as configured: a literal value, or an expression (type:string) when defined dynamically.
The tags as configured: a literal value, or an expression (type:string) when defined dynamically.
The value of event being rewarded as configured: a literal value, or an expression (type:string) when defined dynamically.
