Skip to content

Campaigns API (xx.xx.xx)

MediaMath Platform API

Download OpenAPI description
Languages
Servers
Live Server

https://api.mediamath.com/api/v3.0/

Operations
Operations
Operations

Request

Get a list of advertisers

Security
Auth0
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.
  • q=id==(1,2,3) find specific entities by ID.
withstring

Get related property in response

Value"agency"
fullstring

To return all fields, set the value to *. For example, full=* will include all properties.

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

Responses

List advertisers response

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

Request

Create an advertiser

Security
Auth0
Bodyapplication/jsonrequired
ad_server_idintegerrequired
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
statusboolean
vertical_idintegerrequired
ads_txt_verifiedstring or null
Enum"ANY""AUTHORIZED_ONLY""AUTHORIZED_DIRECT_ONLY""NONE"
politicalboolean
connected_id_typestring
Value"DETERMINISTIC_FIRST"
mfa_avoidancestring
Enum"INHERIT""ALLOW_ALL""EXCLUDE_MFA"
agency_idinteger>= 1required
curl -i -X POST \
  https://api.mediamath.com/api/v3.0/advertisers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ad_server_id": 0,
    "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",
    "status": true,
    "vertical_id": 0,
    "ads_txt_verified": "ANY",
    "political": true,
    "connected_id_type": "DETERMINISTIC_FIRST",
    "mfa_avoidance": "INHERIT",
    "agency_id": 1
  }'

Responses

Advertiser created response

Bodyapplication/json
dataobject(advertiser_response_base)
metaobject(single_metadata)
Response
application/json
{ "data": { "ad_server_id": 0, "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", "status": true, "vertical_id": 0, "ads_txt_verified": "ANY", "political": true, "connected_id_type": "DETERMINISTIC_FIRST", "mfa_avoidance": "INHERIT", "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", "allow_x_strat_optimization": true, "billing_contact_id": 1, "sales_contact_id": 1, "agency": {} }, "meta": { "status": "success" } }

Request

Get an advertiser by ID

Security
Auth0
Path
advertiser_idintegerrequired

Numeric ID of the advertiser to get

Query
extendedboolean

Get extended properties in response

curl -i -X GET \
  'https://api.mediamath.com/api/v3.0/advertisers/{advertiser_id}?extended=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Advertiser response

Bodyapplication/json
Any of:
dataobject(advertiser_response_base)
metaobject(single_metadata)
Response
application/json
{ "data": { "ad_server_id": 0, "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", "status": true, "vertical_id": 0, "ads_txt_verified": "ANY", "political": true, "connected_id_type": "DETERMINISTIC_FIRST", "mfa_avoidance": "INHERIT", "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", "allow_x_strat_optimization": true, "billing_contact_id": 1, "sales_contact_id": 1, "agency": {} }, "meta": { "status": "success" } }

Request

Update an advertiser by ID

Security
Auth0
Path
advertiser_idintegerrequired

Numeric ID of the advertiser to update

Bodyapplication/jsonrequired
ad_server_idinteger
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
statusboolean
vertical_idinteger
ads_txt_verifiedstring or null
Enum"ANY""AUTHORIZED_ONLY""AUTHORIZED_DIRECT_ONLY""NONE"
politicalboolean
connected_id_typestring
Value"DETERMINISTIC_FIRST"
mfa_avoidancestring
Enum"INHERIT""ALLOW_ALL""EXCLUDE_MFA"
versioninteger>= 0
curl -i -X POST \
  'https://api.mediamath.com/api/v3.0/advertisers/{advertiser_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "ad_server_id": 0,
    "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",
    "status": true,
    "vertical_id": 0,
    "ads_txt_verified": "ANY",
    "political": true,
    "connected_id_type": "DETERMINISTIC_FIRST",
    "mfa_avoidance": "INHERIT",
    "version": 0
  }'

Responses

Advertiser updated response

Bodyapplication/json
dataobject(advertiser_response_base)
metaobject(single_metadata)
Response
application/json
{ "data": { "ad_server_id": 0, "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", "status": true, "vertical_id": 0, "ads_txt_verified": "ANY", "political": true, "connected_id_type": "DETERMINISTIC_FIRST", "mfa_avoidance": "INHERIT", "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", "allow_x_strat_optimization": true, "billing_contact_id": 1, "sales_contact_id": 1, "agency": {} }, "meta": { "status": "success" } }

Request

Get a list changes to this advertiser

Security
Auth0
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://api.mediamath.com/api/v3.0/advertisers/{advertiser_id}/history?page_limit=100&page_offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Audit log response

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

Security
Auth0
Path
advertiser_idstringrequired

Numeric ID of the advertiser to get

curl -i -X GET \
  'https://api.mediamath.com/api/v3.0/advertisers/{advertiser_id}/pixel_targeting_advertisers' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List advertisers response

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

Security
Auth0
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://api.mediamath.com/api/v3.0/advertisers/{advertiser_id}/permissions?page_limit=100&page_offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List user permissions response

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

Request

Get a list of changes to these advertiser

Security
Auth0
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://api.mediamath.com/api/v3.0/audit_log/advertisers?page_limit=100&page_offset=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": [
      0
    ]
  }'

Responses

Audit log bulk response

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" } }
Operations

Campaigns Budget Flights

Campaigns Budget Flights

Operations
Operations
Operations

Strategy Parameters

Strategy Parameters

Operations

Strategy Templates

Strategy Templates

Operations

New Strategy Plans

New Strategy Plans

Operations
Operations

Targeting Attachments

TargetingAttachments

Operations

Targeting Segments

Targeting Segments

Operations

Targeting Segment Objectives

Targeting Segment Objectives

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Enterprise Controls

Enterprise Controls

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations