MediaMath Platform API
MediaMath Platform API
curl -i -X GET \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachments \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachments \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"target_id": 1,
"strategy_id": 0,
"restriction": "INCLUDE",
"operator": "OR",
"or_better": true
}'
{ "data": { "id": 1, "entity_type": "string", "target_id": 0, "strategy_id": 1, "restriction": "INCLUDE", "operator": "OR", "created_on": "string", "updated_on": "string", "version": 0, "or_better": true }, "meta": { "status": "success" } }
curl -i -X GET \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachment \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachment \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"target_id": 1,
"strategy_id": 0,
"restriction": "INCLUDE",
"operator": "OR",
"or_better": true
}'
{ "data": { "id": 1, "entity_type": "string", "target_id": 0, "strategy_id": 1, "restriction": "INCLUDE", "operator": "OR", "created_on": "string", "updated_on": "string", "version": 0, "or_better": true }, "meta": { "status": "success" } }
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachments/{attachment_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": { "id": 1, "entity_type": "string", "target_id": 0, "strategy_id": 1, "restriction": "INCLUDE", "operator": "OR", "created_on": "string", "updated_on": "string", "version": 0, "or_better": true }, "meta": { "status": "success" } }
curl -i -X POST \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachments/{attachment_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"target_id": 0,
"version": 0,
"strategy_id": 1,
"restriction": "INCLUDE",
"operator": "OR",
"or_better": true
}'
{ "data": { "id": 1, "entity_type": "string", "target_id": 0, "strategy_id": 1, "restriction": "INCLUDE", "operator": "OR", "created_on": "string", "updated_on": "string", "version": 0, "or_better": true }, "meta": { "status": "success" } }
curl -i -X DELETE \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachments/{attachment_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachment/{attachment_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": { "id": 1, "entity_type": "string", "target_id": 0, "strategy_id": 1, "restriction": "INCLUDE", "operator": "OR", "created_on": "string", "updated_on": "string", "version": 0, "or_better": true }, "meta": { "status": "success" } }
curl -i -X PUT \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachment/{attachment_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"target_id": 0,
"version": 0,
"strategy_id": 1,
"restriction": "INCLUDE",
"operator": "OR",
"or_better": true
}'
{ "data": { "id": 1, "entity_type": "string", "target_id": 0, "strategy_id": 1, "restriction": "INCLUDE", "operator": "OR", "created_on": "string", "updated_on": "string", "version": 0, "or_better": true }, "meta": { "status": "success" } }
curl -i -X DELETE \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachment/{attachment_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
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
.
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/target?page_limit=100&page_offset=0&q=string&sort_by=id%2C%20-id%2C%20name%2C%20-name&sort_order=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/target \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"parent_id": 0,
"name": "string",
"factual_id": "string",
"mediamath_organization_id": 0,
"target_inet": "string",
"visible": true,
"visible_overridden": true,
"bidder_frequency": 0,
"dimension_code": "string"
}'
{ "data": { "parent_id": 0, "name": "string", "factual_id": "string", "mediamath_organization_id": 0, "target_inet": "string", "visible": true, "visible_overridden": true, "bidder_frequency": 0, "dimension_code": "string" }, "meta": { "status": "success" } }
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/target/{target_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": { "parent_id": 0, "name": "string", "factual_id": "string", "mediamath_organization_id": 0, "target_inet": "string", "visible": true, "visible_overridden": true, "bidder_frequency": 0, "dimension_code": "string" }, "meta": { "status": "success" } }
curl -i -X POST \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/target/{target_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"parent_id": 0,
"name": "string",
"factual_id": "string",
"mediamath_organization_id": 0,
"target_inet": "string",
"visible": true,
"visible_overridden": true,
"bidder_frequency": 0,
"dimension_code": "string",
"version": 0
}'
{ "data": { "parent_id": 0, "name": "string", "factual_id": "string", "mediamath_organization_id": 0, "target_inet": "string", "visible": true, "visible_overridden": true, "bidder_frequency": 0, "dimension_code": "string" }, "meta": { "status": "success" } }
curl -i -X DELETE \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/target/{target_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
curl -i -X PUT \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/target/{target_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"parent_id": 0,
"name": "string",
"factual_id": "string",
"mediamath_organization_id": 0,
"target_inet": "string",
"visible": true,
"visible_overridden": true,
"bidder_frequency": 0,
"dimension_code": "string",
"version": 0
}'
{ "data": { "parent_id": 0, "name": "string", "factual_id": "string", "mediamath_organization_id": 0, "target_inet": "string", "visible": true, "visible_overridden": true, "bidder_frequency": 0, "dimension_code": "string" }, "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
.
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/targets?page_limit=100&page_offset=0&q=string&sort_by=id%2C%20-id%2C%20name%2C%20-name&sort_order=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/targets \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"parent_id": 0,
"name": "string",
"factual_id": "string",
"mediamath_organization_id": 0,
"target_inet": "string",
"visible": true,
"visible_overridden": true,
"bidder_frequency": 0,
"dimension_code": "string"
}'
{ "data": { "parent_id": 0, "name": "string", "factual_id": "string", "mediamath_organization_id": 0, "target_inet": "string", "visible": true, "visible_overridden": true, "bidder_frequency": 0, "dimension_code": "string" }, "meta": { "status": "success" } }
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/targets/{target_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": { "parent_id": 0, "name": "string", "factual_id": "string", "mediamath_organization_id": 0, "target_inet": "string", "visible": true, "visible_overridden": true, "bidder_frequency": 0, "dimension_code": "string" }, "meta": { "status": "success" } }
curl -i -X POST \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/targets/{target_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"parent_id": 0,
"name": "string",
"factual_id": "string",
"mediamath_organization_id": 0,
"target_inet": "string",
"visible": true,
"visible_overridden": true,
"bidder_frequency": 0,
"dimension_code": "string",
"version": 0
}'
{ "data": { "parent_id": 0, "name": "string", "factual_id": "string", "mediamath_organization_id": 0, "target_inet": "string", "visible": true, "visible_overridden": true, "bidder_frequency": 0, "dimension_code": "string" }, "meta": { "status": "success" } }
curl -i -X DELETE \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/targets/{target_id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
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
.
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/target-path?page_limit=100&page_offset=0&q=string&sort_by=id%2C%20-id%2C%20name%2C%20-name&sort_order=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/audience_segments/estimate \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"currency_code": "USD",
"include": [
{
"operator": "string",
"segments": [
{
"audience_segment_id": 0,
"user_cpm": 0
}
]
}
],
"exclude": {
"operator": "string",
"segments": [
{
"audience_segment_id": 0,
"user_cpm": 0
}
]
}
}'
{ "data": { "cpm": { … }, "size": 0 }, "meta": { "status": "success" } }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/targeting \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"strategy_id": [
0
],
"targeting": {
"audience": {
"include": [
{
"operator": "AND",
"audience_segment_ids": [
0
]
}
],
"exclude": [
{
"operator": "AND",
"audience_segment_ids": [
0
]
}
]
},
"contextual": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"my_data": {
"include": {
"pixel_bundle_ids": [
0
],
"operator": "AND"
},
"exclude": {
"pixel_bundle_ids": [
0
]
}
},
"location": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"technology": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
0
]
}
]
},
"day_parts": [
{
"user_time": true,
"start_hour": 1,
"end_hour": 5,
"days": [
"M",
"T",
"W",
"S",
"U"
]
}
]
}
}'
{ "data": { "location": [ … ] }, "meta": { "status": "string", "count": 0 }, "errors": [ null ] }
curl -i -X POST \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/contextual_segments/cpm_estimate \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"currency_code": "USD",
"include": [
{
"code": "string",
"operator": "string",
"segments": [
{
"targeting_segment_id": 0,
"user_cpm": 0
}
]
}
],
"exclude": {
"code": "string",
"operator": "string",
"segments": [
{
"targeting_segment_id": 0,
"user_cpm": 0
}
]
}
}'
{ "data": { "cpm": { … } }, "meta": { "status": "success" } }
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/targeting_segments/frequently_used?advertiser_id=0&top=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success" } }
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/audience_segments/frequently_used?advertiser_id=0&campaign_id=0&top=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success" } }
curl -i -X GET \
'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/technology_target_values?dimension_code=string&full_path=string&name=string&q=string&sort_by=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X GET \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/path_targeting_segments \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }
curl -i -X GET \
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/path_audience_segments \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "data": [ { … } ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }