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

Targeting Attachments

TargetingAttachments

Operations

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

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

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

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

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

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

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

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

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