Skip to main content
POST
Create an ad unit

Authorizations

Authorization
string
header
required

A personal API token from the platform's settings page, or an OAuth access token.

Path Parameters

uid
integer
required

Publisher ID (uid).

Body

application/json

The config. Only unit, enabled and sizes are checked by validation; every other field is stored as sent (apart from unit and stack, which are stored separately), so unknown fields are kept. That includes a mapping key, which is stored in the config like any other unknown field and sets no mapping.

unit
enum<string>
required

The kind of ad unit. Units starting app- are for the App SDK and use target as a placement. adhesion, anchor, interstitial, pixel and side-rail always target the page body. Values: adhesion = Adhesion (sticky banner), anchor = Anchor (GPT anchor), app-banner = App banner, app-interstitial = App interstitial, app-open = App open ad, iab = IAB display, in-article = In-article, in-image = In-image, interstitial = Interstitial, pixel = Pixel, side-rail = Side rail, video-3p = Third-party video, video = Video player.

Available options:
adhesion,
anchor,
app-banner,
app-interstitial,
app-open,
iab,
in-article,
in-image,
interstitial,
pixel,
side-rail,
video-3p,
video
label
string | null

Optional name to identify the config in lists and experiments. Saved as null when left out.

stack
integer

ID of the ad stack (demand set-up) this unit uses. Saved as null when left out.

enabled
boolean

Accepted by validation. On create it is stored inside the config and does not set the status. On update, sending it switches to the status-only path (see the operation description).

target

Where the unit goes. For web units, a CSS selector for the page element to inject into (required unless the unit always targets the body or single_serve is true). For app- units, the ID of an existing app placement (integer), or a new placement title (string) which creates that placement. Forced to body for adhesion, anchor, interstitial, pixel and side-rail.

target_injection
enum<string>
default:after

Where the ad goes relative to each matched target element. Values: before = Before target, after = After target, inside = Inside target.

Available options:
before,
after,
inside
target_argumentation
string

For units that target the body: optional CSS selector suffix that restricts the body target. Several can be comma-separated.

target_conditional
string

Advanced: a JavaScript expression returning a boolean that must be true for a target match. The dashboard only lets users with the advanced.developer permission edit it; the API doesn't check.

limit

Maximum number of matched targets to fill. Empty string means no limit. Pixel units always use 1, and single-serve units default to 1.

single_serve
boolean
default:false

When true, target is replaced with a unique selector #scit__<unit>-<config id> that the publisher places on the page.

sizes
Sizes · object

Ad sizes per device. Used by iab, in-article, in-image, adhesion, anchor, interstitial and side-rail units.

size
string

Size for pixel units, as WIDTHxHEIGHT (1x1).

device_filter
Device filter · object

Limit by device type. type decides whether the matches are included or excluded; empty matches means no filtering.

browser_filter
Browser filter · object

Limit by browser. Web units only. Values the dashboard offers: chrome, safari, firefox, edge, ie, opera, yandex. type decides whether the matches are included or excluded; empty matches means no filtering.

geo_filter
Country filter · object

Limit by visitor country. Matches are ISO 3166-1 alpha-2 country codes in upper case, such as GB or US. type decides whether the matches are included or excluded; empty matches means no filtering.

region_filter
Region filter · object

Limit by continent. type decides whether the matches are included or excluded; empty matches means no filtering.

audience_filter
Audience filter · object

Limit by audience segment. Matches are audience segment IDs. type decides whether the matches are included or excluded; empty matches means no filtering.

url_filter
URL filter · object

Limit by page path. Matches are paths such as /pets/dogs, and a trailing * matches anything under a path (/pets/*). type decides whether the matches are included or excluded; empty matches means no filtering.

viewport_filter
Viewport filter · object

Limit by viewport width in pixels. Matches are comparisons using >, <, >=, <=, ≥ or ≤ followed by a width, such as >=1024px or <728px. Use one lower and one upper bound at most. type decides whether the matches are included or excluded; empty matches means no filtering.

os_filter
Operating system filter · object

Limit by operating system. Values the dashboard offers: android, ios. type decides whether the matches are included or excluded; empty matches means no filtering. Stored but not applied to web units by the current tag build (app units only).

start
string

Optional schedule start as a date-time string or Unix timestamp. The unit only serves from this time.

end
string

Optional schedule end as a date-time string or Unix timestamp. The unit stops serving after this time.

floors_model
enum<string>
default:ci_dynamic

How the price floor is set. Dynamic floors are used when left out; manual uses floor; google_optimised sets no floor. Values: ci_dynamic = Dynamic floors, google_optimised = Google Optimised, manual = Manual.

Available options:
ci_dynamic,
google_optimised,
manual
floor
number

Floor price in GBP. Only used when floors_model is manual.

Required range: x >= 0
refresh
boolean
default:false

Whether the unit refreshes while in view (every 35 seconds unless refresh_duration is set).

refresh_duration
integer

Seconds before the unit is considered for refresh. Values under 10 are raised to 10.

Required range: x >= 10
max_refresh_count
integer

Maximum number of refreshes. Unlimited when left out or 0.

Required range: x >= 0
refresh_buffer
string

Distance (such as 200px or 20%) at which to refresh before the default 50% in-view threshold.

in_view
boolean
default:true

Lazy-load the unit when it nears the viewport. Ignored for adhesion, anchor, interstitial, side-rail and pixel units, which always load immediately.

in_view_buffer

Distance from the viewport at which to start loading, as pixels (200 or 200px) or a percentage (50%).

key
string

Custom key-value key passed to the ad server for this unit. Sent with value. The dashboard limits it to 25 characters.

value
string

Custom key-value value passed with key. The dashboard limits it to 25 characters.

ymal_text
string

Text shown above the ad, such as ADVERTISEMENT.

location
enum<string>

Placement on the page: in or under for in-image; top, bottom or responsive for anchor; left or right for side-rail. Values: in = In image, under = Under image, top = Top, bottom = Bottom, responsive = Responsive (top on mobile, bottom on desktop), left = Left, right = Right.

Available options:
in,
under,
top,
bottom,
responsive,
left,
right
reserve_space
boolean

iab units: reserve the ad's height before it loads.

relocate
boolean

Adhesion units: use the responsive location.

load_on_scroll
boolean

Adhesion units: wait for the first scroll before loading.

closure_persist
boolean

Adhesion units: once closed, stay closed for the session.

disable_branding
boolean

Adhesion, in-image and third-party video units: hide unit branding.

disable_adhesion_bg
boolean

Adhesion units: remove the background behind the ad.

every_other
boolean

In-image units: only use every other matched image.

behaviour
enum<string>

Third-party video units: how the player sticks. Values: static = Static, scroll-to-stick = Stick-on-scroll, click-to-stick = Click-to-stick.

Available options:
static,
scroll-to-stick,
click-to-stick
position
enum<string>

Third-party video units: where the player sticks.

Available options:
bottom-left,
bottom-right,
bottom,
left,
right,
top-left,
top-right,
top
always_play
boolean

Third-party video units: keep playing out of view.

disable_audio
boolean

Third-party video units: start muted.

Response

Created: The created config.

results
object
required
success
boolean
required