Uploading creatives
Creatives belong to a campaign. Create the campaign first, with its screens and dates, then upload one video for each of its content requirements.
GET /v1/campaigns/{campaignId}/creativeslists the requirements: size, length, formats and the screens each one covers.POST /v1/campaigns/{campaignId}/creativesasmultipart/form-data, withfileandrequirementKey.- Poll the list until
completeistrue, or until a creative isFAILED. Every 10 to 30 seconds is enough. - Submit the campaign.
curl -X POST $API/v1/campaigns/cmp_9Fz1/creatives \ -H "Authorization: Bearer $TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -F "requirementKey=1280x768" \ -F "file=@winter.mp4;type=video/mp4"File rules
Section titled “File rules”- Formats: MP4, MOV, AVI or WebM. Send the file part with its
Content-Type. - Size: up to 100 MB.
- Resolution and length: as the requirement states. These are checked while the creative is
PROCESSING, so a wrong one ends asFAILEDwith afailureReason.
Changing creatives
Section titled “Changing creatives”- Upload while the campaign is
DRAFTorREJECTED. - A new upload for a requirement replaces the earlier creative.
DELETE /v1/campaigns/{campaignId}/creatives/{creativeId}removes one.- Changing the campaign’s screens can add or remove requirements. Check the list again after a change.
A large upload can take a while. Allow at least 5 minutes before timing out, and retry with the same Idempotency-Key if the connection drops.