# Component Creatives API

The terms creative components and native components may be used interchangeably.
Component Creatives are uploaded in the "Creatives Tab" within the Creatives Module, and is where creatives for native campaigns are uploaded.

## Component Creatives API v3.0 (current)

QA API Base: `https://t1qa1.mediamath.com/component_creatives/v3.0/` (or whichever QA server is being used)

Prod API Base: `https://api.mediamath.com/component_creatives/v3.0/`

v3.0 endpoints use Bearer (JWT) authentication via the `Authorization` header.

## Component Creatives API v1.0 (deprecated)

> **Deprecated:** The v1.0 endpoints are deprecated. Please migrate to v3.0.

QA API Base: `https://t1qa1.mediamath.com/component_creatives/v1.0/` (or whichever QA server is being used)

Prod API Base: `https://api.mediamath.com/component_creatives/v1.0`

Version: 3.0
License: Apache 2.0

## Servers

```
https://api.mediamath.com
```

## Security

### BearerAuth

Type "Bearer" followed by a space and JWT token.

Type: apiKey
In: header
Name: Authorization

## Download OpenAPI description

[Component Creatives API](https://apidocs.mediamath.com/_bundle/apis/component-creatives.yaml)

## Creatives - Native

v3.0 component (native) creative endpoints.

### List Component Creatives

 - [GET /component_creatives/v3.0/creatives](https://apidocs.mediamath.com/apis/component-creatives/creatives-native/v3-list-component-creatives.md): Retrieve a paginated list of component creatives with filtering options and JWT authentication. Supports sorting by various fields.

### Create Component Creative

 - [POST /component_creatives/v3.0/creatives](https://apidocs.mediamath.com/apis/component-creatives/creatives-native/v3-create-component-creative.md): Create a new component creative with assets. Supports base64 encoded image and subtitle uploads.

### Get Component Creative by ID

 - [GET /component_creatives/v3.0/creatives/{atomic_creative_id}](https://apidocs.mediamath.com/apis/component-creatives/creatives-native/v3-get-component-creative-by-id.md): Retrieve a component creative object using the creative ID with JWT authentication. Supports various asset types including text, image, video, and subtitle assets.

### Update Component Creative

 - [PUT /component_creatives/v3.0/creatives/{atomic_creative_id}](https://apidocs.mediamath.com/apis/component-creatives/creatives-native/v3-update-component-creative.md): Update an existing component creative with optional fields. When assets are provided, all previous assets are completely replaced.

### Get Creative Eligibility

 - [GET /component_creatives/v3.0/creatives/{atomic_creative_id}/eligibility](https://apidocs.mediamath.com/apis/component-creatives/creatives-native/v3-get-creative-eligibility.md): Retrieve eligibility information for a component creative across all placements with JWT authentication

## Components

v3.0 component definition endpoints.

### List All Components

 - [GET /component_creatives/v3.0/components](https://apidocs.mediamath.com/apis/component-creatives/components/v3-list-all-components.md): Retrieve all components from the system

### Create Component

 - [POST /component_creatives/v3.0/components](https://apidocs.mediamath.com/apis/component-creatives/components/v3-create-component.md): Create a new component. Requires Component Manager authorization.

### Get Component By ID

 - [GET /component_creatives/v3.0/components/{component_id}](https://apidocs.mediamath.com/apis/component-creatives/components/v3-get-component-by-id.md): Retrieve a component by its ID

### Update Component

 - [POST /component_creatives/v3.0/components/{component_id}](https://apidocs.mediamath.com/apis/component-creatives/components/v3-update-component.md): Update an existing component. Requires Component Manager authorization. Note: value_type_name cannot be updated.

## Approvals

v3.0 creative approval status endpoints.

### Get Approvals Status

 - [GET /component_creatives/v3.0/approvals](https://apidocs.mediamath.com/apis/component-creatives/approvals/v3-get-approvals-status.md): Retrieve approval status for multiple atomic creative IDs. Returns the net status and individual source statuses for each creative.

## Component Creatives

{% admonition type="danger" name="This API is deprecated and will be removed soon" %}
  Please migrate to the **Component Creatives API v3.0** documented above.
{% /admonition %}

{% admonition type="warning" name="Notice about authentication with cookie adama_session" %}
  The use of cookie adama_session for authentication has been discontinued and it's not supported in Component Creatives API v3.0.
  We ask all of our clients who have not yet migrated to **Bearer (JWT) Authentication** to do so as soon as possible.
{% /admonition %}

### List Creatives

 - [GET /component_creatives/v1.0/creatives](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/list-creatives.md): ⚠️ Deprecated — Use GET /v3.0/creatives instead.

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): ⚠️ Deprecated — Use POST /v3.0/creatives instead.

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): ⚠️ Deprecated — Use GET /v3.0/approvals instead.

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): ⚠️ Deprecated — Use POST /v3.0/creatives instead.

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): ⚠️ Deprecated — Use GET /v3.0/creatives/{atomic_creative_id}/eligibility instead.

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): ⚠️ Deprecated — Use GET /v3.0/creatives/{atomic_creative_id} instead.

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): ⚠️ Deprecated — Use PUT /v3.0/creatives/{atomic_creative_id} instead.

# Update creatives details

## Caution
If 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): ⚠️ Deprecated — Use GET /v3.0/creatives/{atomic_creative_id}?include=previews instead.

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): ⚠️ Deprecated — Use PUT /v3.0/creatives/{atomic_creative_id} instead.

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): ⚠️ Deprecated — Use GET /v3.0/components instead.

List components

### Create a Component

 - [POST /component_creatives/v1.0/components](https://apidocs.mediamath.com/apis/component-creatives/component-creatives/create-a-component.md): ⚠️ Deprecated — Use POST /v3.0/components instead.

Access is restricted to certain T1 user IDs stored in the database, disallowed users will receive a 401 error 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): ⚠️ Deprecated — Use GET /v3.0/components/{component_id} instead.

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): ⚠️ Deprecated — Use POST /v3.0/components/{component_id} instead.

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): ⚠️ Deprecated — Use POST /v3.0/creatives instead.

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.

