Update an Advertising Campaign

Contents

Method: PUT /api/v1/advertiser/campaign/{id}

Description: You can update a created advertising campaign through the API for your HilltopAds account.

Please note, this method is available only for Popunder mobile and Popunder desktop formats.

Parameters:

name

description

example

comment

key

A unique API key that you can generate in the API section of your HilltopAds account

nXzgO3Bc

This is a required parameter in the request.

campaignID

ID of the advertising campaign to be updated


123456

You can specify the ID of only one advertising campaign.

This is a required parameter in the request.

format

Advertising format to be updated in the campaign

Popunder mobile

You can specify only one advertising format.

This is a required parameter in the request.

rate

Price for 1000 impressions (CPM).

1.53

All prices (rate) are specified in the request without currency, but will be set in USD in the result.

This is a required parameter in the request.

capTotal

Impression frequency cap. This parameter indicates the number of times an ad is shown.

2

You can specify only one number.

capResetAfter

Impression frequency cap. This parameter indicates how long to show the ad.

12

You can specify only one number.

capForCampaign

Impression frequency cap. This parameter indicates whether the rule applies to the campaign or the banner.

campaign

For the Popunder format, you can only specify campaign.

channels

Segment and traffic category for which the ad needs to be updated.

Mainstream/non-mainstream High activity

Mainstream/non-mainstream Medium activity

Mainstream/non-mainstream Low activity

To specify multiple activity segments, list them with commas. Note, you can only specify one traffic category - mainstream or non-mainstream.

This is a required parameter in the request.

type

Type of an ad campaign  

CPM, CPC

Please note, currently you can only specify CPM campaign type.

This is a required parameter in the request.

name

Name of an advertising campaign.

Popunder_API 

The campaign name must be unique and not repeated with names of already created campaigns.

This is a required parameter in the request.

url

Offer URL link where the traffic needs to be sent.

https://mywebsite.com

You can specify only one link.

This is a required parameter in the request.

active

Specify the status of the updated campaign: true - ON, false - OFF

True, false

When specifying the campaign status as True (ON), the campaign will become active only after moderation.

targeting

Required targeting settings for the advertising campaign.

geo

browser

os

device

mobilecarrier

iprange

osversions

App

These parameters are passed as an object. Each new targeting parameter is specified with a comma.

Request Example:

To update the following parameters in the created advertising campaign with the ID 123456:

  • Rate - to $2.53
  • Frequency cappings - to 1 display per 24 hours for campaign
  • URL - to https://mywebsite2.com.
Please note that if your link contains the '&' symbol, you need to encode it to URL-encoded format. Otherwise, you may receive an error in the response to the link change request.

For example, the link https://mywebsite.com/?token={{ctoken}}&zone={{zone_id}}

should be specified as
https%3A%2F%2Fmywebsite.com%2F%3Ftoken%3D%7B%7Bctoken%7D%7D%26zone%3D%7B%7Bzone_id%7D%7D

To encode your link to URL-encoded format, you can use the tool
URL Encode and Decode - Online
Encode to URL-encoded format or decode from it with various advanced options. Our site has an easy to use online tool to convert your data.

You need to write a request in the following format:

curl -X PUT --data '{"rate":"2.53","capTotal":1,"capResetAfter":24,"capForCampaign":"campaign","url":"https%3A%2F%2Fmywebsite.com%2F%3Ftoken%3D%7B%7Bctoken%7D%7D%26zone%3D%7B%7Bzone_id%7D%7D"}' https://hilltopads.com/api/v1/advertiser/campaign/123456?key=nXzgO3Bc