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