curl --request GET \
--url https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy \
--header 'Authorization: Bearer <token>'import requests
url = "https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy', 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://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"workspace_id": 123,
"execution_mode": "ask",
"agent_mode": "ask",
"auto_permissions": {
"pause": true,
"activate_ad": true,
"activate_campaign_or_ad_set": true,
"lower_budget": true,
"raise_budget": true,
"upload_image": true,
"create_paused_ad": true,
"create_or_duplicate_ad_set": true,
"create_campaign": true,
"create_automation": true,
"edit_automation": true,
"turn_on_automation": true
},
"outcome_check_after_hours": 123,
"anomaly_threshold_percent": "<string>",
"account_policy": {
"daily_budget_ceiling_minor": "<string>",
"currency": "<string>",
"revision": 123,
"note": "<string>"
}
}
}{
"error": "invalid_token",
"error_description": "<string>"
}{
"error": "invalid_token",
"error_description": "<string>"
}{
"error": {
"code": "api_route_not_found",
"message": "<string>",
"resolution": "<string>"
},
"request": {
"method": "<string>",
"path": "<string>"
},
"resources": {
"documentation": "<string>",
"openapi": "<string>"
}
}{
"message": "<string>",
"errors": {}
}Get action policy
Read persisted Actions data for the authorized account. Unbound keys require exactly one active account; account_id cannot select among multiple accounts.
curl --request GET \
--url https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy \
--header 'Authorization: Bearer <token>'import requests
url = "https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy', 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://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://plainrouter.com/api/v1/agent/workspaces/{workspace}/actions/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"workspace_id": 123,
"execution_mode": "ask",
"agent_mode": "ask",
"auto_permissions": {
"pause": true,
"activate_ad": true,
"activate_campaign_or_ad_set": true,
"lower_budget": true,
"raise_budget": true,
"upload_image": true,
"create_paused_ad": true,
"create_or_duplicate_ad_set": true,
"create_campaign": true,
"create_automation": true,
"edit_automation": true,
"turn_on_automation": true
},
"outcome_check_after_hours": 123,
"anomaly_threshold_percent": "<string>",
"account_policy": {
"daily_budget_ceiling_minor": "<string>",
"currency": "<string>",
"revision": 123,
"note": "<string>"
}
}
}{
"error": "invalid_token",
"error_description": "<string>"
}{
"error": "invalid_token",
"error_description": "<string>"
}{
"error": {
"code": "api_route_not_found",
"message": "<string>",
"resolution": "<string>"
},
"request": {
"method": "<string>",
"path": "<string>"
},
"resources": {
"documentation": "<string>",
"openapi": "<string>"
}
}{
"message": "<string>",
"errors": {}
}Authorizations
Workspace key with read-actions for reads or propose-actions for writes. Optional positive account ID. A bound key may name only its own account; a different ID returns 422. An unbound key requires exactly one active available advertising account with an active connection; omission uses that account and a supplied ID must match it. Multiple active accounts return 422 even when account_id is supplied.
Query Parameters
Optional positive account ID. A bound key may name only its own account; a different ID returns 422. An unbound key requires exactly one active available advertising account with an active connection; omission uses that account and a supplied ID must match it. Multiple active accounts return 422 even when account_id is supplied.
x >= 1