Save policy
curl --request POST \
--url https://agenticadvertising.org/api/policies/save \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"policy_id": "my_brand_safety",
"version": "1.0.0",
"name": "Acme Corp Brand Safety",
"policy": "Ads must not appear adjacent to content depicting violence...",
"description": "<string>",
"jurisdictions": [
"<string>"
],
"region_aliases": {},
"policy_categories": [
"<string>"
],
"channels": [
"<string>"
],
"effective_date": "<string>",
"sunset_date": "<string>",
"governance_domains": [
"<string>"
],
"source_url": "<string>",
"source_name": "<string>",
"guidance": "<string>",
"exemplars": {
"pass": [
{
"scenario": "<string>",
"explanation": "<string>"
}
],
"fail": [
{
"scenario": "<string>",
"explanation": "<string>"
}
]
},
"ext": {}
}
'import requests
url = "https://agenticadvertising.org/api/policies/save"
payload = {
"policy_id": "my_brand_safety",
"version": "1.0.0",
"name": "Acme Corp Brand Safety",
"policy": "Ads must not appear adjacent to content depicting violence...",
"description": "<string>",
"jurisdictions": ["<string>"],
"region_aliases": {},
"policy_categories": ["<string>"],
"channels": ["<string>"],
"effective_date": "<string>",
"sunset_date": "<string>",
"governance_domains": ["<string>"],
"source_url": "<string>",
"source_name": "<string>",
"guidance": "<string>",
"exemplars": {
"pass": [
{
"scenario": "<string>",
"explanation": "<string>"
}
],
"fail": [
{
"scenario": "<string>",
"explanation": "<string>"
}
]
},
"ext": {}
}
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({
policy_id: 'my_brand_safety',
version: '1.0.0',
name: 'Acme Corp Brand Safety',
policy: 'Ads must not appear adjacent to content depicting violence...',
description: '<string>',
jurisdictions: ['<string>'],
region_aliases: {},
policy_categories: ['<string>'],
channels: ['<string>'],
effective_date: '<string>',
sunset_date: '<string>',
governance_domains: ['<string>'],
source_url: '<string>',
source_name: '<string>',
guidance: '<string>',
exemplars: {
pass: [{scenario: '<string>', explanation: '<string>'}],
fail: [{scenario: '<string>', explanation: '<string>'}]
},
ext: {}
})
};
fetch('https://agenticadvertising.org/api/policies/save', 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://agenticadvertising.org/api/policies/save",
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([
'policy_id' => 'my_brand_safety',
'version' => '1.0.0',
'name' => 'Acme Corp Brand Safety',
'policy' => 'Ads must not appear adjacent to content depicting violence...',
'description' => '<string>',
'jurisdictions' => [
'<string>'
],
'region_aliases' => [
],
'policy_categories' => [
'<string>'
],
'channels' => [
'<string>'
],
'effective_date' => '<string>',
'sunset_date' => '<string>',
'governance_domains' => [
'<string>'
],
'source_url' => '<string>',
'source_name' => '<string>',
'guidance' => '<string>',
'exemplars' => [
'pass' => [
[
'scenario' => '<string>',
'explanation' => '<string>'
]
],
'fail' => [
[
'scenario' => '<string>',
'explanation' => '<string>'
]
]
],
'ext' => [
]
]),
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://agenticadvertising.org/api/policies/save"
payload := strings.NewReader("{\n \"policy_id\": \"my_brand_safety\",\n \"version\": \"1.0.0\",\n \"name\": \"Acme Corp Brand Safety\",\n \"policy\": \"Ads must not appear adjacent to content depicting violence...\",\n \"description\": \"<string>\",\n \"jurisdictions\": [\n \"<string>\"\n ],\n \"region_aliases\": {},\n \"policy_categories\": [\n \"<string>\"\n ],\n \"channels\": [\n \"<string>\"\n ],\n \"effective_date\": \"<string>\",\n \"sunset_date\": \"<string>\",\n \"governance_domains\": [\n \"<string>\"\n ],\n \"source_url\": \"<string>\",\n \"source_name\": \"<string>\",\n \"guidance\": \"<string>\",\n \"exemplars\": {\n \"pass\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ],\n \"fail\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ]\n },\n \"ext\": {}\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://agenticadvertising.org/api/policies/save")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy_id\": \"my_brand_safety\",\n \"version\": \"1.0.0\",\n \"name\": \"Acme Corp Brand Safety\",\n \"policy\": \"Ads must not appear adjacent to content depicting violence...\",\n \"description\": \"<string>\",\n \"jurisdictions\": [\n \"<string>\"\n ],\n \"region_aliases\": {},\n \"policy_categories\": [\n \"<string>\"\n ],\n \"channels\": [\n \"<string>\"\n ],\n \"effective_date\": \"<string>\",\n \"sunset_date\": \"<string>\",\n \"governance_domains\": [\n \"<string>\"\n ],\n \"source_url\": \"<string>\",\n \"source_name\": \"<string>\",\n \"guidance\": \"<string>\",\n \"exemplars\": {\n \"pass\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ],\n \"fail\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ]\n },\n \"ext\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agenticadvertising.org/api/policies/save")
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 \"policy_id\": \"my_brand_safety\",\n \"version\": \"1.0.0\",\n \"name\": \"Acme Corp Brand Safety\",\n \"policy\": \"Ads must not appear adjacent to content depicting violence...\",\n \"description\": \"<string>\",\n \"jurisdictions\": [\n \"<string>\"\n ],\n \"region_aliases\": {},\n \"policy_categories\": [\n \"<string>\"\n ],\n \"channels\": [\n \"<string>\"\n ],\n \"effective_date\": \"<string>\",\n \"sunset_date\": \"<string>\",\n \"governance_domains\": [\n \"<string>\"\n ],\n \"source_url\": \"<string>\",\n \"source_name\": \"<string>\",\n \"guidance\": \"<string>\",\n \"exemplars\": {\n \"pass\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ],\n \"fail\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ]\n },\n \"ext\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"policy_id": "<string>",
"revision_number": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"policy_id": "<string>"
}{
"error": "<string>"
}Policy Registry
Save policy
Create or update a community-contributed policy. Requires authentication. Registry-sourced and pending-review policies cannot be edited (returns 409). Updates automatically create a revision record.
POST
/
api
/
policies
/
save
Save policy
curl --request POST \
--url https://agenticadvertising.org/api/policies/save \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"policy_id": "my_brand_safety",
"version": "1.0.0",
"name": "Acme Corp Brand Safety",
"policy": "Ads must not appear adjacent to content depicting violence...",
"description": "<string>",
"jurisdictions": [
"<string>"
],
"region_aliases": {},
"policy_categories": [
"<string>"
],
"channels": [
"<string>"
],
"effective_date": "<string>",
"sunset_date": "<string>",
"governance_domains": [
"<string>"
],
"source_url": "<string>",
"source_name": "<string>",
"guidance": "<string>",
"exemplars": {
"pass": [
{
"scenario": "<string>",
"explanation": "<string>"
}
],
"fail": [
{
"scenario": "<string>",
"explanation": "<string>"
}
]
},
"ext": {}
}
'import requests
url = "https://agenticadvertising.org/api/policies/save"
payload = {
"policy_id": "my_brand_safety",
"version": "1.0.0",
"name": "Acme Corp Brand Safety",
"policy": "Ads must not appear adjacent to content depicting violence...",
"description": "<string>",
"jurisdictions": ["<string>"],
"region_aliases": {},
"policy_categories": ["<string>"],
"channels": ["<string>"],
"effective_date": "<string>",
"sunset_date": "<string>",
"governance_domains": ["<string>"],
"source_url": "<string>",
"source_name": "<string>",
"guidance": "<string>",
"exemplars": {
"pass": [
{
"scenario": "<string>",
"explanation": "<string>"
}
],
"fail": [
{
"scenario": "<string>",
"explanation": "<string>"
}
]
},
"ext": {}
}
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({
policy_id: 'my_brand_safety',
version: '1.0.0',
name: 'Acme Corp Brand Safety',
policy: 'Ads must not appear adjacent to content depicting violence...',
description: '<string>',
jurisdictions: ['<string>'],
region_aliases: {},
policy_categories: ['<string>'],
channels: ['<string>'],
effective_date: '<string>',
sunset_date: '<string>',
governance_domains: ['<string>'],
source_url: '<string>',
source_name: '<string>',
guidance: '<string>',
exemplars: {
pass: [{scenario: '<string>', explanation: '<string>'}],
fail: [{scenario: '<string>', explanation: '<string>'}]
},
ext: {}
})
};
fetch('https://agenticadvertising.org/api/policies/save', 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://agenticadvertising.org/api/policies/save",
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([
'policy_id' => 'my_brand_safety',
'version' => '1.0.0',
'name' => 'Acme Corp Brand Safety',
'policy' => 'Ads must not appear adjacent to content depicting violence...',
'description' => '<string>',
'jurisdictions' => [
'<string>'
],
'region_aliases' => [
],
'policy_categories' => [
'<string>'
],
'channels' => [
'<string>'
],
'effective_date' => '<string>',
'sunset_date' => '<string>',
'governance_domains' => [
'<string>'
],
'source_url' => '<string>',
'source_name' => '<string>',
'guidance' => '<string>',
'exemplars' => [
'pass' => [
[
'scenario' => '<string>',
'explanation' => '<string>'
]
],
'fail' => [
[
'scenario' => '<string>',
'explanation' => '<string>'
]
]
],
'ext' => [
]
]),
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://agenticadvertising.org/api/policies/save"
payload := strings.NewReader("{\n \"policy_id\": \"my_brand_safety\",\n \"version\": \"1.0.0\",\n \"name\": \"Acme Corp Brand Safety\",\n \"policy\": \"Ads must not appear adjacent to content depicting violence...\",\n \"description\": \"<string>\",\n \"jurisdictions\": [\n \"<string>\"\n ],\n \"region_aliases\": {},\n \"policy_categories\": [\n \"<string>\"\n ],\n \"channels\": [\n \"<string>\"\n ],\n \"effective_date\": \"<string>\",\n \"sunset_date\": \"<string>\",\n \"governance_domains\": [\n \"<string>\"\n ],\n \"source_url\": \"<string>\",\n \"source_name\": \"<string>\",\n \"guidance\": \"<string>\",\n \"exemplars\": {\n \"pass\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ],\n \"fail\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ]\n },\n \"ext\": {}\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://agenticadvertising.org/api/policies/save")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy_id\": \"my_brand_safety\",\n \"version\": \"1.0.0\",\n \"name\": \"Acme Corp Brand Safety\",\n \"policy\": \"Ads must not appear adjacent to content depicting violence...\",\n \"description\": \"<string>\",\n \"jurisdictions\": [\n \"<string>\"\n ],\n \"region_aliases\": {},\n \"policy_categories\": [\n \"<string>\"\n ],\n \"channels\": [\n \"<string>\"\n ],\n \"effective_date\": \"<string>\",\n \"sunset_date\": \"<string>\",\n \"governance_domains\": [\n \"<string>\"\n ],\n \"source_url\": \"<string>\",\n \"source_name\": \"<string>\",\n \"guidance\": \"<string>\",\n \"exemplars\": {\n \"pass\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ],\n \"fail\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ]\n },\n \"ext\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agenticadvertising.org/api/policies/save")
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 \"policy_id\": \"my_brand_safety\",\n \"version\": \"1.0.0\",\n \"name\": \"Acme Corp Brand Safety\",\n \"policy\": \"Ads must not appear adjacent to content depicting violence...\",\n \"description\": \"<string>\",\n \"jurisdictions\": [\n \"<string>\"\n ],\n \"region_aliases\": {},\n \"policy_categories\": [\n \"<string>\"\n ],\n \"channels\": [\n \"<string>\"\n ],\n \"effective_date\": \"<string>\",\n \"sunset_date\": \"<string>\",\n \"governance_domains\": [\n \"<string>\"\n ],\n \"source_url\": \"<string>\",\n \"source_name\": \"<string>\",\n \"guidance\": \"<string>\",\n \"exemplars\": {\n \"pass\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ],\n \"fail\": [\n {\n \"scenario\": \"<string>\",\n \"explanation\": \"<string>\"\n }\n ]\n },\n \"ext\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"policy_id": "<string>",
"revision_number": 123
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"policy_id": "<string>"
}{
"error": "<string>"
}Authorizations
bearerAuthoauth2
Bearer token in the Authorization header. Two token types are accepted:
- Organization API key (
sk_...) issued via the dashboard. Org-scoped, long-lived, for server-to-server use. - User JWT obtained via the OAuth 2.1 authorization code flow with PKCE. User-scoped, short-lived. Discover the authorization server at
/.well-known/oauth-authorization-serverand the protected-resource metadata at/.well-known/oauth-protected-resource/api.
Body
application/json
Lowercase alphanumeric with underscores
Example:
"my_brand_safety"
Example:
"1.0.0"
Example:
"Acme Corp Brand Safety"
Available options:
regulation, standard Available options:
must, should, may Example:
"Ads must not appear adjacent to content depicting violence..."
Show child attributes
Show child attributes
Must use http:// or https://
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I