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

Request

Add and view targeting

Security
Auth0
Bodyapplication/json
strategy_idArray of integersrequired
targetingobject(targeting_base)
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": [
      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"
          ]
        }
      ]
    }
  }'

Responses

Add and view response

Bodyapplication/json
dataobject
metaobjectrequired
meta.​statusstringnon-emptyrequired
meta.​countnumberrequired
errorsArray of objects or null
Response
application/json
{ "data": { "location": [] }, "meta": { "status": "string", "count": 0 }, "errors": [ null ] }

Request

Get CPM estimates for contextual segments

Security
Auth0
Bodyapplication/json
currency_codestring= 3 charactersrequired
Example: "USD"
includeArray of objects
excludeobject
curl -i -X POST \
  https://api.mediamath.com/api/v3.0/contextual_segments/cpm_estimate \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "currency_code": "USD",
    "include": [
      {
        "code": "string",
        "operator": "AND",
        "segments": [
          {
            "targeting_segment_id": 0,
            "user_cpm": 0
          }
        ]
      }
    ],
    "exclude": {
      "code": "string",
      "operator": "AND",
      "segments": [
        {
          "targeting_segment_id": 0,
          "user_cpm": 0
        }
      ]
    }
  }'

Responses

CPM estimate response

Bodyapplication/json
dataobject
metaobject
Response
application/json
{ "data": { "cpm": {}, "segments": [] }, "meta": { "status": "success" } }

Get Frequently Used Contextual Segments

Request

Display the most frequently used contextual segments for a given advertiser

Security
Auth0
Query
advertiser_idinteger

Numeric ID of the advertiser to filter on

topinteger

limit of top elements

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>'

Responses

Targeting segment friendly name response

Bodyapplication/json
dataArray of objects or null
metaobject
Response
application/json
{ "data": [ {} ], "meta": { "status": "success" } }

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