Campaigns API (xx.xx.xx)

MediaMath Platform API

Download OpenAPI description
Languages
Servers
Mock server
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/

Organizations

Organizations

Operations

Agencies

Agencies

Operations

Advertisers

Advertisers

Operations

List advertisers

Request

Get a list of advertisers

Query
page_limitinteger[ 1 .. 1000 ]

Number of elements in the collection to retrieve

Example: page_limit=100
page_offsetinteger[ 0 .. 1000 ]

Index of the first element in the collection to retrieve

Example: page_offset=0
sort_bystring

The field to sort by. You can use any field name in ascending or descending order. For ascending order, use the field name directly, e.g., id. For descending order, prefix the field name with a hyphen (-), e.g., -id.

Example: sort_by=id, -id, name, -name
qstring

Query search for filtering. This parameter can be used to filter results based on various fields.

  • q=name=:{search}* to find all results with names starting with "search".
  • q=status==true to find all active entities.
  • q=id>=1000 to find all entities with id greater than or equal to 1000.
withstring

Get related property in response

Value"agency"
fullstring

Use this parameter to specify which properties to include in the response. To return all fields, set the value to *. For example, full=* will include all properties

Example: full=*
curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/advertisers?full=*&page_limit=100&page_offset=0&q=string&sort_by=id%2C%20-id%2C%20name%2C%20-name&with=agency' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

list of advertisers

Bodyapplication/json
One of:
dataArray of objects
metaobject(pagination metadata)
Response
application/json
{ "data": [ {} ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }

Create an Advertiser

Request

Create an advertiser

Bodyapplication/jsonrequired
ad_server_idintegerrequired
allow_x_strat_optimizationboolean
billing_contact_idinteger>= 1
data_sharing_enabledboolean
dmp_enabledstring
Enum"disabled""inherits"
domainstring<= 255 characters
external_idstring or null<= 255 characters
frequency_intervalstring or null
Enum"hour""day""week""month""not-applicable"
frequency_typestring or null
Enum"no-limit""asap""even"
frequency_amountinteger or null
minimize_multi_adsboolean
namestringrequired
sales_contact_idinteger or null>= 1
statusboolean
vertical_idintegerrequired
ads_txt_verifiedstring or null
Enum"ANY""AUTHORIZED_ONLY""AUTHORIZED_DIRECT_ONLY""NONE"
politicalboolean
connected_id_typestring
Value"DETERMINISTIC_FIRST"
agency_idinteger>= 1required
curl -i -X POST \
  https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/advertisers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ad_server_id": 0,
    "allow_x_strat_optimization": true,
    "billing_contact_id": 1,
    "data_sharing_enabled": true,
    "dmp_enabled": "disabled",
    "domain": "string",
    "external_id": "string",
    "frequency_interval": "hour",
    "frequency_type": "no-limit",
    "frequency_amount": 0,
    "minimize_multi_ads": true,
    "name": "string",
    "sales_contact_id": 1,
    "status": true,
    "vertical_id": 0,
    "ads_txt_verified": "ANY",
    "political": true,
    "connected_id_type": "DETERMINISTIC_FIRST",
    "agency_id": 1
  }'

Responses

Created

Bodyapplication/json
dataobject(advertiser)
metaobject
Response
application/json
{ "data": { "ad_server_id": 0, "allow_x_strat_optimization": true, "billing_contact_id": 1, "data_sharing_enabled": true, "dmp_enabled": "disabled", "domain": "string", "external_id": "string", "frequency_interval": "hour", "frequency_type": "no-limit", "frequency_amount": 0, "minimize_multi_ads": true, "name": "string", "sales_contact_id": 1, "status": true, "vertical_id": 0, "ads_txt_verified": "ANY", "political": true, "connected_id_type": "DETERMINISTIC_FIRST", "id": 0, "ad_server_fee": 0, "agency_id": 0, "created_on": "2019-08-24T14:15:22Z", "entity_type": "string", "updated_on": "2019-08-24T14:15:22Z", "version": 0, "effective_ads_txt_verified": "string", "agency": {} }, "meta": { "status": "success", "next_page": "string", "prev_page": "string" } }

Get an Advertiser

Request

Get an Advertiser by its ID

Path
advertiser_idintegerrequired

Numeric ID of the advertiser to get

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/advertisers/{advertiser_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Advertiser GET

Bodyapplication/json
dataobject(advertiser)
metaobject
Response
application/json
{ "data": { "ad_server_id": 0, "allow_x_strat_optimization": true, "billing_contact_id": 1, "data_sharing_enabled": true, "dmp_enabled": "disabled", "domain": "string", "external_id": "string", "frequency_interval": "hour", "frequency_type": "no-limit", "frequency_amount": 0, "minimize_multi_ads": true, "name": "string", "sales_contact_id": 1, "status": true, "vertical_id": 0, "ads_txt_verified": "ANY", "political": true, "connected_id_type": "DETERMINISTIC_FIRST", "id": 0, "ad_server_fee": 0, "agency_id": 0, "created_on": "2019-08-24T14:15:22Z", "entity_type": "string", "updated_on": "2019-08-24T14:15:22Z", "version": 0, "effective_ads_txt_verified": "string", "agency": {} }, "meta": { "status": "success", "next_page": "string", "prev_page": "string" } }

Update an Advertiser

Request

Update an advertiser by id

Path
advertiser_idintegerrequired

Numeric ID of the advertiser to update

Bodyapplication/jsonrequired
ad_server_idinteger
allow_x_strat_optimizationboolean
billing_contact_idinteger>= 1
data_sharing_enabledboolean
dmp_enabledstring
Enum"disabled""inherits"
domainstring<= 255 characters
external_idstring or null<= 255 characters
frequency_intervalstring or null
Enum"hour""day""week""month""not-applicable"
frequency_typestring or null
Enum"no-limit""asap""even"
frequency_amountinteger or null
minimize_multi_adsboolean
namestring
sales_contact_idinteger or null>= 1
statusboolean
vertical_idinteger
ads_txt_verifiedstring or null
Enum"ANY""AUTHORIZED_ONLY""AUTHORIZED_DIRECT_ONLY""NONE"
politicalboolean
connected_id_typestring
Value"DETERMINISTIC_FIRST"
versioninteger>= 0
curl -i -X POST \
  'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/advertisers/{advertiser_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ad_server_id": 0,
    "allow_x_strat_optimization": true,
    "billing_contact_id": 1,
    "data_sharing_enabled": true,
    "dmp_enabled": "disabled",
    "domain": "string",
    "external_id": "string",
    "frequency_interval": "hour",
    "frequency_type": "no-limit",
    "frequency_amount": 0,
    "minimize_multi_ads": true,
    "name": "string",
    "sales_contact_id": 1,
    "status": true,
    "vertical_id": 0,
    "ads_txt_verified": "ANY",
    "political": true,
    "connected_id_type": "DETERMINISTIC_FIRST",
    "version": 0
  }'

Responses

Updated

Bodyapplication/json
dataobject(advertiser)
metaobject
Response
application/json
{ "data": { "ad_server_id": 0, "allow_x_strat_optimization": true, "billing_contact_id": 1, "data_sharing_enabled": true, "dmp_enabled": "disabled", "domain": "string", "external_id": "string", "frequency_interval": "hour", "frequency_type": "no-limit", "frequency_amount": 0, "minimize_multi_ads": true, "name": "string", "sales_contact_id": 1, "status": true, "vertical_id": 0, "ads_txt_verified": "ANY", "political": true, "connected_id_type": "DETERMINISTIC_FIRST", "id": 0, "ad_server_fee": 0, "agency_id": 0, "created_on": "2019-08-24T14:15:22Z", "entity_type": "string", "updated_on": "2019-08-24T14:15:22Z", "version": 0, "effective_ads_txt_verified": "string", "agency": {} }, "meta": { "status": "success", "next_page": "string", "prev_page": "string" } }

Advertiser Audit Log

Request

Get a list changes to this advertiser

Path
advertiser_idintegerrequired

Numeric ID of the advertiser

Query
page_limitinteger[ 1 .. 1000 ]

Number of elements in the collection to retrieve

Example: page_limit=100
page_offsetinteger[ 0 .. 1000 ]

Index of the first element in the collection to retrieve

Example: page_offset=0
curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/advertisers/{advertiser_id}/history?page_limit=100&page_offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

list of changes to an entity

Bodyapplication/json
dataArray of objects or null
metaobject(pagination metadata)
Response
application/json
{ "data": [ {} ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }

List Advertisers when Agency has Cross Advertiser Pixels enabled

Request

List all advertiser siblings when parent agency has allow_x_adv_pixels set to true

Path
advertiser_idstringrequired

Numeric ID of the advertiser to get

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/advertisers/{advertiser_id}/pixel_targeting_advertisers' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
One of:
dataArray of objects
metaobject(pagination metadata)
Response
application/json
{ "data": [ {} ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }

List User Permissions for an advertiser

Request

List User Permissions for an advertiser

Path
advertiser_idintegerrequired

Numeric ID of the advertiser

Query
page_limitinteger[ 1 .. 1000 ]

Number of elements in the collection to retrieve

Example: page_limit=100
page_offsetinteger[ 0 .. 1000 ]

Index of the first element in the collection to retrieve

Example: page_offset=0
curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/advertisers/{advertiser_id}/permissions?page_limit=100&page_offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
dataArray of objects(permission_advertiser)
metaobject(pagination metadata)
Response
application/json
{ "data": [ {} ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }

Bulk Advertiser Audit Log

Request

Get a list of changes to these advertiser

Query
page_limitinteger[ 1 .. 1000 ]

Number of elements in the collection to retrieve

Example: page_limit=100
page_offsetinteger[ 0 .. 1000 ]

Index of the first element in the collection to retrieve

Example: page_offset=0
Bodyapplication/json
idArray of integersnon-emptyrequired
curl -i -X POST \
  'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/audit_log/advertisers?page_limit=100&page_offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": [
      0
    ]
  }'

Responses

list of changes to a group of entities

Bodyapplication/json
dataArray of objects or null
metaobject(pagination metadata)
Response
application/json
{ "data": [ {} ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }

Campaigns

Campaigns

Operations

Strategies

Strategies

Operations

Targeting

Targeting

Operations

Vendor Contracts

Vendor Contracts

Operations

Strategy Templates

Strategy Templates

Operations

Atomic Creatives

Atomic Creatives

Operations

Concepts

Concepts

Operations

Creatives

Creatives

Operations

Pixel Bundles

Pixel Bundles

Operations

Campaign Plans

Campaign Plans

Operations

Strategy Plans

Strategy Plans

Operations

Bulk Update

Bulk Update

Operations

Marketplaces

Marketplaces

Operations

Users

Users

Operations

Enterprise Controls

Enterprise Controls

Operations

General

General

Operations

Currency Rates

Currency Rates

Operations

Site Lists

Site Lists

Operations

Timezones

Timezones

Operations

Strategy Groups

Strategy Groups

Operations

Strategy Day Parts

Strategy Day Parts

Operations

Strategy Deals

Strategy Deals

Operations

Strategy IP Addresses

Strategy IP Addresses

Operations

Strategy Concepts

Strategy Concepts

Operations

Targeting Segments

Targeting Segments

Operations

Strategy Target Values

Strategy Target Values

Operations

List Organization Settings

Operations

Update Organization Settings

Operations

New Strategy Plans

Operations

Strategy Plan Target Values

Operations

Campaigns Budget Flights

Operations

User Settings

Operations

Update User Settings

Operations

Supply Sources

Operations

Vendors

Operations

Ad Servers

Operations

Site Lists Site Download

Operations

Site Lists Assignments

Operations

Targeting Segment Objectives

Operations

Targeting Segment Objective

Operations