Skip to main content
POST
/
api
/
brands
/
setup-my-brand
Set up a hosted brand.json
curl --request POST \
  --url https://agenticadvertising.org/api/brands/setup-my-brand \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "acmecorp.com",
  "brand_name": "<string>",
  "brand_json": {},
  "logo_url": "<string>",
  "brand_color": "<string>"
}
'
import requests

url = "https://agenticadvertising.org/api/brands/setup-my-brand"

payload = {
    "domain": "acmecorp.com",
    "brand_name": "<string>",
    "brand_json": {},
    "logo_url": "<string>",
    "brand_color": "<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({
    domain: 'acmecorp.com',
    brand_name: '<string>',
    brand_json: {},
    logo_url: '<string>',
    brand_color: '<string>'
  })
};

fetch('https://agenticadvertising.org/api/brands/setup-my-brand', 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/brands/setup-my-brand",
  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([
    'domain' => 'acmecorp.com',
    'brand_name' => '<string>',
    'brand_json' => [
        
    ],
    'logo_url' => '<string>',
    'brand_color' => '<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://agenticadvertising.org/api/brands/setup-my-brand"

	payload := strings.NewReader("{\n  \"domain\": \"acmecorp.com\",\n  \"brand_name\": \"<string>\",\n  \"brand_json\": {},\n  \"logo_url\": \"<string>\",\n  \"brand_color\": \"<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://agenticadvertising.org/api/brands/setup-my-brand")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"domain\": \"acmecorp.com\",\n  \"brand_name\": \"<string>\",\n  \"brand_json\": {},\n  \"logo_url\": \"<string>\",\n  \"brand_color\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://agenticadvertising.org/api/brands/setup-my-brand")

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  \"domain\": \"acmecorp.com\",\n  \"brand_name\": \"<string>\",\n  \"brand_json\": {},\n  \"logo_url\": \"<string>\",\n  \"brand_color\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "domain": "<string>",
  "has_brand_json": true,
  "hosted_brand_json_url": "<string>",
  "pointer_snippet": "<string>"
}
{
  "error": "<string>"
}
{
  "error": "<string>"
}
{
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

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-server and the protected-resource metadata at /.well-known/oauth-protected-resource/api.

Body

application/json
domain
string
required
Example:

"acmecorp.com"

brand_name
string
required
brand_json
object

Optional full brand.json draft to host in the registry

logo_url
string
brand_color
string

Response

Brand setup result

domain
string
required
has_brand_json
boolean
required
hosted_brand_json_url
string
required
pointer_snippet
string
required

JSON string for brand.json pointer