Create Media for Ad Server Campaigns With API

Greta
Greta
  • Updated

Media in your Adform account is the publishers on whose ad spaces you plan to run your ads and to whom you send your tags. You need to add media to your account to use it in your campaigns and reports.

To define where you want to run your ads, first you need to create the media and then assign it to your direct line items.

With Media API, you can create, retrieve, update, and delete media. You can also search the list of created media for a specific one to use with your Ad Server campaigns.

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 a media for your campaigns, Adform Ad Server user account must have this permission assigned by the business account admin:

  • Manage Media

Depending on your objectives and workflow, you'll need some or all of the following scopes assigned to your OAuth client by Adform Support (technical@adform.com):

  • https://api.adform.com/scope/buyer.media: Grants access to Media API.

  • https://api.adform.com/scope/buyer.direct.lineitem.adsizes.readonly: Grants access to Direct Line Item Ad Sizes API.

Tip

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 a media with API, you must use the following ID in your requests:

ID

Used For

Retrieve From

mediaUuid

Specify the media when defining contact details and ad sizes for the media

Media API

Note

Additional IDs might be used, but the listed one is required to pass a request.

Workflow

Tip

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

To create a media with API, use these endpoints:

  1. POST endpoint in Media section of Media API: To create a new media.

  2. (Optional) POST endpoints in Contact and Section sections of Media API: To define media contact details and organize created medias into media sections.

  3. (Optional) GET endpoint in Direct Line Item Ad Sizes API: To retrieve a list of common ad sizes used in ad serving campaigns.

  4. (Optional) POST endpoint in Creative section of Media API: To define the ad types and sizes allowed by the media.

Endpoints

Was this article helpful?

/
How we can make it better?

Thank you for your feedback!