curl --request POST \
--url https://api.extole.io/v5/zones \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"data_key": {}
},
"zone_name": "global_header"
}
'import requests
url = "https://api.extole.io/v5/zones"
payload = {
"data": { "data_key": {} },
"zone_name": "global_header"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {data_key: {}}, zone_name: 'global_header'})
};
fetch('https://api.extole.io/v5/zones', 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.extole.io/v5/zones",
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([
'data' => [
'data_key' => [
]
],
'zone_name' => 'global_header'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.extole.io/v5/zones"
payload := strings.NewReader("{\n \"data\": {\n \"data_key\": {}\n },\n \"zone_name\": \"global_header\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.extole.io/v5/zones")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"data_key\": {}\n },\n \"zone_name\": \"global_header\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v5/zones")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"data_key\": {}\n },\n \"zone_name\": \"global_header\"\n}"
response = http.request(request)
puts response.read_bodyRender a zone with the name and targeting data in the body
Renders a zone using a request body that carries both the zone name and the targeting data. Functionally equivalent to POST /v5/zones/{zone_name}; the path-based form is the recommended primary entry point. Use this form when the calling code constructs the full request payload upstream and prefers a single body shape. Returns the zone’s configured content (HTML, JavaScript, JSON, or plain text) plus X-Extole-* headers describing the matched campaign and creative. Authenticated with a USER_SUPPORT scope access token.
curl --request POST \
--url https://api.extole.io/v5/zones \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"data_key": {}
},
"zone_name": "global_header"
}
'import requests
url = "https://api.extole.io/v5/zones"
payload = {
"data": { "data_key": {} },
"zone_name": "global_header"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {data_key: {}}, zone_name: 'global_header'})
};
fetch('https://api.extole.io/v5/zones', 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.extole.io/v5/zones",
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([
'data' => [
'data_key' => [
]
],
'zone_name' => 'global_header'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.extole.io/v5/zones"
payload := strings.NewReader("{\n \"data\": {\n \"data_key\": {}\n },\n \"zone_name\": \"global_header\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.extole.io/v5/zones")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"data_key\": {}\n },\n \"zone_name\": \"global_header\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v5/zones")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"data_key\": {}\n },\n \"zone_name\": \"global_header\"\n}"
response = http.request(request)
puts response.read_bodyBody
Request body for POST /v5/zones. Carries both the zone name to render and an open data map of identity and targeting fields.
Response
Rendered zone content. The response body shape varies by the zone's creative configuration: HTML, JavaScript, JSON, or plain text. X-Extole-* response headers carry the matched campaign, frontend controller, creative, creative version, and input event identifiers, plus optional debug logs (X-Extole-Log).
Was this page helpful?
