Activate Ad Unit
Sets is_active=true. If already active, the request is silently ignored.
Access Control:
Admin and Operator accounts have full access (create/read/update/delete) to ad unit resources.
Advertiser accounts have no access to this endpoint — see GET /ad-units/targets for the
lightweight, allocation-target-selection view available to advertisers.
curl --request POST \
--url https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate', 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://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate"
req, _ := http.NewRequest("POST", 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.post("https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"ad_unit_sizes": [
{
"h": 1,
"w": 1
}
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 250,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 300
},
"ext": {
"algorithm": "axa0",
"approval_method": "admin",
"bcat": [],
"default_cpa": 0,
"default_cpc": 0,
"display": {
"enabled": 0
},
"external_raw_data": "<unknown>",
"implicit_app_inference": {
"android_bundle": "<string>",
"app_name": "<string>",
"cat": [
"<string>"
],
"ios_bundle": "<string>",
"ua_keywords": []
},
"metric_mode": "all",
"native": {
"enabled": 0,
"render_mode": "html"
},
"passback": "<unknown>",
"payout": "rates",
"public_url": "<string>",
"publisher": "<unknown>",
"recommendation": {
"enabled": 0
},
"responsive": "fixed",
"target_ecpm": 0,
"target_service": "<string>",
"video": {
"enabled": 0
}
},
"gpid": "<string>",
"instl": 0,
"is_active": true,
"native": {
"assets": []
},
"no": 123,
"recommendation": {
"ext": {},
"topn": 10
},
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"api": [
32767
],
"boxing": 1,
"clktype": 1,
"comp": [
{
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 123,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 123
},
"ext": null,
"id": "<string>",
"vcm": 123
}
],
"comptype": [
"Static"
],
"ctype": [
123
],
"delay": 0,
"delivery": [
"Streaming"
],
"expdir": [
"Left"
],
"ext": null,
"h": 300,
"linear": 0,
"maxbitr": 1,
"maxdur": 0,
"maxext": 0,
"maxseq": 1,
"mime": [
"<string>"
],
"minbitr": 1,
"mincpmpersec": 123,
"mindur": 0,
"overlayexpdir": [
"Left"
],
"playend": "OnVideoCompletion",
"playmethod": [
1
],
"poddur": 1,
"podid": 1,
"podseq": 0,
"pos": "Unknown",
"ptype": 1,
"rqddurs": [
1
],
"skip": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2,
"w": 480
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication. Pass the access token in the Authorization: Bearer <token> header.
Path Parameters
Response
Successful Response
Response schema for AdUnit mutation operations (create/patch).
Ad unit code identifier.
The ID of the user who created the ad unit.
ID of the ad unit (uuid7)
Name of the ad unit.
Hierarchical path of the ad unit (e.g., "parent_id/child_id").
Targeting metadata sizes Distinct from display/video.w/h which govern serving and rendering.
Show child attributes
Show child attributes
Description of the ad unit.
Display placement configuration.
Show child attributes
Show child attributes
Ad unit extension fields.
Show child attributes
Show child attributes
Canonical Placement ID for OpenRTB imp.ext.gpid.
Indicates if this is an interstitial placement, where 0 = no, 1 = yes. Applies across display, video, and native.
0, 1 Whether the ad unit is active.
Based on OpenRTB Native Ads 1.2 Native Markup Request Object, not the AdCOM standard native format
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Video placement configuration.
Show child attributes
Show child attributes
Was this page helpful?
curl --request POST \
--url https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate', 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://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate"
req, _ := http.NewRequest("POST", 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.post("https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/api/manager/ad-units/{ad_unit_id}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"path": "<string>",
"ad_unit_sizes": [
{
"h": 1,
"w": 1
}
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 250,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 300
},
"ext": {
"algorithm": "axa0",
"approval_method": "admin",
"bcat": [],
"default_cpa": 0,
"default_cpc": 0,
"display": {
"enabled": 0
},
"external_raw_data": "<unknown>",
"implicit_app_inference": {
"android_bundle": "<string>",
"app_name": "<string>",
"cat": [
"<string>"
],
"ios_bundle": "<string>",
"ua_keywords": []
},
"metric_mode": "all",
"native": {
"enabled": 0,
"render_mode": "html"
},
"passback": "<unknown>",
"payout": "rates",
"public_url": "<string>",
"publisher": "<unknown>",
"recommendation": {
"enabled": 0
},
"responsive": "fixed",
"target_ecpm": 0,
"target_service": "<string>",
"video": {
"enabled": 0
}
},
"gpid": "<string>",
"instl": 0,
"is_active": true,
"native": {
"assets": []
},
"no": 123,
"recommendation": {
"ext": {},
"topn": 10
},
"updated_at": "2023-11-07T05:31:56Z",
"video": {
"api": [
32767
],
"boxing": 1,
"clktype": 1,
"comp": [
{
"display": {
"ampren": 127,
"api": [
32767
],
"clktype": 1,
"context": "ContentCentric",
"ctype": [
127
],
"displayfmt": {
"expdir": "Left",
"ext": null,
"h": 1,
"hratio": 1,
"w": 1,
"wratio": 1
},
"event": [
{
"type": 1,
"api": [
32767
],
"ext": null,
"jstrk": [
"<string>"
],
"method": [
1
],
"pxtrk": [
"<string>"
],
"wjs": 1,
"wpx": 1
}
],
"ext": null,
"h": 123,
"ifrbust": [
"<string>"
],
"mime": [
"<string>"
],
"pos": "Unknown",
"priv": 0,
"ptype": "Feed",
"topframe": 127,
"unit": 2,
"w": 123
},
"ext": null,
"id": "<string>",
"vcm": 123
}
],
"comptype": [
"Static"
],
"ctype": [
123
],
"delay": 0,
"delivery": [
"Streaming"
],
"expdir": [
"Left"
],
"ext": null,
"h": 300,
"linear": 0,
"maxbitr": 1,
"maxdur": 0,
"maxext": 0,
"maxseq": 1,
"mime": [
"<string>"
],
"minbitr": 1,
"mincpmpersec": 123,
"mindur": 0,
"overlayexpdir": [
"Left"
],
"playend": "OnVideoCompletion",
"playmethod": [
1
],
"poddur": 1,
"podid": 1,
"podseq": 0,
"pos": "Unknown",
"ptype": 1,
"rqddurs": [
1
],
"skip": 0,
"skipafter": 0,
"skipmin": 0,
"slotinpod": 0,
"unit": 2,
"w": 480
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}