Campaigns API (xx.xx.xx)

MediaMath Platform API

Download OpenAPI description
Languages
Servers
Mock server
https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/

Organizations

Organizations

Operations

Agencies

Agencies

Operations

Advertisers

Advertisers

Operations

Campaigns

Campaigns

Operations

Strategies

Strategies

Operations

Targeting

Targeting

Operations

Get a list of attachments

Request

Get a list of attachments

curl -i -X GET \
  https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachments \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

standard list of entities

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

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://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
  }'

Responses

Attachment 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 a list of attachments

Request

Get a list of attachments

curl -i -X GET \
  https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachment \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

standard list of entities

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

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://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
  }'

Responses

Attachment 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 a specific attachment

Request

Get an attachment by ID

Path
attachment_idintegerrequired

Numeric ID of the attachment to get

curl -i -X GET \
  'https://apidocs.mediamath.com/_mock/apis/campaigns-api/openapi/attachments/{attachment_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Attachment 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

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