create creative

What is a Creative?

As described in the Creatives section of this guide, a creative contains detailed information about a specific ad, such as ad size, URL, format, and other fields. When you set up a flight with ads, creatives become an important part of the flight, since this is where the information about the ad is kept.

API Syntax

When using the Create Creative API, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

POST https://api.kevel.co/v1/creative

Where:

Creative Parameter Fields

The Create Creative API call is a POST call, meaning you must enter a number of body parameters as part of the request before calling the endpoint. These parameters enable you to specify the fields included in the creative. Although there are many different parameters you can add as part of the request, there are several required fields that must be part of the request in order to create the creative. These fields are:

Enabling Creatives To Be Served

In order to have a creative be eligible to serve, you must use the Creative Flight Maps (Ads) endpoints. These endpoints will map the creative to a flight's ad.

Uploading Creatives

You may also choose to upload a creative to Kevel so it is hosted on the Kevel site. To upload a creative, use the Upload Creative Image endpoint after the creative has been created.

Parameters:

Examples:

A minimally viable creative. Note that it includes no Title or creative contents.

curl -X POST -H 'X-Adzerk-ApiKey:<API-KEY>' -H "Content-Type:application/json" "https://api.kevel.co/v1/creative" --data-binary '{"AdvertiserId":12345,"AdTypeId":5,"IsActive":true}'

A minimally viable image creative without an uploaded image:

curl -X POST -H 'X-Adzerk-ApiKey:<API-KEY>' -H "Content-Type:application/json" "https://api.kevel.co/v1/creative" --data-binary '{"AdvertiserId":12345,"AdTypeId":5,"Title":"Image Creative","Url":"http://adzerk.com","Body":"","IsActive":true}'

A minimally viable image creative with an externally hosted image:

curl -X POST -H 'X-Adzerk-ApiKey:<API-KEY>' -H "Content-Type:application/json" "https://api.kevel.co/v1/creative" --data-binary '{"AdvertiserId":12345,"AdTypeId":5,"Title":"Image Creative","Url":"http://adzerk.com","Body":"","IsActive":true,"ImageLink":"http://cdn.com/ad.gif"}'

A minimally viable JS/HTML creative:

curl -X POST -H 'X-Adzerk-ApiKey:<API-KEY>' -H "Content-Type:application/json" "https://api.kevel.co/v1/creative" --data-binary '{"AdvertiserId":12345,"AdTypeId":5,"Title":"JS/HTML Creative","IsActive":true,"ScriptBody":"Creative contents","IsHTMLJS":true}'

A minimally viable Static Text Link creative:

curl -X POST -H 'X-Adzerk-ApiKey:<API-KEY>' -H "Content-Type:application/json" "https://api.kevel.co/v1/creative" --data-binary '{"AdvertiserId":12345,"AdTypeId":20,"IsActive":true,"Title":"Static Text Link example","Url":"http://adzerk.com"}'
{
  "Id": 1234,
  "Title": "Adzerk Blue Creative",
  "ImageName": "somelongstring.jpg",
  "Url": "https://adzerk.com",
  "Body": "",
  "AdvertiserId": 123,
  "IsActive": true,
  "AdTypeId": 5,
  "Alt": "Adzerk - Native Ads",
  "IsDeleted": false,
  "IsSync": false,
  "IsHTMLJS": true,
  "ScriptBody": "<a href=\"{{url}}\">Click here to redirect to Url</a>",
  "Metadata": {
    "something": true
  },
  "ImageLink": "https://somecdn.com/somelongstring.jpg",
  "IsNoTrack": true,
  "IsNetworkAd": false
}