Creative assets upload
Upload creative assets and create first-party atomic creatives. This endpoint validates files and metadata, stores assets, and returns the atomic creatives that were created.
Creative upload limits:
| Creative upload shape | Limit |
|---|---|
| Plain/non-ZIP uploaded files | 500KB per uploaded file |
| Uploaded ZIP package | 10MB per ZIP file |
| Direct files in the uploaded outer ZIP | 500KB per direct file |
| Assets inside an inner HTML5 package ZIP | 500KB recommended maximum; warning only |
| Uploaded filename form parts | 10 files max |
Send all files in a request with either the filename multipart field name or the legacy filename[] multipart field name; do not mix both field names in the same request. The OpenAPI x-max-file-size: 10485760 value is the transport/schema ceiling for uploaded ZIP parts. Non-ZIP 500KB and direct outer-ZIP file 500KB limits are endpoint validation rules. Assets inside an inner HTML5 package ZIP over 500KB are accepted with a meta.warnings entry unless the html5-file-too-large sub_code is promoted to an error by configuration. If multiple ZIP files are uploaded, ZIP structural/content validation preserves the legacy behavior of validating the first ZIP selected by the request.
Top-level uploads may use image extensions (.gif, .jpg, .jpeg, .png, .tiff, .tif, .svg), the legacy .swf extension, loose HTML/CSS/JS/font extensions (.html, .htm, .css, .js, .woff, .woff2, .ttf, .otf), or ZIP packages. ZIP-inner HTML5 assets may use image extensions plus .html, .htm, .css, .js, .woff, .woff2, .ttf, .otf, .mp4, and .webm.
HTML5 packages must use a two-level ZIP structure: the outer ZIP contains one or more inner ZIP files, each inner ZIP contains the HTML5 creative assets, and backup images are included in the outer ZIP. Loose files must not be uploaded alongside an HTML5 ZIP package. Nested ZIPs beyond two levels are rejected.
HTML5 validation errors and warnings use these stable sub_code values:
| sub_code | Default disposition | Scope | Trigger |
|---|---|---|---|
| html5-missing-click-tracker | Error | Inner package | No HTML/JS file contains a MediaMath click-tracker macro |
| html5-noscript-tag | Warning | Inner package | Root HTML contains a <noscript> tag |
| html5-storage-api | Warning | Inner package | HTML/JS file uses localStorage or sessionStorage |
| html5-external-reference | Warning | Inner package | Root HTML references an external asset |
| html5-invalid-filename-chars | Warning | Inner package | File name contains spaces, non-ASCII, or other non-standard characters |
| html5-missing-file-extension | Warning | Inner package | Extensionless file is recognized by content signature or root HTML reference |
| html5-unsafe-filename-path | Error | Inner package | File path is absolute, contains ./.., drive-letter, or UNC path components |
| html5-filename-too-long | Error | Inner package | File path exceeds 255 characters |
| html5-unsupported-file-type | Error | Outer ZIP and inner package | File extension is not allowed |
| html5-file-too-large | Warning | Inner package | Inner package asset exceeds the recommended 500KB maximum |
| html5-file-too-large | Error | Outer ZIP direct entry | Direct entry in uploaded outer ZIP exceeds 500KB |
| html5-file-read-error | Error | Inner package | Extracted HTML/JS file cannot be read |
| html5-backup-mismatch | Warning | HTML5 package auto-discovery | Backup image matches the package name only by letter case |
| html5-backup-mismatch | Error | HTML5 package auto-discovery | No backup metadata and no matching backup image exists |
| html5-backup-mismatch | Error | HTML5 package manual backup | Specified backup file is absent from the ZIP |
| html5-invalid-package-structure | Error | Outer ZIP | HTML appears directly in the outer ZIP |
| html5-nested-zip-too-deep | Error | Outer ZIP | ZIP nesting exceeds two levels |
| html5-separate-files | Error | Multipart request | Loose files are uploaded alongside an HTML5 ZIP package |
| html5-submission-name-mismatch | Error | Outer ZIP (HTML5) | Inner ZIP name is missing from metadata.submissions[].name |
| submission-name-mismatch | Error | Outer ZIP (non-HTML5) | Plain ZIP file is missing from metadata.submissions[].name |
| zip-too-large | Error | Uploaded ZIP | Uploaded ZIP exceeds 10MB |
| html5-validation-error | Error | Fallback | Internal fallback for an unmapped HTML5 validation rule |
Request
- Base URLhttps://api.mediamath.com/api/v3.0
- AuthOAuth 2Authorization codehttps://auth.mediamath.com/authorizeToken URLhttps://auth.mediamath.com/oauth/tokenScopesoffline_access, manage:services
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body multipart/form-data
Example request
{
"metadata": {
"advertiser_id": 123,
"submissions": [
{
"name": "banner_300x250.jpg",
"click_through_url": "https://example.com/click",
"landing_page": "https://example.com/landing",
"concept_id": 123,
"backup": "backup_image.jpg",
"expandable": "expandable_image.jpg",
"creative_name": "My Custom Creative Name"
}
]
}
}Response
Upload completed successfully
Example response
{
"meta": {
"status": "success",
"count": 1,
"warnings": [
{
"code": "warning",
"sub_code": "html5-noscript-tag"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.