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",

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>"
        }
    }
}
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!