Component Creatives API (1.0)

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.

Languages
Servers

https://t1.mediamath.com/

Component Creatives

Operations

Update a Single component creative

Request

Update a Single component creative

Path
component_idintegerrequired

See below

Bodyapplication/json

See below

any
curl -i -X POST \
  'https://t1.mediamath.com/component_creatives/v1.0/components/{component_id}' \
  -H 'Content-Type: application/json'

Responses

Bodyapplication/json
Response
application/json
{ "data": { "char_limit": null, "component_human_name": "Destination URL", "component_id": 4, "created_at": "2016-12-01T03:56:44.085Z", "is_enabled": true, "updated_at": "2016-12-01T03:56:44.085Z", "value_type_name": "TEXT" }, "meta": { "code": 200, "status": "success", "type": "component" } }

Create a New Asset Collection

Request

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--

Headers
adama_sessionstring

adama_session

Bodyapplication/json

See below

any
curl -i -X POST \
  https://t1.mediamath.com/component_creatives/v1.0/assets \
  -H 'Content-Type: application/json' \
  -H 'adama_session: string'

Responses

Body
Response
{ "data": { "advertiser_id": 100178, "asset_id": 1546, "asset_name": null, "component_human_name": "Image", "component_id": 2, "created_at": "2016-11-18T16:38:45.375Z", "image_file_size": 5052, "image_filename": "logo.png", "image_height": 100, "image_url": "https://s3.amazonaws.com/mm-component-creative/1479487125286_227082bd4ced0f888aa0066f06ea1402_logo.png", "image_width": 160, "updated_at": "2016-11-18T16:38:45.375Z" }, "meta": { "code": 201, "status": "created", "type": "asset" } }

Get video asset upload S3 URL

Request

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.

Path
filenamestringrequired

Cannot include any of the following characters: {}^/`[]~<>|#%'"

Headers
cookiestring

Cookie: adama_session={adama_session};

curl -i -X GET \
  'https://t1.mediamath.com/component_creatives/v1.0/upload/{filename}' \
  -H 'cookie: string' \
  -b string

Responses

Bodyapplication/json
Response
application/json
{ "meta": { "code": 200, "status": "success", "type": "upload" }, "data": "https://mm-component-creative-prod-dev.s3.amazonaws.com/1506608929527_cb764213f2b67169dacc809f077e4e7f_hello.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ2DETCTFEHT7BQOA%2F20170928%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170928T142849Z&X-Amz-Expires=60&X-Amz-Signature=536f9681d6de47f121616673b7a14cb9524d48944cb8d689f83e6f173da2f301&X-Amz-SignedHeaders=host" }