Skip to main content

Assets API

The Assets API allows you to add Assets to the system such as images, PDF files, and HTML5 creative Assets (ZIP files).

This page covers the common endpoints and methods associated with the Assets API.

Authentication

Use the following header parameters for all requests:

Headers
Authentication
string required
Authentication bearer token
See Authentication Guide
X-IAA-OW-ID
integer required
Organization Workspace ID Header

Assets Details

Get a List of All Assets

GET

Get a list of all Assets in the system. Includes both regular Assets and HTML5 creative assets.

An Asset id can be used to Get Asset Details or to perform various actions in Assets Management endpoints.

Response Properties
id
integer
Asset ID
storagePath
string
File path of Asset
cdnUrl
string
URL of Asset
created
integer
Unix epoch timestamp of Asset creation, in milliseconds
modifiedDate
string
Date Asset modified
isDisposable
boolean
Indicates whether Asset is temporary and can be purged
isZipFile
boolean
Indicates whether the Asset is a ZIP file
isHtml5Creative
boolean
Indicates whether the Asset is an HTML5 creative
assetDimensions
object
Dimensions of the creative (HTML5 Assets only). Contains width and height
iframeHtml
string
Ready-to-use iframe HTML code (HTML5 Assets only)
Response 200
{
"success": true,
"data": [
{
"id": 1,
"storagePath": "assets/201427/tfteBYO_1704204958735.jpg",
"cdnUrl": "https://d3jme5si7t6llb.cloudfront.net/assets/201427/tfteBYO_1704204958735.jpg",
"created": 1704204961147,
"modifiedDate": "2024-01-02T14:16:08.726+0000",
"isDisposable": false,
"isZipFile": false,
"isHtml5Creative": false,
"assetDimensions": null,
"iframeHtml": null
},
{
"id": 2,
"storagePath": "assets/201427/randomPath/index.html",
"cdnUrl": "https://d3jme5si7t6llb.cloudfront.net/assets/201427/randomPath/index.html",
"created": 1704204971010,
"modifiedDate": "2024-01-02T14:16:11.375+0000",
"isDisposable": true,
"isZipFile": true,
"isHtml5Creative": true,
"assetDimensions": {
"width": 300,
"height": 250
},
"iframeHtml": "<iframe src=\"https://d3jme5si7t6llb.cloudfront.net/assets/201427/randomPath/index.html\" width=\"300\" height=\"250\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\"></iframe>"
},
{
"id": 3,
"storagePath": "assets/201427/2mBGamD_1704205759807.jpg",
"cdnUrl": "https://d3jme5si7t6llb.cloudfront.net/assets/201427/2mBGamD_1704205759807.jpg",
"created": 1704205761106,
"modifiedDate": "2024-01-02T08:59:21.508+0000",
"isDisposable": false,
"isZipFile": false,
"isHtml5Creative": false,
"assetDimensions": null,
"iframeHtml": null
}
]
}

Get Asset Details

GET

Get properties of a single Asset by ID. For HTML5 creative assets, the response includes additional fields for dimensions and iframe HTML code.

Path Parameters
assetId
integer
Asset ID
Response Properties
id
integer
Asset ID
storagePath
string
File path of Asset
cdnUrl
string
URL of Asset
created
integer
Unix epoch timestamp of Asset creation, in milliseconds
modifiedDate
string
Date Asset modified
isDisposable
boolean
Indicates whether Asset is temporary and can be purged
isZipFile
boolean
Indicates whether the Asset is a ZIP file
isHtml5Creative
boolean
Indicates whether the Asset is an HTML5 creative
assetDimensions
object
Dimensions of the creative (HTML5 Assets only). Contains width and height
iframeHtml
string
Ready-to-use iframe HTML code (HTML5 Assets only)
Response 200
{
"success": true,
"data": {
"id": 1,
"storagePath": "assets/201427/tfteBYO_1704204958735.jpg",
"cdnUrl": "https://cdn.example.com/assets/201427/tfteBYO_1704204958735.jpg",
"created": 1704204961147,
"modifiedDate": "2024-01-18T06:03:23.823+0000",
"isDisposable": true,
"isZipFile": false,
"isHtml5Creative": false,
"assetDimensions": null,
"iframeHtml": null
}
}
Response 200
{
"success": true,
"data": {
"id": 2,
"storagePath": "assets/201427/randomPath/index.html",
"cdnUrl": "https://cdn.example.com/assets/201427/randomPath/index.html",
"created": 1704204971010,
"modifiedDate": "2024-01-18T06:03:23.823+0000",
"isDisposable": false,
"isZipFile": true,
"isHtml5Creative": true,
"assetDimensions": {
"width": 300,
"height": 250
},
"iframeHtml": "<iframe src=\"https://cdn.example.com/assets/201427/randomPath/index.html\" width=\"300\" height=\"250\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\"></iframe>"
}
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "No Asset found with the Asset ID provided. Please provide a valid ID."
}
]
}

Assets Management

Add Multiple Assets

POST

Add multiple Assets to the system. Request accepts an array of multipart file objects and their corresponding metadata. Supports both regular Assets (images, PDFs) and HTML5 creative Assets (ZIP files).

Parameters
filesMetadata
form data required
Object array in JSON string
filesMetadata object properties
attachedFileName
string
Name of asset
originalFileName
string
Name of uploaded multipart file
disposable
boolean
Indicates whether Asset is temporary and can be purged, default: false
zipFile
boolean
Set to true when uploading a ZIP file for HTML5 creatives, default: false
html5Creative
boolean
Set to true when uploading an HTML5 creative asset, default: false
files
multipart/form-data required
Array of Asset files to upload
Response Properties
assetID
integer
Unique identifier of the uploaded asset
assetCDNURL
string
CDN URL of the uploaded asset
dimensions
object
Dimensions of the creative (HTML5 Assets only). Contains width and height
iframeHtml
string
Ready-to-use iframe HTML code (HTML5 Assets only)
Formdata Sample
------WebKitFormBoundaryAofpaWXja6BTaYQ9
Content-Disposition: form-data; name="files"; filename="example.jpg"
Content-Type: image/jpeg

------WebKitFormBoundaryAofpaWXja6BTaYQ9
Content-Disposition: form-data; name="filesMetadata"

[{"attachedFileName":"example.jpg","originalFileName":"example.jpg","disposable":false}]
------WebKitFormBoundaryAofpaWXja6BTaYQ9--

Response 200
{
"success": true,
"data": {
"example.jpg": {
"assetID": 697,
"assetCDNURL": "https://d3jme5si7t6llb.cloudfront.net/assets/201427/IHp2jMI_1704987233847.jpg"
}
}
}
Formdata Sample
------WebKitFormBoundaryAofpaWXja6BTaYQ9
Content-Disposition: form-data; name="files"; filename="300x250_creative.zip"
Content-Type: application/zip

------WebKitFormBoundaryAofpaWXja6BTaYQ9
Content-Disposition: form-data; name="filesMetadata"

[{"attachedFileName":"300x250_creative.zip","originalFileName":"300x250.zip","disposable":false,"zipFile":true,"html5Creative":true}]
------WebKitFormBoundaryAofpaWXja6BTaYQ9--

Response 200
{
"success": true,
"data": {
"300x250_creative.zip": {
"assetID": 19234,
"assetCDNURL": "https://d3jme5si7t6llb.cloudfront.net/assets/204876/OQ6NQ8B_1772197041498/index.html?cb=1",
"dimensions": {
"width": 300,
"height": 250
},
"iframeHtml": "<iframe src=\"https://d3jme5si7t6llb.cloudfront.net/assets/204876/OQ6NQ8B_1772197041498/index.html?cb=1\" width=\"300\" height=\"250\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\"></iframe>"
}
}
}
Response 422
{
"success": false,
"errorObjects": [
{
"error": "Please pass File(s) metaData"
}
]
}

Update Asset Details

PATCH

Update the details of an existing Asset by ID.

Path Parameters
assetId
integer
Asset ID
Request Schema
storagePath
string
File path of Asset
cdnUrl
string
Asset CDN URL
disposable
boolean
Indicates whether Asset is temporary and can be purged (true), default: true
Request Sample
{
"storagePath": "string",
"cdnUrl": "string",
"disposable": true
}
Response 200
{
"success": true,
"data": {
"statusCode": 200,
"responseObject": {
"message": "Asset updated successfully"
}
}
}

Delete Asset

DELETE

Delete single Asset by ID.

Path Parameters
assetId
integer
Asset ID
Response 200
{
"success": true,
"data": "Asset deleted successfully."
}
Have a question?
Was this page helpful?