Publisher/Config (Ad unit)
Update an ad unit
Updates a config (ad unit) in one of two ways. If the body has enabled, only the status changes (true = active, false = paused) and the rest of the body is ignored; for video units this also queues a video content rebuild. Otherwise it replaces the whole config from the body (fields left out are removed, label and stack become null), bumps the revision and may create an app placement for app- units. It doesn’t change integration mapping: set the config’s mapping with POST /v1/mapping/apply. Both ways queue a tag rebuild.
PUT
/
v1
/
tag
/
{uid}
/
config
/
{id}
Update an ad unit
curl --request PUT \
--url https://api.tagdeliver.com/v1/tag/{uid}/config/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.tagdeliver.com/v1/tag/{uid}/config/{id}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.tagdeliver.com/v1/tag/{uid}/config/{id}', 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.tagdeliver.com/v1/tag/{uid}/config/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
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://api.tagdeliver.com/v1/tag/{uid}/config/{id}"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tagdeliver.com/v1/tag/{uid}/config/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagdeliver.com/v1/tag/{uid}/config/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"results": {
"domain": "example.com",
"id": 8388,
"uid": 18620,
"label": "MPU 1",
"stack": 338,
"config": {
"in_view": true,
"limit": 1,
"refresh": true,
"single_serve": false,
"floors_model": "ci_dynamic",
"sizes": {
"desktop": [
"300x250"
],
"mobile": [
"300x250",
"320x50"
],
"tablet": [
"300x250"
]
},
"target": ".article-body p",
"target_injection": "after",
"url_filter": {
"matches": [
"/my-account*"
],
"type": "exclude"
},
"device_filter": {
"type": "include",
"matches": []
},
"ymal_text": "ADVERTISEMENT",
"unit": "iab"
},
"revision": 4,
"date_added": "2026-03-02 10:14:52",
"date_updated": "2026-03-05 09:01:12",
"status": 1,
"in_experiment": false
},
"success": true
}{}{
"success": false,
"message": "Token not found."
}{
"success": false,
"message": "User forbidden"
}{
"success": false,
"message": "Resource not found"
}{
"status": 500,
"message": "An error occurred [4f2k], please try again shortly or contact your account manager for further assistance."
}Authorizations
Body
application/json
Was this page helpful?
⌘I
Update an ad unit
curl --request PUT \
--url https://api.tagdeliver.com/v1/tag/{uid}/config/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.tagdeliver.com/v1/tag/{uid}/config/{id}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.tagdeliver.com/v1/tag/{uid}/config/{id}', 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.tagdeliver.com/v1/tag/{uid}/config/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
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://api.tagdeliver.com/v1/tag/{uid}/config/{id}"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tagdeliver.com/v1/tag/{uid}/config/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagdeliver.com/v1/tag/{uid}/config/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"results": {
"domain": "example.com",
"id": 8388,
"uid": 18620,
"label": "MPU 1",
"stack": 338,
"config": {
"in_view": true,
"limit": 1,
"refresh": true,
"single_serve": false,
"floors_model": "ci_dynamic",
"sizes": {
"desktop": [
"300x250"
],
"mobile": [
"300x250",
"320x50"
],
"tablet": [
"300x250"
]
},
"target": ".article-body p",
"target_injection": "after",
"url_filter": {
"matches": [
"/my-account*"
],
"type": "exclude"
},
"device_filter": {
"type": "include",
"matches": []
},
"ymal_text": "ADVERTISEMENT",
"unit": "iab"
},
"revision": 4,
"date_added": "2026-03-02 10:14:52",
"date_updated": "2026-03-05 09:01:12",
"status": 1,
"in_experiment": false
},
"success": true
}{}{
"success": false,
"message": "Token not found."
}{
"success": false,
"message": "User forbidden"
}{
"success": false,
"message": "Resource not found"
}{
"status": 500,
"message": "An error occurred [4f2k], please try again shortly or contact your account manager for further assistance."
}