MediaMath Platform API
- Contextual Segments CPM estimates
(Legacy) List Targets
(Legacy) Create a Target
(Legacy) Get a Target
(Legacy) Update a Target
(Legacy) Delete a Target
(Legacy) Update a Target
List targets
Create a Target
Get a Target
Update a Target
Delete a Target
List Target paths
Add and View Targeting
Get Frequently Used Contextual Segments
Frequently Used Audience Segments
Audience Segments CPM Estimate
List Technology Target Values
List Contextual Segments
List Path Audience Segments
Contextual Segments CPM e...
Campaigns API (xx.xx.xx)
Download OpenAPI description
Overview
Languages
Servers
Live Server
https://api.mediamath.com/api/v3.0/
- Live Server
https://api.mediamath.com/api/v3.0/targeting
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.mediamath.com/api/v3.0/targeting \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"strategy_id": [
87
],
"targeting": {
"audience": {
"include": [
{
"operator": "AND",
"audience_segment_ids": [
32
]
}
],
"exclude": [
{
"operator": "AND",
"audience_segment_ids": [
32
]
}
]
},
"contextual": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
33
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
3
]
}
]
},
"my_data": {
"include": {
"pixel_bundle_ids": [
88
],
"operator": "AND"
},
"exclude": {
"pixel_bundle_ids": [
32
]
}
},
"location": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
33
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
3
]
}
]
},
"technology": {
"include": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
33
]
}
],
"exclude": [
{
"code": "string",
"operator": "AND",
"target_value_ids": [
3
]
}
]
},
"day_parts": [
{
"user_time": true,
"start_hour": 1,
"end_hour": 5,
"days": [
"M",
"T",
"W",
"S",
"U"
]
}
]
}
}'
Response
application/json
{ "data": { "location": [ … ] }, "meta": { "status": "string", "count": 0 }, "errors": [ null ] }
- Live Server
https://api.mediamath.com/api/v3.0/contextual_segments/cpm_estimate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://api.mediamath.com/api/v3.0/contextual_segments/cpm_estimate?extended=true' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"currency_code": "USD",
"include": [
{
"code": "string",
"operator": "AND",
"segments": [
{
"targeting_segment_id": 67,
"user_cpm": 0
}
]
}
],
"exclude": {
"code": "string",
"operator": "AND",
"segments": [
{
"targeting_segment_id": 76,
"user_cpm": 0
}
]
}
}'
Response
application/json
{ "data": { "cpm": { … }, "segments": [ … ] }, "meta": { "status": "success" } }
- Live Server
https://api.mediamath.com/api/v3.0/targeting_segments/frequently_used
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.mediamath.com/api/v3.0/targeting_segments/frequently_used?advertiser_id=0&top=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response
application/json
{ "data": [ { … } ], "meta": { "status": "success" } }