Video Creative API
Creating a Video Creative
To create a Video Creative, use a multipart form-data, or provide a remote URL. Examples in cURL are shown below.
REST API
Video Creative:
POST /api/v0/videos
curl -X POST \ https://console.springserve.com/api/v0/videos/ \ -H 'Authorization: <authorizationToken>' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \ -F 'video=@/<filepath>/videofile.mp4' -F 'demand_partner_id="<demand_partner_id>"' -F 'name="MyCreative"'
Status code 201
Response (example)
{ "id": <id>, "account_id": <account_id>, "name": "MyCreative", "height": 1080, "width": 1920, "duration_seconds": 14, "video_file_name": "VIDEO FILE API DOCS", "video_content_type": "video/mp4", "video_file_size": 6737024, "video_updated_at": "2018-08-20T21:25:27.235Z", "video_remote_url": null }
Remote URL:
POST /api/v0/videos
curl -X POST \ https://console.springserve.com/api/v0/videos/ \ -H 'Authorization: <authorizationToken>' \ -H 'Cache-Control: no-cache' \ -F 'demand_partner_id="<demand_partner_id>"' -F 'creative_remote_url="<remote_url>"' -F 'name="MyCreative"'
Status code 201
Response (example)
{ "id": <id>, "account_id": <account_id>, "demand_partner_id": <demand_partner_id>, "name": "MyCreative", "height": 1080, "width": 1920, "duration_seconds": 31, "creative_file_name": "video.mp4", "creative_content_type": "video/mp4", "creative_file_size": 14305681, "creative_updated_at": "2022-08-03T22:08:04.187Z", "creative_remote_url": "https://cdn.samplewebsite.com/video.mp4" }
SDK
resp = springserve.video_creatives.upload_video({'demand_partner_id': 5}, "/Users/blah/Downloads/video.mp4")
Get a Video Creative
REST API
GET /api/v0/videos/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Response
Status code 200
{ "id": 1832, "account_id": 1, "name": "videofile.mp4", "height": 1080, "width": 1920, "duration_seconds": 14, "video_file_name": "VIDEO FILE API DOCS", "video_content_type": "video/mp4", "video_file_size": 6737024, "video_updated_at": "2018-08-20T21:25:27.235Z", "video_remote_url": null }
SDK
resp = springserve.video_creatives.get(123456)
Create a Video Demand Tag
First create your video creative as outlined above. Then create a Creative Asset demand tag (demand_class 4) with the id of the video that you just created.
REST API
POSTÂ /api/v0/demand_tags
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
{
"name": "VIDEO Demand Tag",
"video_id": <id>,
"video_landing_page_url": "https://mylandingpage.com",
"demand_class": 4
}
SDK
dt = springserve.demand_tags.new({"name": "VIDEO Demand Tag","video_id": <id>,"video_landing_page_url":"https://mylandingpage.com","demand_class": 4})