curl --request POST \
--url https://api.upliftads.io/v3/display-ad \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-site-id: <x-site-id>' \
--data '
{
"zoneIds": [
123
],
"adTypes": [
123
],
"keywords": [
"<string>"
],
"siteId": 123,
"count": 123,
"eventIds": [
{
"id": 123,
"label": "<string>"
}
],
"ip": "<string>",
"user": "<string>",
"consentGDPR": true,
"customTargeting": {}
}
'import requests
url = "https://api.upliftads.io/v3/display-ad"
payload = {
"zoneIds": [123],
"adTypes": [123],
"keywords": ["<string>"],
"siteId": 123,
"count": 123,
"eventIds": [
{
"id": 123,
"label": "<string>"
}
],
"ip": "<string>",
"user": "<string>",
"consentGDPR": True,
"customTargeting": {}
}
headers = {
"x-api-key": "<api-key>",
"x-site-id": "<x-site-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-site-id': '<x-site-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
zoneIds: [123],
adTypes: [123],
keywords: ['<string>'],
siteId: 123,
count: 123,
eventIds: [{id: 123, label: '<string>'}],
ip: '<string>',
user: '<string>',
consentGDPR: true,
customTargeting: {}
})
};
fetch('https://api.upliftads.io/v3/display-ad', 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.upliftads.io/v3/display-ad",
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([
'zoneIds' => [
123
],
'adTypes' => [
123
],
'keywords' => [
'<string>'
],
'siteId' => 123,
'count' => 123,
'eventIds' => [
[
'id' => 123,
'label' => '<string>'
]
],
'ip' => '<string>',
'user' => '<string>',
'consentGDPR' => true,
'customTargeting' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-site-id: <x-site-id>"
],
]);
$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.upliftads.io/v3/display-ad"
payload := strings.NewReader("{\n \"zoneIds\": [\n 123\n ],\n \"adTypes\": [\n 123\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"siteId\": 123,\n \"count\": 123,\n \"eventIds\": [\n {\n \"id\": 123,\n \"label\": \"<string>\"\n }\n ],\n \"ip\": \"<string>\",\n \"user\": \"<string>\",\n \"consentGDPR\": true,\n \"customTargeting\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-site-id", "<x-site-id>")
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.upliftads.io/v3/display-ad")
.header("x-api-key", "<api-key>")
.header("x-site-id", "<x-site-id>")
.header("Content-Type", "application/json")
.body("{\n \"zoneIds\": [\n 123\n ],\n \"adTypes\": [\n 123\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"siteId\": 123,\n \"count\": 123,\n \"eventIds\": [\n {\n \"id\": 123,\n \"label\": \"<string>\"\n }\n ],\n \"ip\": \"<string>\",\n \"user\": \"<string>\",\n \"consentGDPR\": true,\n \"customTargeting\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upliftads.io/v3/display-ad")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-site-id"] = '<x-site-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"zoneIds\": [\n 123\n ],\n \"adTypes\": [\n 123\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"siteId\": 123,\n \"count\": 123,\n \"eventIds\": [\n {\n \"id\": 123,\n \"label\": \"<string>\"\n }\n ],\n \"ip\": \"<string>\",\n \"user\": \"<string>\",\n \"consentGDPR\": true,\n \"customTargeting\": {}\n}"
response = http.request(request)
puts response.read_body{
"user": {
"key": "<string>"
},
"decisions": {}
}Get Display Ad
Request one or more display ad decisions for the specified zones. Returns sized image assets for banner or rich-media creatives.
curl --request POST \
--url https://api.upliftads.io/v3/display-ad \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-site-id: <x-site-id>' \
--data '
{
"zoneIds": [
123
],
"adTypes": [
123
],
"keywords": [
"<string>"
],
"siteId": 123,
"count": 123,
"eventIds": [
{
"id": 123,
"label": "<string>"
}
],
"ip": "<string>",
"user": "<string>",
"consentGDPR": true,
"customTargeting": {}
}
'import requests
url = "https://api.upliftads.io/v3/display-ad"
payload = {
"zoneIds": [123],
"adTypes": [123],
"keywords": ["<string>"],
"siteId": 123,
"count": 123,
"eventIds": [
{
"id": 123,
"label": "<string>"
}
],
"ip": "<string>",
"user": "<string>",
"consentGDPR": True,
"customTargeting": {}
}
headers = {
"x-api-key": "<api-key>",
"x-site-id": "<x-site-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'x-site-id': '<x-site-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
zoneIds: [123],
adTypes: [123],
keywords: ['<string>'],
siteId: 123,
count: 123,
eventIds: [{id: 123, label: '<string>'}],
ip: '<string>',
user: '<string>',
consentGDPR: true,
customTargeting: {}
})
};
fetch('https://api.upliftads.io/v3/display-ad', 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.upliftads.io/v3/display-ad",
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([
'zoneIds' => [
123
],
'adTypes' => [
123
],
'keywords' => [
'<string>'
],
'siteId' => 123,
'count' => 123,
'eventIds' => [
[
'id' => 123,
'label' => '<string>'
]
],
'ip' => '<string>',
'user' => '<string>',
'consentGDPR' => true,
'customTargeting' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-site-id: <x-site-id>"
],
]);
$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.upliftads.io/v3/display-ad"
payload := strings.NewReader("{\n \"zoneIds\": [\n 123\n ],\n \"adTypes\": [\n 123\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"siteId\": 123,\n \"count\": 123,\n \"eventIds\": [\n {\n \"id\": 123,\n \"label\": \"<string>\"\n }\n ],\n \"ip\": \"<string>\",\n \"user\": \"<string>\",\n \"consentGDPR\": true,\n \"customTargeting\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-site-id", "<x-site-id>")
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.upliftads.io/v3/display-ad")
.header("x-api-key", "<api-key>")
.header("x-site-id", "<x-site-id>")
.header("Content-Type", "application/json")
.body("{\n \"zoneIds\": [\n 123\n ],\n \"adTypes\": [\n 123\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"siteId\": 123,\n \"count\": 123,\n \"eventIds\": [\n {\n \"id\": 123,\n \"label\": \"<string>\"\n }\n ],\n \"ip\": \"<string>\",\n \"user\": \"<string>\",\n \"consentGDPR\": true,\n \"customTargeting\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upliftads.io/v3/display-ad")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["x-site-id"] = '<x-site-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"zoneIds\": [\n 123\n ],\n \"adTypes\": [\n 123\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"siteId\": 123,\n \"count\": 123,\n \"eventIds\": [\n {\n \"id\": 123,\n \"label\": \"<string>\"\n }\n ],\n \"ip\": \"<string>\",\n \"user\": \"<string>\",\n \"consentGDPR\": true,\n \"customTargeting\": {}\n}"
response = http.request(request)
puts response.read_body{
"user": {
"key": "<string>"
},
"decisions": {}
}Authorizations
Body
One or more zone IDs to request decisions for.
Ad type IDs specifying the accepted creative formats. Required for display ads.
Keyword signals used for targeting — e.g. destination names or product categories.
Your site ID. Can be passed here instead of the x-site-id header.
Maximum number of ads to return per zone.
Contextual event identifiers for the current page or session.
Show child attributes
Show child attributes
The end-user's IP address, used for geo-targeting.
A stable user identifier for frequency capping and personalisation.
Whether the user has given GDPR consent.
Freeform key-value targeting parameters. Values can be strings, numbers, or arrays of either.
Show child attributes
Show child attributes
Was this page helpful?