Create Ads With API

Vaida
Vaida
  • Updated

An ad is a form of advertising that can range from a static image to a full-motion video. Ads are shown across various platforms, including websites, mobile apps, and other digital channels.

In addition to a single static image or video ad, several ads of the same type and dimensions can be grouped into a rotator.

A rotator changes the ad shown in a website placement based on a set of ads. Rotators can contain different types of ads, including videos. Depending on the type of rotator, instead of just changing the shown ad, the rotator can change an ad's positioning within the placement.

Tip

For more information about different ad types and their guidelines, see Set Up Ads and Ad Guidelines.

For more information about rotators, see Learn About Rotators.

After you've created a campaign, order, and programmatic or direct line item, you need to create an ad that'll be shown to users and lead them to your platform.

With Adform APIs, you can create ads from existing assets or build them from scratch, update, and delete them. You can also retrieve specific ads by their UUIDs. To create ad types that require assets, you need to use Assets API to create assets and retrieve their UUIDs.

Structure of Adform Ads APIs

Adform has the following API structure for working with ads:

CreativesNewBrand.png
  • Assets: Different types of resources, such as audio, fonts, images, video, generic, or HTML and XML files, that you can import and use to create video, native, and standard HTML5 ads.

  • Ads: Different types of ads that you can create using Adform APIs.

  • Rotators: Different types of rotators that you can create by grouping image, third-party, video, or standard HTML5 ads using Adform APIs.

  • Targeting: Specific targeting rules that you can create and apply to each ad within your rotator.

  • Tags: Code snippets that Adform creates after you assign an ad to a line item. Tags fetch specific information and carry out other processes within the webpage or mobile app to successfully deliver an ad.

Authentication

To authenticate and use Adform APIs, your user account must have the necessary permissions and your OAuth client must have the required scopes assigned to it.

To create an ad, Adform DSP and Ad Server user account must have this permission assigned by the business account admin:

  • Manage Assets & Banners

You also need the following scope assigned to your OAuth client by Adform Support (technical@adform.com):

  • https://api.adform.com/scope/eapi: Grants access to Standard Banners API, Asset Banners API, and Rotators API.

Note

If you don't have an OAuth client yet, follow the procedure in Get Authentication Credentials for Adform APIs to register one.

Prerequisites

To create an ad with API, you must use the following IDs in your requests:

ID

Used To

Retrieve From

campaignId

Specify the campaign to which the ad belongs

Campaigns Management API

formatId

Specify the format of the ad

Banners Formats API

memberId

Specify the ad in a rotator to assign targeting rules

Provided as part of a response body after creating a rotator (see step 3 in rotator creation workflow)

Note

Additional IDs might be used, but the listed ones are required to pass a request.

Workflow

After you've created a programmatic or direct line item, you can continue with creating an ad. Depending on the type of ad that you want to create, see the relevant workflow below.

Tip

To learn how to use Adform APIs, read Guide to Using Adform APIs.

After creating an ad, you'll be able to continue with creating tags.

Image, Link, Third-Party, and Video Ads

To create an image, link, third-party, or video ad with API, use these endpoints:

  1. (Optional) POST endpoints in Assets API: To create new assets or search for already created assets for a video ad.

  2. POST endpoints in Standard Banners API: To create an image, link, third-party, or video ad.

  3. PUT endpoints in Standard Banners API: To assign at least one asset to the created video ad.

Native and Standard HTML5 Ads

To create a native or standard HTML5 ad with API, use these endpoints:

  1. POST endpoints in Assets API: To create new assets or search for already created assets for a native or standard HTML5 ad.

  2. POST endpoints in Asset Banners API: To create a native or standard HTML5 ad.

Rotator Ads

To create a rotator ad with API, use these endpoints:

  1. (Optional) GET endpoints in Standard Banners API: To retrieve image, third-party, or video ads to assign to rotators.

  2. (Optional) GET endpoints in Html section of Asset Banners API: To retrieve standard HTML5 ads to assign to rotators.

  3. POST endpoints in ABRotator, OptimizedRotator, RandomRotator, and SequentialRotator sections of Rotators API: To create A/B, Optimized, Random, or Sequential types of rotator ads.

  4. (Optional) POST endpoints in Targeting section of Rotators API: To create and assign specific targeting rules to the ads in your rotators.

Endpoints

[{"api":"Standard Banners","titles":"AdsOverview, ImageBanners, InteractiveInstream, LinkBanners, OperationResults, Packages, Rotators, ThirdPartyBanners, VideoInstream"}]

Was this article helpful?

/
How we can make it better?

Thank you for your feedback!