curl --request POST \
--url https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/negative-keywords \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
{
"match_type": "<string>",
"text": "<string>"
}
],
"adgroup_id": "<string>",
"customer_id": "<string>",
"provider": "<string>",
"reason": "<string>",
"remove": [
{
"match_type": "<string>",
"text": "<string>"
}
]
}
'import requests
url = "https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/negative-keywords"
payload = {
"add": [
{
"match_type": "<string>",
"text": "<string>"
}
],
"adgroup_id": "<string>",
"customer_id": "<string>",
"provider": "<string>",
"reason": "<string>",
"remove": [
{
"match_type": "<string>",
"text": "<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({
add: [{match_type: '<string>', text: '<string>'}],
adgroup_id: '<string>',
customer_id: '<string>',
provider: '<string>',
reason: '<string>',
remove: [{match_type: '<string>', text: '<string>'}]
})
};
fetch('https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/negative-keywords', 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}/negative-keywords",
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([
'add' => [
[
'match_type' => '<string>',
'text' => '<string>'
]
],
'adgroup_id' => '<string>',
'customer_id' => '<string>',
'provider' => '<string>',
'reason' => '<string>',
'remove' => [
[
'match_type' => '<string>',
'text' => '<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}/negative-keywords"
payload := strings.NewReader("{\n \"add\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ],\n \"adgroup_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"provider\": \"<string>\",\n \"reason\": \"<string>\",\n \"remove\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\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}/negative-keywords")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ],\n \"adgroup_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"provider\": \"<string>\",\n \"reason\": \"<string>\",\n \"remove\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/negative-keywords")
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 \"add\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ],\n \"adgroup_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"provider\": \"<string>\",\n \"reason\": \"<string>\",\n \"remove\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"action_display": "<string>",
"approval_request_id": "<string>",
"decline": {
"approval_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by_external_ref": "<string>",
"decided_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>"
},
"execution_phase": "<string>",
"result": {},
"status": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}SetPaidMediaNegativeKeywordsAPI adds and removes campaign or ad-group
negative keywords. Existing keywords are skipped, and the result lists what changed.
curl --request POST \
--url https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/negative-keywords \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
{
"match_type": "<string>",
"text": "<string>"
}
],
"adgroup_id": "<string>",
"customer_id": "<string>",
"provider": "<string>",
"reason": "<string>",
"remove": [
{
"match_type": "<string>",
"text": "<string>"
}
]
}
'import requests
url = "https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/negative-keywords"
payload = {
"add": [
{
"match_type": "<string>",
"text": "<string>"
}
],
"adgroup_id": "<string>",
"customer_id": "<string>",
"provider": "<string>",
"reason": "<string>",
"remove": [
{
"match_type": "<string>",
"text": "<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({
add: [{match_type: '<string>', text: '<string>'}],
adgroup_id: '<string>',
customer_id: '<string>',
provider: '<string>',
reason: '<string>',
remove: [{match_type: '<string>', text: '<string>'}]
})
};
fetch('https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/negative-keywords', 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}/negative-keywords",
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([
'add' => [
[
'match_type' => '<string>',
'text' => '<string>'
]
],
'adgroup_id' => '<string>',
'customer_id' => '<string>',
'provider' => '<string>',
'reason' => '<string>',
'remove' => [
[
'match_type' => '<string>',
'text' => '<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}/negative-keywords"
payload := strings.NewReader("{\n \"add\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ],\n \"adgroup_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"provider\": \"<string>\",\n \"reason\": \"<string>\",\n \"remove\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\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}/negative-keywords")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ],\n \"adgroup_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"provider\": \"<string>\",\n \"reason\": \"<string>\",\n \"remove\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erdo.ai/v1/paid-media/campaigns/{externalID}/negative-keywords")
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 \"add\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ],\n \"adgroup_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"provider\": \"<string>\",\n \"reason\": \"<string>\",\n \"remove\": [\n {\n \"match_type\": \"<string>\",\n \"text\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"action_display": "<string>",
"approval_request_id": "<string>",
"decline": {
"approval_request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"decided_at": "2023-11-07T05:31:56Z",
"decided_by_external_ref": "<string>",
"decided_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>"
},
"execution_phase": "<string>",
"result": {},
"status": "<string>"
}{
"code": "not_found",
"details": {},
"message": "<string>"
}Authorizations
Body
Response
Success response
"pending_approval". Decide it via POST /v1/approvals/{id}/decide or the activity feed; on approval the action executes. Re-proposing the same change dedupes onto this id. When Status is "in_progress" it is the already-APPROVED request whose execution is still running; there is nothing to decide.
action and the provider call was made, "pending_approval" when the action now awaits a human decision (202-style: accepted, not performed), "in_progress" when this exact change is already approved and that approved execution has not reported a result (nothing was filed and nothing ran; see ExecutionPhase), or "declined" when a person's recent reasoned rejection of this same change holds and no card was filed (see Decline).

