MediaMath Platform API
Campaigns API (xx.xx.xx)
https://api.mediamath.com/api/v3.0/
- Live Server
https://api.mediamath.com/api/v3.0/bulk_update/campaigns
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.mediamath.com/api/v3.0/bulk_update/campaigns \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"update": [
{
"archived": false,
"status": true,
"name": "string",
"service_type": "SELF",
"io_name": "string",
"io_reference_num": "string",
"is_programmatic_guaranteed": true,
"political": false,
"source_campaign_id": 0,
"zone_name": "string",
"viewability": {
"vendor_id": 0,
"type": "AUTO_TAG",
"sample_rate": 1
},
"identity": {
"device_graph_only": false,
"bid_min_devices": 1,
"connected_id_type": "DETERMINISTIC_FIRST"
},
"ad_server": {
"ad_server_id": 0,
"ad_server_username": "string",
"ad_server_password": "string",
"use_default_ad_server": true,
"ad_server_fee": 9999999.99
},
"pacing": {
"pacing_alert": 0,
"impression_cap_automatic": false,
"impression_cap_amount": 0,
"impression_cap_type": "even",
"spend_cap_type": "even",
"spend_cap_amount": 0,
"spend_cap_automatic": true,
"brain_intraday_pacing": false,
"spend_pace_ahead": false,
"impression_pace_ahead": false
},
"attribution": {
"has_custom_attribution": false,
"custom_attribution_source": "3rd Party Attribution",
"pc_window_minutes": 0,
"pv_window_minutes": 0,
"pv_pct": 100,
"merit_pixel_id": 0,
"conversion_type": "every",
"conversion_variable_minutes": 1
},
"vendor_contracts": [
{
"vendor_id": 0,
"use_mm_contract": true,
"price": 0.1,
"rate_card_type": "CPM"
}
],
"id": 1,
"goals": {
"goal_type": "spend",
"goal_alert": 9999999.99,
"goal_value": 0.0001,
"goal_category": "audience"
},
"duration": {
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z"
},
"budget": {
"total_budget": 0.1,
"total_impression_budget": 0,
"currency_code": "USD",
"margin_pct": 9999999.9999,
"dynamic_budget_allocation_type": "SBA_AUTO_ALLOCATION",
"dynamic_budget_allocation_applied": "2019-08-24T14:15:22Z",
"dynamic_budget_allocation_available": "2019-08-24T14:15:22Z",
"flights": [
{
"id": 0,
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"total_budget": 0.1,
"total_impression_budget": 0
}
]
},
"frequency": {
"frequency_type": "even",
"frequency_interval": "hour",
"frequency_amount": 0,
"use_mm_freq": false,
"frequency_optimization": false
},
"inventory": {
"ads_txt_verified": "ANY",
"minimize_multi_ads": false,
"override_suspicious_traffic_filter": false,
"suspicious_traffic_filter_level": 25,
"dcs_data_is_campaign_level": false,
"restrict_targeting_to_deterministic_id": true,
"restrict_targeting_to_same_device_id": true
}
}
]
}'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
- Live Server
https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}?extended=true' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": { "archived": false, "status": true, "name": "string", "service_type": "SELF", "io_name": "string", "io_reference_num": "string", "is_programmatic_guaranteed": true, "political": false, "source_campaign_id": 0, "zone_name": "string", "viewability": { … }, "identity": { … }, "ad_server": { … }, "pacing": { … }, "attribution": { … }, "vendor_contracts": [ … ], "id": 0, "version": 0, "advertiser_id": 0, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "locked_on": "2019-08-24T14:15:22Z", "v3_usage": true, "duration": { … }, "goals": { … }, "budget": { … }, "frequency": { … }, "inventory": { … }, "site_lists": [ … ], "custom_brain_selections": [ … ], "strategies": { … }, "strategy_groups": { … }, "mfa_avoidance": "INHERIT" }, "meta": { "status": "success" } }
- Live Server
https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"archived": false,
"status": true,
"name": "string",
"service_type": "SELF",
"io_name": "string",
"io_reference_num": "string",
"is_programmatic_guaranteed": true,
"political": false,
"source_campaign_id": 0,
"zone_name": "string",
"viewability": {
"vendor_id": 0,
"type": "AUTO_TAG",
"sample_rate": 1
},
"identity": {
"device_graph_only": false,
"bid_min_devices": 1,
"connected_id_type": "DETERMINISTIC_FIRST"
},
"ad_server": {
"ad_server_id": 0,
"ad_server_username": "string",
"ad_server_password": "string",
"use_default_ad_server": true,
"ad_server_fee": 9999999.99
},
"pacing": {
"pacing_alert": 0,
"impression_cap_automatic": false,
"impression_cap_amount": 0,
"impression_cap_type": "even",
"spend_cap_type": "even",
"spend_cap_amount": 0,
"spend_cap_automatic": true,
"brain_intraday_pacing": false,
"spend_pace_ahead": false,
"impression_pace_ahead": false
},
"attribution": {
"has_custom_attribution": false,
"custom_attribution_source": "3rd Party Attribution",
"pc_window_minutes": 0,
"pv_window_minutes": 0,
"pv_pct": 100,
"merit_pixel_id": 0,
"conversion_type": "every",
"conversion_variable_minutes": 1
},
"vendor_contracts": [
{
"vendor_id": 0,
"use_mm_contract": true,
"price": 0.1,
"rate_card_type": "CPM"
}
],
"goals": {
"goal_type": "spend",
"goal_alert": 9999999.99,
"goal_value": 0.0001,
"goal_category": "audience"
},
"budget": {
"total_budget": 0.1,
"total_impression_budget": 0,
"currency_code": "USD",
"margin_pct": 9999999.9999,
"dynamic_budget_allocation_type": "SBA_AUTO_ALLOCATION",
"dynamic_budget_allocation_applied": "2019-08-24T14:15:22Z",
"dynamic_budget_allocation_available": "2019-08-24T14:15:22Z",
"flights": [
{
"id": 0,
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"total_budget": 0.1,
"total_impression_budget": 0
}
]
},
"frequency": {
"frequency_type": "even",
"frequency_interval": "hour",
"frequency_amount": 0,
"use_mm_freq": false,
"frequency_optimization": false
},
"inventory": {
"ads_txt_verified": "ANY",
"minimize_multi_ads": false,
"override_suspicious_traffic_filter": false,
"suspicious_traffic_filter_level": 25,
"dcs_data_is_campaign_level": false,
"restrict_targeting_to_deterministic_id": true,
"restrict_targeting_to_same_device_id": true
},
"site_lists": [
{
"id": 0,
"assigned": true
}
],
"custom_brain_selections": [
{
"selection_id": 0,
"selection_type": "Audience Target"
}
],
"mfa_avoidance": "INHERIT"
}'
{ "data": { "archived": false, "status": true, "name": "string", "service_type": "SELF", "io_name": "string", "io_reference_num": "string", "is_programmatic_guaranteed": true, "political": false, "source_campaign_id": 0, "zone_name": "string", "viewability": { … }, "identity": { … }, "ad_server": { … }, "pacing": { … }, "attribution": { … }, "vendor_contracts": [ … ], "id": 0, "version": 0, "advertiser_id": 0, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "locked_on": "2019-08-24T14:15:22Z", "v3_usage": true, "duration": { … }, "goals": { … }, "budget": { … }, "frequency": { … }, "inventory": { … }, "site_lists": [ … ], "custom_brain_selections": [ … ], "strategies": { … }, "strategy_groups": { … }, "mfa_avoidance": "INHERIT" }, "meta": { "status": "success" } }
Number of elements in the collection to retrieve
Index of the first element in the collection to retrieve
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
.
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.
- Live Server
https://api.mediamath.com/api/v3.0/campaigns
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.mediamath.com/api/v3.0/campaigns?page_limit=100&page_offset=0&sort_by=id%2C+-id%2C+name%2C+-name&q=string&full=*' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
The latest end date of flight must be no more than 36 months after the earliest start date
- Live Server
https://api.mediamath.com/api/v3.0/campaigns
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.mediamath.com/api/v3.0/campaigns \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"archived": false,
"status": true,
"name": "string",
"service_type": "SELF",
"io_name": "string",
"io_reference_num": "string",
"is_programmatic_guaranteed": true,
"political": false,
"source_campaign_id": 0,
"zone_name": "string",
"viewability": {
"vendor_id": 0,
"type": "AUTO_TAG",
"sample_rate": 1
},
"identity": {
"device_graph_only": false,
"bid_min_devices": 1,
"connected_id_type": "DETERMINISTIC_FIRST"
},
"ad_server": {
"ad_server_id": 0,
"ad_server_username": "string",
"ad_server_password": "string",
"use_default_ad_server": true,
"ad_server_fee": 9999999.99
},
"pacing": {
"pacing_alert": 0,
"impression_cap_automatic": false,
"impression_cap_amount": 0,
"impression_cap_type": "even",
"spend_cap_type": "even",
"spend_cap_amount": 0,
"spend_cap_automatic": true,
"brain_intraday_pacing": false,
"spend_pace_ahead": false,
"impression_pace_ahead": false
},
"attribution": {
"has_custom_attribution": false,
"custom_attribution_source": "3rd Party Attribution",
"pc_window_minutes": 0,
"pv_window_minutes": 0,
"pv_pct": 100,
"merit_pixel_id": 0,
"conversion_type": "every",
"conversion_variable_minutes": 1
},
"vendor_contracts": [
{
"vendor_id": 0,
"use_mm_contract": true,
"price": 0.1,
"rate_card_type": "CPM"
}
],
"advertiser_id": 1,
"goals": {
"goal_type": "spend",
"goal_alert": 9999999.99,
"goal_value": 0.0001,
"goal_category": "audience"
},
"budget": {
"total_budget": 0.1,
"total_impression_budget": 0,
"currency_code": "USD",
"margin_pct": 9999999.9999,
"dynamic_budget_allocation_type": "SBA_AUTO_ALLOCATION",
"dynamic_budget_allocation_applied": "2019-08-24T14:15:22Z",
"dynamic_budget_allocation_available": "2019-08-24T14:15:22Z",
"flights": [
{
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"total_budget": 0.1,
"total_impression_budget": 0
}
]
},
"frequency": {
"frequency_type": "even",
"frequency_interval": "hour",
"frequency_amount": 0,
"use_mm_freq": false,
"frequency_optimization": false
},
"inventory": {
"ads_txt_verified": "ANY",
"minimize_multi_ads": false,
"override_suspicious_traffic_filter": false,
"suspicious_traffic_filter_level": 25,
"dcs_data_is_campaign_level": false,
"restrict_targeting_to_deterministic_id": true,
"restrict_targeting_to_same_device_id": true
},
"site_lists": [
{
"id": 0,
"assigned": true
}
],
"custom_brain_selections": [
{
"selection_id": 0,
"selection_type": "Audience Target"
}
],
"mfa_avoidance": "INHERIT"
}'
{ "data": { "archived": false, "status": true, "name": "string", "service_type": "SELF", "io_name": "string", "io_reference_num": "string", "is_programmatic_guaranteed": true, "political": false, "source_campaign_id": 0, "zone_name": "string", "viewability": { … }, "identity": { … }, "ad_server": { … }, "pacing": { … }, "attribution": { … }, "vendor_contracts": [ … ], "id": 0, "version": 0, "advertiser_id": 0, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "locked_on": "2019-08-24T14:15:22Z", "v3_usage": true, "duration": { … }, "goals": { … }, "budget": { … }, "frequency": { … }, "inventory": { … }, "site_lists": [ … ], "custom_brain_selections": [ … ], "strategies": { … }, "strategy_groups": { … }, "mfa_avoidance": "INHERIT" }, "meta": { "status": "success" } }
- Live Server
https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}/history
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}/history?page_limit=100&page_offset=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
- Live Server
https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}/dynamic_budget_allocation
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}/dynamic_budget_allocation?full=*' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"dynamic_budget_allocation_applied": "2019-08-24T14:15:22Z",
"dynamic_budget_allocation_available": "2019-08-24T14:15:22Z"
}'
{ "data": { "id": 0, "entity_type": "string", "name": "string" }, "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
Used to be called 'remember_source'. If true set the source_campaign_id to campaign id
- Live Server
https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}/copy
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}/copy' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"advertiser_id": 0,
"name": "string",
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"merit_pixel_id": 0,
"status": true,
"copy_assigned_site_lists": false,
"copy_vendor_contracts": false,
"copy_brain_settings": false,
"copy_audience_in_brain": false,
"copy_viewability": false,
"budget": {
"flights": [
{
"start_date": "2019-08-24T14:15:22Z",
"end_date": "2019-08-24T14:15:22Z",
"total_budget": 0.1,
"total_impression_budget": 0
}
]
}
}'
{ "data": { "archived": false, "status": true, "name": "string", "service_type": "SELF", "io_name": "string", "io_reference_num": "string", "is_programmatic_guaranteed": true, "political": false, "source_campaign_id": 0, "zone_name": "string", "viewability": { … }, "identity": { … }, "ad_server": { … }, "pacing": { … }, "attribution": { … }, "vendor_contracts": [ … ], "id": 0, "version": 0, "advertiser_id": 0, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z", "locked_on": "2019-08-24T14:15:22Z", "v3_usage": true, "duration": { … }, "goals": { … }, "budget": { … }, "frequency": { … }, "inventory": { … }, "site_lists": [ … ], "custom_brain_selections": [ … ], "strategies": { … }, "strategy_groups": { … }, "mfa_avoidance": "INHERIT" }, "meta": { "status": "success" } }
- Live Server
https://api.mediamath.com/api/v3.0/campaign_dba
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.mediamath.com/api/v3.0/campaign_dba \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '[
{
"id": 0,
"dynamic_budget_allocation_applied": "2019-08-24T14:15:22Z",
"dynamic_budget_allocation_available": "2019-08-24T14:15:22Z"
}
]'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
Number of elements in the collection to retrieve
Index of the first element in the collection to retrieve
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
.
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.
- Live Server
https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}/permissions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.mediamath.com/api/v3.0/campaigns/{campaign_id}/permissions?page_limit=100&page_offset=0&sort_by=id%2C+-id%2C+name%2C+-name&q=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
- Live Server
https://api.mediamath.com/api/v3.0/audit_log/campaigns
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.mediamath.com/api/v3.0/audit_log/campaigns?page_limit=100&page_offset=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": [
0
]
}'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }