Creates a tag on siteId with the fields in the body; anything left out takes the editor's default (refreshSeconds 0, bidTimeoutMs 1000, refreshForegroundOnly true, integration owned, everything else off).
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/hb-tags.do
Creates a tag on siteId with the fields in the body; anything left out takes the editor's default (refreshSeconds 0, bidTimeoutMs 1000, refreshForegroundOnly true, integration owned, everything else off). A slot names a placement of that site from GET /rest-api/hb-tags/placements and, for a banner, its sizes as ad unit ids from GET /rest-api/hb-tags/ad-units; domain must be one of GET /rest-api/hb-tags/domains. The response is the stored tag and its page code. Fields that were sent but not applied are listed in 'ignoredFields', each with its reason in 'ignoredFieldReasons'. Requires the HEADER_BIDDING_TAB_VISIBLE permission and access to the tag's site. UPDATE access to the site is needed.
Body
A JSON body. An example, built from the field definitions:
Refused, the reason in msg or per field in errors — e.g. an unknown serving domain, a slot named twice, a placement of another site, refresh below 30 seconds
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/hb-tags.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new StringContent("{\"id\":\"1\",\"siteId\":\"139\",\"name\":\"Futbol24 — desktop\",\"domain\":\"ads.example.com\"}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());