SetPaidMediaCampaignConversionGoalsAPI mirrors
curl --request POST \
--url https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversion_action_ids": [
"<string>"
],
"customer_id": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals"
payload = {
"conversion_action_ids": ["<string>"],
"customer_id": "<string>"
}
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({conversion_action_ids: ['<string>'], customer_id: '<string>'})
};
fetch('https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals', 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.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals",
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([
'conversion_action_ids' => [
'<string>'
],
'customer_id' => '<string>'
]),
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.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals"
payload := strings.NewReader("{\n \"conversion_action_ids\": [\n \"<string>\"\n ],\n \"customer_id\": \"<string>\"\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.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversion_action_ids\": [\n \"<string>\"\n ],\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals")
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 \"conversion_action_ids\": [\n \"<string>\"\n ],\n \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"campaign_id": "<string>",
"conversion_action_ids": [
"<string>"
],
"customer_id": "<string>",
"status": "ready",
"approval_request_id": "<string>",
"conversion_goal": {},
"goal_config_level": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}API Reference
SetPaidMediaCampaignConversionGoalsAPI mirrors
erdo_set_paid_media_campaign_conversion_goals: scope one campaign to exactly the requested conversion actions through the same approval-gated agent action. It never changes campaign status or bidding. An omitted customer_id uses the selected operating account. When the campaign’s custom goal already equals the requested set it answers ready and writes nothing.
POST
/
v1
/
paid-media
/
campaigns
/
{externalID}
/
conversion-goals
SetPaidMediaCampaignConversionGoalsAPI mirrors
curl --request POST \
--url https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversion_action_ids": [
"<string>"
],
"customer_id": "<string>"
}
'import requests
url = "https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals"
payload = {
"conversion_action_ids": ["<string>"],
"customer_id": "<string>"
}
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({conversion_action_ids: ['<string>'], customer_id: '<string>'})
};
fetch('https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals', 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.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals",
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([
'conversion_action_ids' => [
'<string>'
],
'customer_id' => '<string>'
]),
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.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals"
payload := strings.NewReader("{\n \"conversion_action_ids\": [\n \"<string>\"\n ],\n \"customer_id\": \"<string>\"\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.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"conversion_action_ids\": [\n \"<string>\"\n ],\n \"customer_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/conversion-goals")
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 \"conversion_action_ids\": [\n \"<string>\"\n ],\n \"customer_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"campaign_id": "<string>",
"conversion_action_ids": [
"<string>"
],
"customer_id": "<string>",
"status": "ready",
"approval_request_id": "<string>",
"conversion_goal": {},
"goal_config_level": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).
Path Parameters
Body
application/json
Response
Campaign conversion-goal scope or pending approval
requested set (no write) or a standing policy approved the action and it executed; "pending_approval" when a human decision is now pending.
Available options:
ready, pending_approval present goal on a no-write ready): goal_resource_name, conversion_actions, reused_existing_goal, inherited_goals_disabled.

