Generate animated HTML5 ads
How to generate animated HTML5 ads - Abyssale REST API
This feature is available from the Prime plan.
Animated HTML5 ads can be created by sending data and customisation parameters to the POST /async/banner-builder/{template_id}/generate
endpoint (with the image_file_type
property equals to html5), which will respond synchronously with only a generation_request_id
property.
Once the generation is completed, the result will then be posted to the callback_url (webhooks system).
Supported template type: Animated
Generation response type: Asynchronous (Webhooks or Polling)
Generation Request (1st & 2nd step)
In addition to the supported image properties, an html5
property can be sent through the Abyssale REST API call to customise & announce related constraints to generate a valid HTML5 zip file. Here are the available options:
click_tag
: A string that will be used to redirect the user to a specific URL when clicking on the visual. That should be either:a single URL (for instance:
https://www.abyssale.com
)or a URL prefixed by an ad network macro (for instance:
[UNENCODED_CLICK_REDIRECT]https://developers.abyssale.com/
)
page_title
: The page title of the html5 documentad_network
: The ad network that will be used to dynamically compute the html5 file according to the related network constraints. As of now, the following constraints are taken into account: The html5 folder structure, the maximum file size & the gsap link (cdn or within the zip file). Here are the supported ad networks (spec):default
: No constraintgoogle-ads
google-marketing
(ex: doubleclick)adform
adroll
amazon-ads
iab
repeat
: Sets the number of times that the HTML5 banner should repeat after its first iteration.To repeat indefinitely, use
-1
.Default value is
0
: The HTML5 banner will be played only once.
include_backup_image
: By default, it is set tofalse
. Ifinclude_backup_image
is set totrue
, an image file namedbackup_image.jpeg
ll'be included in the HTML5 zip file.
Videos are supported on the html5 generation but are not designed to be published to ad networks.
Sample request
Do not forget to replace {YOUR-API-KEY}
and {templateId}
All formats of a template can be generated by removing the template_format_names
property.
Sample response
Generation response (3rd step)
The generation response can be obtained either by polling the API or by receiving the response directly to a callback_url
that was announced during the generation request. Either way the payload of the response will look like the NEW_BANNER_BATCH event.
Each format will be returned as a ZIP file
The
cdn_url
property won't be returnedA JPEG backup image (corresponding to the last frame of the animation) will be returned in the
fallback_image_url
property (under thefile
property).
Response Example
Last updated