Create a performance video item (motion ad).
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
DEPRECATION NOTICEThis endpoint has been deprecated.
Use the unified Bulk Create Items endpoint instead (for multiple campaigns), or Mass create items for a given campaign (for a single campaign).
Creating a Performance Video Item (Motion Ad)
When creating a motion ad, you must include 4 required fields:*
urltitlevideo_urlfallback_url
*Alternatively, you can combine JSON content with
multipart/form-data(file uploads). cURL examples are provided below.
Guidelines for Motion AdsFor guidelines and best practices, refer to the Help Center, or sync with your Taboola Account Manager.
JSON example
Example 1 - JSON request with URL Params:
POST /backstage/api/1.0/taboola-demo/campaigns/1234/performance-video/items/{
"url": "http://news.example.com/demo_article.html",
"title": "Demo Article",
"video_url": "https://cdn.example.com/demo_video.mp4",
"fallback_url": "https://cdn.example.com/demo_image.png"
}{
"id": "123",
"campaign_id": "1234",
"url": "http://news.example.com/demo_article.html",
"title": "Demo Article",
"approval_state": "PENDING",
"is_active": true,
"status": "PENDING_APPROVAL",
"policy_review": {
"reject_reason": null
},
"fallback_url": "http://cdn.taboola.com/libtrc/static/thumbnails/1cc96d86c676d195c1d3cb426ddc9745.png",
"gif_url": "http://c3.taboola.com/libtrc/static/gif/t_PERFORMANCE_VIDEO_DEFAULT/e_loop/so_0/f_gif/v1602508826/ax3qanrabayqre4lw3gg.gif",
"video_url": "http://c3.taboola.com/libtrc/static/video/t_PERFORMANCE_VIDEO_DEFAULT/v1602508826/ax3qanrabayqre4lw3gg.mp4!-#@800x448"
}
The Taboola solution generates 3 new assets:
- An optimized video file, in MP4 format (
video_url, in the response).- A GIF, based on the above MP4 (
gif_url, in the response).- An optimized fallback image (
fallback_url, in the response).These are saved in the Taboola CDN.
Creation of the above assets takes time. A typical response may take 15 seconds or longer (depending on the video file size, server load, network latency, etc.)
File upload examples
Example 1 - upload video file (using cURL):
curl --location --request POST 'https://backstage.taboola.com/backstage/api/1.0/demo-advertiser/campaigns/1234/performance-video/items/' \
--header 'Authorization: Bearer CZ0OAAAAAAAAEdt7AgAAAAAAGAEgAClLv6MHdQEAADooNjQ0NWZjNGQ2ZWRlNWJkNWFjZDQ2MDM5NjRiZWRhMmRjZjZhOThjMEAC::644420::78997c' \
--form 'new_item={
"url": "http://news.example.com/demo_article.html",
"title": "Demo Article",
"fallback_url": "https://cdn.example.com/demo_image.png"
};type=application/json' \
--form 'video_file=@/Users/john.doe/Downloads/demo_video.mp4'{
"id": "123",
"campaign_id": "1234",
"url": "http://news.example.com/demo_article.html",
"title": "Demo Article",
"approval_state": "PENDING",
"is_active": true,
"status": "PENDING_APPROVAL",
"policy_review": {
"reject_reason": null
},
"fallback_url": "http://cdn.taboola.com/libtrc/static/thumbnails/1cc96d86c676d195c1d3cb426ddc9745.png",
"gif_url": "http://c3.taboola.com/libtrc/static/gif/t_PERFORMANCE_VIDEO_DEFAULT/e_loop/so_0/f_gif/v1602508826/ax3qanrabayqre4lw3gg.gif",
"video_url": "http://c3.taboola.com/libtrc/static/video/t_PERFORMANCE_VIDEO_DEFAULT/v1602508826/ax3qanrabayqre4lw3gg.mp4!-#@800x448"
}Example 2 - upload 2 files (using cURL):
curl --location --request POST 'https://backstage.taboola.com/backstage/api/1.0/demo-advertiser/campaigns/1234/performance-video/items/' \
--header 'Authorization: Bearer CZ0OAAAAAAAAEdt7AgAAAAAAGAEgAClLv6MHdQEAADooNjQ0NWZjNGQ2ZWRlNWJkNWFjZDQ2MDM5NjRiZWRhMmRjZjZhOThjMEAC::644420::78997c' \
--form 'new_item={
"url": "http://news.example.com/demo_article.html",
"title": "Demo Article"
};type=application/json' \
--form 'video_file=@/Users/john.doe/Downloads/demo_video.mp4'
--form 'fallback_file=@/Users/john.doe/Downloads/demo_image.png'{
"id": "123",
"campaign_id": "1234",
"url": "http://news.example.com/demo_article.html",
"title": "Demo Article",
"approval_state": "PENDING",
"is_active": true,
"status": "PENDING_APPROVAL",
"policy_review": {
"reject_reason": null
},
"fallback_url": "http://cdn.taboola.com/libtrc/static/thumbnails/1cc96d86c676d195c1d3cb426ddc9745.png",
"gif_url": "http://c3.taboola.com/libtrc/static/gif/t_PERFORMANCE_VIDEO_DEFAULT/e_loop/so_0/f_gif/v1602508826/ax3qanrabayqre4lw3gg.gif",
"video_url": "http://c3.taboola.com/libtrc/static/video/t_PERFORMANCE_VIDEO_DEFAULT/v1602508826/ax3qanrabayqre4lw3gg.mp4!-#@800x448"
}
Uploading files
- Upload files as
multipart/form-data.- Pass all other params within the
new_itemJSON object param.- Specify a content type of
application\jsonfor thenew_itemparam only. (In the above example, this is the;type=application/jsonsnippet just afternew_itemJSON object.)
If the request is missing a param - or the content type is incorrectly specified - the server may return Error 500.
Rate limit
Rate limitTier 4. Has its own budget, separate from the other Motion Ads endpoints.
See Rate limits for the request allowance each tier carries.
