# Component Creatives API The terms creative components and native components may be used interchangeably. The front part of the endpoint is: QA API Base: `https://t1qa1.mediamath.com/component_creatives/v1.0/` (or whichever QA server is being used) Prod API Base: `https://t1.mediamath.com/component_creatives/v1.0` Component Creatives are uploaded in the "Creatives Tab" within the Creatives Module, and is where creatives for native campaigns are uploaded. Version: 1.0 License: Apache 2.0 ## Servers ``` https://t1.mediamath.com ``` ## Download OpenAPI description [Component Creatives API](https://apidocs.mediamath.com/_spec/apis/component-creatives.yaml) ## Component Creatives ### List Creatives - [GET /component_creatives/v1.0/creatives](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/list-creatives.md): List creatives ### Create a New Creative - [POST /component_creatives/v1.0/creatives](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/create-a-new-creative.md): Create a new creative ### Get Group Version Info - [GET /component_creatives/v1.0/version](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/get-group-version-info.md): Get group version info ### List Creative Approvals - [GET /component_creatives/v1.0/approvals](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/list-creative-approvals.md): List Creative Approvals ### Post an Image or Subtitle Asset - [POST /component_creatives/v1.0/approvals](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/post-an-image-or-subtitle-asset.md): Note about image assets: Base64 encoded image assets can be uploaded via this endpoint. This new image asset is represented in the assets param as an object containing an encoded_image_file and image_name properties. Example assets: "[{\"encoded_image_file\": __base64_data_here__, \"image_filename\":\"logo.png\"}]" Note about subtitle assets: Base64 encoded subtitle assets can be uploaded via this endpoint. This new subtitle asset is represented in the assets param as an object containing an encoded_subtitle_file and subtitle_filename properties. Example assets: "[{\"encoded_subtitle_file\": __base64_data_here__, \"subtitle_filename\":\"test.srt\"}]" Header should be of format: Cookie: adama_session={adama_session} ### Get Creative's Eligibility Details - [GET /component_creatives/v1.0/creatives/{atomic_creative_id}/eligibility](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/get-details-about-a-creatives-eligibility.md): Get creative's eligibility details ### Get Details of a Creative - [GET /component_creatives/v1.0/creatives/{atomic_creative_id}](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/get-details-of-a-creative.md): Get details of a creative ### Update Creatives Details - [POST /component_creatives/v1.0/creatives/{atomic_creative_id}](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/update-creatives-details.md): # Update creatives details ## Caution If the the parameter assets is defined, then all previous assets belonging to this creative are replaced with this new array of assets. You can avoid deleting assets by adding the asset by id to the assets param like so [{\"asset_id\":34223}] ::: Note about image assets: Base64 encoded image assets can be uploaded via this endpoint. This new image asset is represented in the assets param as an object containing an encoded_image_file and image_filename properties. Example assets: "[{\"encoded_image_file\": __base64_data_here__, \"image_filename\":\"logo.png\"}]" ## Note about subtitle assets: Base64 encoded subtitle assets can be uploaded via this endpoint. This new subtitle asset is represented in the assets param as an object containing an encoded_subtitle_file and subtitle_filename properties. Example assets: "[{\"encoded_subtitle_file\": __base64_data_here__, \"subtitle_filename\":\"test.srt\"}]" ### Get Atomic Creative with Preview Info - [GET /component_creatives/v1.0/creatives/{atomic_creative_id}.QUERY.include=previews](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/creatives-atomic_creative_id-include-previews.md): Get an atomic creative with preview info. # ".QUERY." should be replaced by a question mark for actual execution ### Get a Text Asset - [GET /component_creatives/v1.0/assets/{asset_id}](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/get-a-text-asset.md): Get a text asset Headers Cookie: adama_session={adama_session} ### Request Update Image Asset - [POST /component_creatives/v1.0/assets/{asset_id}](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/request-update-image-asset.md): Request update image asset Text asset is in the request sample below. Image asset request sample: ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="asset_value"; filename="" Content-Type: ------WebKitFormBoundary7MA4YWxkTrZu0gW-- ### List Components - [GET /component_creatives/v1.0/components](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/list-components.md): List components ### Create a Component - [POST /component_creatives/v1.0/components](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/create-a-component.md): Access is restricted to certain T1 user IDs stored in the database, disallowed users will receive a 401 eeror message. The ID of the created component will be in the response. ### Get a Single Component Creative - [GET /component_creatives/v1.0/components/{component_id}](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/get-a-single-component-creative.md): Get a single component creative ### Update a Single component creative - [POST /component_creatives/v1.0/components/{component_id}](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/update-a-single-component-creative.md): Update a Single component creative ### Create a New Asset Collection - [POST /component_creatives/v1.0/assets](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/create-a-new-asset-collection.md): Create an asset and optionally associate it with a creative. Either an advertiser_id or creative_ids must be provided. All creatives in creative_ids must belong to the same advertiser. The ID of the created asset will be in the response. Request text asset (application/json) Attributes (NewTextAsset) Headers Cookie: adama_session={adama_session} The body shown below is for a text asset. An image asset body might be in the form of: ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="component_id" 2 ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="asset_value"; filename="" Content-Type: ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="creative_ids" [3200795] ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="advertiser_id" 100178 ------WebKitFormBoundary7MA4YWxkTrZu0gW-- ### Get video asset upload S3 URL - [GET /component_creatives/v1.0/upload/{filename}](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/get_video_asset_upload_s3_url.md): Get a pre-signed S3 URL to be used for uploading video assets. Once an object is put in the S3 bucket, this S3 url without it's query parameters can be used as an asset_value for video assets.