- Create a new video creative
Create a new video creative - V3.
To upload a video, supply the fileName field in the request body (see the Create with fileName sample in the Request samples panel). The response then includes a pre-signed S3 uploadUrl (valid for expiresIn seconds), which the client uses to PUT the file directly to S3:
curl -X PUT \
-H "x-amz-acl: public-read" \
-H "x-amz-meta-creative: {{CREATIVE_ID}}" \
-H "Content-Type: {{UPLOADED_FILE_CONTENT_TYPE}}" \
--upload-file "{{UPLOADED_FILE_PATH/File.mp4}}" \
"{{S3_PRESIGNED_URL}}"The x-amz-acl: public-read and x-amz-meta-creative: <creativeId> headers are required (both are signed into the pre-signed URL).
Creative object to create
VAST XML template for BYOT viewability (must contain VPAID_AD_PARAMETERS.URL macro)
External Identifier (requires customVAST or customVASTUrl)
- https://api.mediamath.comhttps://api.mediamath.com/v3.0/creatives
curl -i -X POST \
https://api.mediamath.com/v3.0/creatives \
-H 'Content-Type: application/json' \
-d '{
"active": false,
"advertiser": 0,
"name": "string",
"concept": 0,
"startTime": 0,
"endTime": 0,
"clickthroughUrl": "string",
"customVAST": "string",
"customVASTUrl": "string",
"viewabilityTemplate": "string",
"landingUrl": "string",
"eventPixels": [
{
"typ": "string",
"url": "string"
}
],
"vendors": [
0
],
"vastVersion": "VAST2",
"disabledVariants": [
0
],
"externalIdentifier": "string",
"clockNumber": "string",
"customVASTExtensionXML": "string",
"fileName": "string"
}'Creative created successfully
Pre-signed S3 PUT URL (only present when fileName was provided in the request). Valid for expiresIn seconds. The PUT request must include headers x-amz-acl: public-read and x-amz-meta-creative:
{ "creativeId": 0, "uploadUrl": "string", "expiresIn": 0, "status": { "code": "string", "message": "string" } }