Skip to main content
PUT
Update a Custom HTML Ad Item

Authorizations

Authorization
string
header
required

API key en el header Authorization: Basic TU_API_KEY. La key va tal cual, sin codificar en base64. Las credenciales se entregan al comenzar la integración.

Path Parameters

id
integer
required

Identifier of the ad item you'd like to update.

Body

application/json
name
string

The name of the ad item. We recommend using a naming convention that is descriptive, consistent, and clear.

Example:

"Example Ad Item"

height
integer

The height of the ad item in pixels. Defaults to 0 when no height given. If width is set to a value greater than 0, a height must also be set to a non-zero value. A width and height both set to 0 signify a "dynamic ad". Read more about dynamic ads.

Example:

400

width
integer

The width of the ad item in pixels. Defaults to 0 when no width given. If height is set to a value greater than 0, a width must also be set to a non-zero value. A width and height both set to 0 signify a "dynamic ad". Read more about dynamic ads.

Example:

650

location
string

The destination URL to which the user will be redirected when they click on the ad item. A null value denotes no redirection.

Example:

""

tracking_pixel
string

An optional third party tracking pixel served with the ad for monitoring impressions. A null value means no tracking pixel was added. Use tracking_pixels if you want to add multiple tracking pixels.

NOTE: Essentials subscribers do not have access to third-party pixel tracking and therefore must set this field's value to null.

Example:

"https://url.com"

tracking_pixels
object[]

List of tracking pixels. An empty array means that no tracking pixels were added.

To create a tracking pixel, enter an object that only has the url field. An id for the new tracking pixel will be sent in the response.

To update a tracking pixel, enter an object with the tracking pixel's id and the new url for the tracking pixel.

To delete a tracking pixel, enter an object with the tracking pixel id and set url to null.

Example:
metadata
object

An object containing any number of metadata keys and values. Keys and values must be strings.

Example:
trusted_redirect_domains
object

An array containing any number of trusted redirect domains. Values must always be valid domains, e.g. example.com, *.example.com, or custom protocols like tel:342682346.

NOTE: This only applies to ad items which will be used in a zone with a 3rd party click macro implementation.

Example:
custom_html
string

The HTML content of the ad item.

Example:

"<div> ... </div>"

html_content_below
string

The HTML content that will appear below the ad item.

Example:

"<img />"

expand_horizontal_direction
string

Whether to allow the rich media ad item to expand in the horizontal direction. The value can be "none", "left", or "right". Defaults to "none".

Example:

"left"

expand_vertical_direction
string

Whether to allow the rich media ad item to expand in the vertical direction. The value can be "none", "up", or "down". Defaults to "none".

Example:

"none"

Response

default - application/json

successful operation

name
string

The name of the ad item. We recommend using a naming convention that is descriptive, consistent, and clear.

Example:

"Example Ad Item"

height
integer

The height of the ad item in pixels. Defaults to 0 when no height given. If width is set to a value greater than 0, a height must also be set to a non-zero value. A width and height both set to 0 signify a "dynamic ad". Read more about dynamic ads.

Example:

400

width
integer

The width of the ad item in pixels. Defaults to 0 when no width given. If height is set to a value greater than 0, a width must also be set to a non-zero value. A width and height both set to 0 signify a "dynamic ad". Read more about dynamic ads.

Example:

650

location
string

The destination URL to which the user will be redirected when they click on the ad item. A null value denotes no redirection.

Example:

""

tracking_pixel
string

An optional third party tracking pixel served with the ad for monitoring impressions. A null value means no tracking pixel was added. Use tracking_pixels if you want to add multiple tracking pixels.

NOTE: Essentials subscribers do not have access to third-party pixel tracking and therefore must set this field's value to null.

Example:

"https://url.com"

tracking_pixels
object[]

List of tracking pixels. An empty array means that no tracking pixels were added.

To create a tracking pixel, enter an object that only has the url field. An id for the new tracking pixel will be sent in the response.

To update a tracking pixel, enter an object with the tracking pixel's id and the new url for the tracking pixel.

To delete a tracking pixel, enter an object with the tracking pixel id and set url to null.

Example:
metadata
object

An object containing any number of metadata keys and values. Keys and values must be strings.

Example:
trusted_redirect_domains
object

An array containing any number of trusted redirect domains. Values must always be valid domains, e.g. example.com, *.example.com, or custom protocols like tel:342682346.

NOTE: This only applies to ad items which will be used in a zone with a 3rd party click macro implementation.

Example:
is_self_serve
boolean
read-only

Whether or not this ad item is from Self-Serve.

Example:

false

custom_html
string

The HTML content of the ad item.

Example:

"<div> ... </div>"

html_content_below
string

The HTML content that will appear below the ad item.

Example:

"<img />"

expand_horizontal_direction
string

Whether to allow the rich media ad item to expand in the horizontal direction. The value can be "none", "left", or "right". Defaults to "none".

Example:

"left"

expand_vertical_direction
string

Whether to allow the rich media ad item to expand in the vertical direction. The value can be "none", "up", or "down". Defaults to "none".

Example:

"none"

created_date
string<date-time>

The date and time when this ad item was created.

Example:

"2019-04-26 14:55:31"

last_modified
string<date-time>

The date and time the ad item was last modified.

Example:

"2019-04-26 14:55:39"

object
string

A string denoting the current resource being requested or affected.

Example:

"custom_html_ad_item"

self
string

The relative URL of the current resource being requested or affected.

Example:

"/v2/ad-items/custom-html/985124765"

id
integer

The current resource identifier (ID).

Example:

985124765