Create or update creative - DEPRECATED

Allows updating or creating specific types of creatives. Currently
Banner creatives and CustomTag (HTML/JS) creatives can be updated,
and only CustomTag creatives can be created.

When adding a new creative, id must be null, and the fields campaignId,
creativeType, and creativeSubType must be provided. As of this writing
only the HTML/JS based CustomTag banners can be created, so the caller
must set:

"creativeType": "banner"

and

"creativeSubtype": "htmlTag",

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Allows updating or creating specific types of creatives.

For creating a creative:

  1. ID must be null or omitted
  2. creativeType and creativeSubType must be provided
  3. advertiserId or campaignId must be included (both may be included, but at least one of the two must be included)

Request

POST /creative/save

RequestBody

Create

NameTypeDescriptionRequired
nameStringCreative nameYes
typeObjectSee Type ObjectYes
sizeObjectSee Size ObjectYes
advertiserIdNumberAdvertiser ID associated with the campaign.Yes*
htmlAssetStringYes
creativeTypeStringYes
creativeSubTypeStringYes
campaignIdNumberYes*

Update

NameTypeDescriptionRequired
idNumberCreative IDYes
nameStringCreative nameYes
typeSee Type ObjectYes
sizeSee Size ObjectYes
advertiserIdNumberAdvertiser ID associated with the campaign.Yes*
htmlAssetStringYes
creativeTypeStringYes
creativeSubTypeStringYes
campaignIdNumberYes*

*: One of advertiserId or campaignId is required; both may be included.

Type

NameTypeDescriptionRequired
idNumberMedia type IDYes
vendorStringVendor name or "Generic"No
mediaTypeStringOne of: BANNER, VAST, NATIVE, MRAID, VPAID, VAST_WITH_VPAIDYes
videoTypeStringOne of: FLV, MP4, WMV, WEBM, JS, nullYes; set to null for non-video Creative

Size

NameTypeDescriptionRequired
widthNumberCreative width, if applicable, or nullYes
heightNumberCreative height, if applicable, or nullYes

Response

JSON Fields Type Description
messagesObject ArrayAn array of any error messages.
messages[].levelStringError level.
messages[].codeStringError code.
messages[].messageStringError message.
entityObjectObject is a Creative
entity.idNumberCreative ID.
entity.statusString Status of the creative. It can be one of the following values:
  • INCOMPLETE
  • PENDING
  • APPROVED
  • DISABLED
  • VIOLATION
entity.nameStringCreative name.
entity.typeObject
entity.type.idNumberCreative type ID as shown in the UI.
entity.type.vendorIdStringCreative type vendor as shown in the UI.
entity.type.mediaTypeString Can be one of the following values:
  • BANNER
  • VAST
  • NATIVE
  • MRAID
  • VPAID
  • VAST_WITH_VPAID
entity.type.videoTypeString Will be null for non-video creative types.
Can be on of the following values:
  • FLV
  • MP4
  • WMV
  • WEBM
  • JS
entity.externalCreativeidString
entity.crawlableUrlStringCrawlable URL for what the creative is advertising
entity.landingPageUrlStringClickthrough URL for the creative. This may not be the final destination.
entity.impressionTrackingPixel_1StringURL of first tracking pixel
entity.impressionTrackingPixel_2StringURL of second tracking pixel
entity.impressionTrackingPixel_3StringURL of third tracking pixel
entity.impressionTrackingPixel_4StringURL of fourth tracking pixel
entity.sizeObject
entity.size.widthNumberWidth of creative (if applicable)
entity.size.heightNumberHeight of creative (if applicable)
entity.channelsString Array Channels selected for this creative. Possible values are:
  • MOBILE
  • DESKTOP
  • CONNECTED_TV
entity.adTagIdStringAdTag identifier. Varies by vendor. Only populated on AdTag type creatives
entity.durationNumberDuration of creative in seconds. Currently only populated for video type creatives.
entity.bitRateNumberBitrate of creative. Currently only populated for video type creatives.
entity.htmlAssetStringText asset. Only valid for text-based banner creatives
entity.campaignIdNumberID of the creative's campaign
NOTE: One of Campaign ID and Advertiser ID is required, but not both. Both can be provided, but that's not required.
entity.advertiserIdNumberID of the creative's advertiser
entity.creativeTypeStringBroad type category of creative analogous to the first step of the UI wizard. Only used for inputting new creatives.
entity.creativeSubTypeStringSpecific type category of creative analogous to the second step of the UI wizard. Only used for inputting new creatives.
entity.previewUrlStringPreview URL for the creative
entity.displayObject
entity.display.imageUrlstringURL for creative image
entity.display.htmlAssetstringText asset. Only valid for text-based banner creatives

Examples

Request to add a creative

curl -u <user>:<password> -X POST -H "Content-Type: application/json" -d '{"name": "Test_create_min", "type": { "id": 4, "vendor": "Generic", "mediaType": "BANNER", "videoType": null }, "size": { "width": 300, "height": 250 }, "htmlAsset": "<script type=\"text/javascript\" src=\"https://voken.eyereturn.com/j4/js?6710639&click=${VIANT_CLICK_REDIRECT_PROVIDED_ENC}&params=${VIANT_CACHE_BUSTER}\"></script>", "creativeType": "banner", "creativeSubtype": "htmlTag", "campaignId": 4597 }' https://sandbox-api.viant.com/v1/creative/save

Response

{
    "messages": [],
    "entity": {
        "id": 23887175,
        "name": "Test_create_min",
        "type": {
            "id": 4,
            "vendorId": 1,
            "mediaType": "BANNER",
            "videoType": null
        },
        "status": "PENDING",
        "externalCreativeid": null,
        "crawlableUrl": null,
        "impressionTrackingPixel_1": null,
        "impressionTrackingPixel_2": null,
        "impressionTrackingPixel_3": null,
        "impressionTrackingPixel_4": null,
        "size": {
            "width": 300,
            "height": 250
        },
        "channels": [
            "DESKTOP",
            "MOBILE"
        ],
        "landingPageUrl": null,
        "htmlAsset": "<script type=\"text/javascript\" src=\"https://voken.eyereturn.com/j4/js?6710639&click=${ADELPHIC_CLICK_REDIRECT_PROVIDED_ENC}&params=${ADELPHIC_CACHE_BUSTER}\"></script>",
        "campaignId": null,
        "advertiserId": 94328,
        "creativeType": "banner",
        "creativeSubtype": "tag",
        "previewUrl": "http://ad.ipredictive.com/d/render/fasttrack?zid=shanghai_1_0_1&creativeId=23887175",
        "display": {
            "imageUrl": null,
            "htmlAsset": "<script type=\"text/javascript\" src=\"https://voken.eyereturn.com/j4/js?6710639&click=${ADELPHIC_CLICK_REDIRECT_PROVIDED_ENC}&params=${ADELPHIC_CACHE_BUSTER}\"></script>"
        }
    }
}

Request to update a creative

curl -u <user>:<password> -X POST -H "Content-Type: application/json" -d '{"id": 2205732,"name": "Testtttt_edit"}' https://sandbox-api.viant.com/v1/creative/save

Response

{
    "messages": [],
    "entity": {
        "id": 23887175,
        "name": "Test_update_min0",
        "type": {
            "id": 4,
            "vendorId": 1,
            "mediaType": "BANNER",
            "videoType": null
        },
        "status": "PENDING",
        "externalCreativeid": null,
        "crawlableUrl": null,
        "impressionTrackingPixel_1": null,
        "impressionTrackingPixel_2": null,
        "impressionTrackingPixel_3": null,
        "impressionTrackingPixel_4": null,
        "size": {
            "width": 300,
            "height": 250
        },
        "channels": [
            "DESKTOP",
            "MOBILE"
        ],
        "landingPageUrl": null,
        "htmlAsset": "<script type=\"text/javascript\" src=\"https://voken.eyereturn.com/j4/js?6710639&click=${ADELPHIC_CLICK_REDIRECT_PROVIDED_ENC}&params=${ADELPHIC_CACHE_BUSTER}\"></script>",
        "campaignId": null,
        "advertiserId": 94328,
        "creativeType": "banner",
        "creativeSubtype": "tag",
        "previewUrl": "http://ad.ipredictive.com/d/render/fasttrack?zid=shanghai_1_0_1&creativeId=23887175",
        "display": {
            "imageUrl": null,
            "htmlAsset": "<script type=\"text/javascript\" src=\"https://voken.eyereturn.com/j4/js?6710639&click=${ADELPHIC_CLICK_REDIRECT_PROVIDED_ENC}&params=${ADELPHIC_CACHE_BUSTER}\"></script>"
        }
    }
}
Body Params

Create a new creative. Omit id. At least one of advertiserId or campaignId is required. Required fields depend on creativeType and creativeSubtype; see Create creatives doc for the matrix and examples (Custom Tag, Hosted Banner, Video, Audio, Native, DOOH).

string
required
length ≤ 400
type
object
required

Only mediaType is required for create. Use id/vendorId for vendor mapping (see Creative Type IDs).

size
object

Required for BANNER+TAG; optional or inferred for other types.

integer
required
int32
string
enum
required
Allowed:
string
required

e.g. TAG, HOSTED, VASTURL, VASTXML, IMAGE, VIDEO

string

Required for BANNER+TAG (or use display.htmlAsset).

string

Required for BANNER+HOSTED.

string

Required for hosted display, hosted video/audio, and Native.

video
object

Required for VIDEO creatives. Use vastUrl, vastXml, or mediaUrls per subtype.

audio
object

Required for AUDIO creatives. Use vastUrl, vastXml, or mediaUrls per subtype.

native
object

Required for NATIVE creatives (e.g. headline, caption, sponsoredBy, imageUrl, imageIcon).

dooh
object

Required for DOOH creatives. Use imageUrl for IMAGE subtype, mediaUrls for VIDEO.

display
object

Optional; display.htmlAsset can supply HTML for tag creatives.

channels
array of strings
channels
string
string
length ≤ 26
string

Optional tracking pixel URL.

string

Optional tracking pixel URL.

string

Optional tracking pixel URL.

string

Optional tracking pixel URL.

string

e.g. PENDING, INCOMPLETE; usually omit on create.

Responses

401

Unauthorized

403

Forbidden

404

Not Found

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json