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/

Organizations

Organizations

Operations

Agencies

Agencies

Operations

Advertisers

Advertisers

Operations

Campaigns

Campaigns

Operations

Campaigns Budget Flights

Campaigns Budget Flights

Operations

Campaign Plans

Campaign Plans

Operations

Strategies

Strategies

Operations

Strategy Parameters

Strategy Parameters

Operations

Strategy Templates

Strategy Templates

Operations

New Strategy Plans

New Strategy Plans

Operations

Targeting

Targeting

Operations

Targeting Attachments

TargetingAttachments

Operations

Get a List of Attachments

Request

Get a list of attachments

Security
Auth0
curl -i -X GET \
  https://api.mediamath.com/api/v3.0/attachments \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Collection response

Bodyapplication/json
dataArray of objects or null
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 Attachment

Request

Create an attachment

Security
Auth0
Bodyapplication/json
target_idnumber>= 1required
strategy_idnumber>= 0required
restrictionstringnon-emptyrequired
Enum"INCLUDE""EXCLUDE"
operatorstringnon-emptyrequired
Enum"OR""AND"
or_betterboolean
curl -i -X POST \
  https://api.mediamath.com/api/v3.0/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
  }'

Responses

Atachment response

Bodyapplication/json
dataobject(attachment_base)
metaobject(single_metadata)
Response
application/json
{ "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" } }

(Legacy) Get a List of Attachments

Request

Get a list of attachments

Security
Auth0
curl -i -X GET \
  https://api.mediamath.com/api/v3.0/attachment \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Collection response

Bodyapplication/json
dataArray of objects or null
metaobject(pagination metadata)
Response
application/json
{ "data": [ {} ], "meta": { "status": "success", "count": 10, "total_count": 100, "offset": 0, "next_page": "string", "prev_page": "string" } }

(Legacy) Create an Attachment

Request

Create an attachment

Security
Auth0
Bodyapplication/json
target_idnumber>= 1required
strategy_idnumber>= 0required
restrictionstringnon-emptyrequired
Enum"INCLUDE""EXCLUDE"
operatorstringnon-emptyrequired
Enum"OR""AND"
or_betterboolean
curl -i -X POST \
  https://api.mediamath.com/api/v3.0/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
  }'

Responses

Atachment response

Bodyapplication/json
dataobject(attachment_base)
metaobject(single_metadata)
Response
application/json
{ "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" } }

Get an Attachment

Request

Get an attachment by ID

Security
Auth0
Path
attachment_idintegerrequired

Numeric ID of the attachment to get

curl -i -X GET \
  'https://api.mediamath.com/api/v3.0/attachments/{attachment_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Atachment response

Bodyapplication/json
dataobject(attachment_base)
metaobject(single_metadata)
Response
application/json
{ "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" } }

Update an Attachment

Request

Update an attachment by ID

Security
Auth0
Path
attachment_idintegerrequired

Numeric ID of the attachment to update

Bodyapplication/json
target_idnumber>= 0
versionnumberrequired
strategy_idnumber>= 1
restrictionstringnon-empty
Enum"INCLUDE""EXCLUDE"
operatorstringnon-empty
Enum"OR""AND"
or_betterboolean
curl -i -X POST \
  'https://api.mediamath.com/api/v3.0/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
  }'

Responses

Atachment response

Bodyapplication/json
dataobject(attachment_base)
metaobject(single_metadata)
Response
application/json
{ "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" } }

Delete an Attachment

Request

Delete an attachment by ID

Security
Auth0
Path
attachment_idintegerrequired

Numeric ID of the attachment to delete

curl -i -X DELETE \
  'https://api.mediamath.com/api/v3.0/attachments/{attachment_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Attachment deleted response

Bodyapplication/json
metaobject(single_metadata)
Response
application/json
{ "meta": { "status": "success" } }

(Legacy) Get an Attachment

Request

Get an attachment by ID

Security
Auth0
Path
attachment_idintegerrequired

Numeric ID of the attachment to get

curl -i -X GET \
  'https://api.mediamath.com/api/v3.0/attachment/{attachment_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Atachment response

Bodyapplication/json
dataobject(attachment_base)
metaobject(single_metadata)
Response
application/json
{ "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" } }

(Legacy) Update an Attachment

Request

Update an attachment by ID

Security
Auth0
Path
attachment_idintegerrequired

Numeric ID of the attachment to update

Bodyapplication/json
target_idnumber>= 0
versionnumberrequired
strategy_idnumber>= 1
restrictionstringnon-empty
Enum"INCLUDE""EXCLUDE"
operatorstringnon-empty
Enum"OR""AND"
or_betterboolean
curl -i -X PUT \
  'https://api.mediamath.com/api/v3.0/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
  }'

Responses

Atachment response

Bodyapplication/json
dataobject(attachment_base)
metaobject(single_metadata)
Response
application/json
{ "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" } }

(Legacy) Delete an Attachment

Request

Delete an attachment by ID

Security
Auth0
Path
attachment_idintegerrequired

Numeric ID of the attachment to delete

curl -i -X DELETE \
  'https://api.mediamath.com/api/v3.0/attachment/{attachment_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Attachment deleted response

Bodyapplication/json
metaobject(single_metadata)
Response
application/json
{ "meta": { "status": "success" } }

Targeting Segments

Targeting Segments

Operations

Targeting Segment Objectives

Targeting Segment Objectives

Operations

Vendor Contracts

Vendor Contracts

Operations

Contracts

Contracts

Operations

Audience Vendors

Audience Vendors

Operations

Vendors

Vendors

Operations

Atomic Creatives

Atomic Creatives

Operations

Concepts

Concepts

Operations

Creatives

Creatives

Operations

Pixel Bundles

Pixel Bundles

Operations

Pixel Providers

Pixel Providers

Operations

Marketplaces

Marketplaces

Operations

Users

Users

Operations

User Permissions

User Permissions

Operations

Enterprise Controls

Enterprise Controls

Operations

General

General

Operations

Currency Rates

Currency Rates

Operations

Site Lists

Site Lists

Operations

Timezones

Timezones

Operations

Verticals

Verticals

Operations

Supply Sources

Supply Sources

Operations

Ad Servers

Ad Servers

Operations

Segment Groups

Segment Groups

Operations