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. Attachments can be queried and sorted by fields:

  • id,
  • target_id,
  • strategy_id,
  • restriction,
  • operator,
  • created_on,
  • updated_on,
  • version,
  • or_better.
Security
Auth0
Query
page_limitinteger[ 1 .. 1000 ]

Number of elements in the collection to retrieve

Example: page_limit=100
page_offsetinteger[ 0 .. 1000 ]

Index of the first element in the collection to retrieve

Example: page_offset=0
sort_bystring

The field to sort by. You can use any field name in ascending or descending order. For ascending order, use the field name directly, e.g., id. For descending order, prefix the field name with a hyphen (-), e.g., -id.

Example: sort_by=id, -id, name, -name
qstring

Query search for filtering. This parameter can be used to filter results based on various fields.

  • q=name=:{search}* to find all results with names starting with "search".
  • q=status==true to find all active entities.
  • q=id>=1000 to find all entities with id greater than or equal to 1000.
  • q=id==(1,2,3) find specific entities by ID. Supported operators: ==, =:, !=, >, < , >=, <=.
strategy_idinteger

If provided, only attachments for given strategy_id will be returned.

Example: strategy_id=123
dimensionstring

If provided, only attachments for given dimension will be returned. Can be used with one or several dimensions.

Example: dimension=WURF,BRLG
curl -i -X GET \
  'https://api.mediamath.com/api/v3.0/attachments?page_limit=100&page_offset=0&sort_by=id%2C+-id%2C+name%2C+-name&q=string&strategy_id=123&dimension=WURF%2CBRLG' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Attachments list response

Bodyapplication/json
dataArray of objects(attachment_base)
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(int32)>= 1required
Example: 8
strategy_idnumber(int32)>= 0required
Example: 332
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": 8,
    "strategy_id": 332,
    "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" } }

(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(int32)>= 1required
Example: 8
strategy_idnumber(int32)>= 0required
Example: 332
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": 8,
    "strategy_id": 332,
    "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" } }

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

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

Request

Update an attachment by ID

Security
Auth0
Path
attachment_idintegerrequired

Numeric ID of the attachment to update

Bodyapplication/json
target_idnumber(int32)>= 0
Example: 8
versionnumber(int32)required
Example: 1
strategy_idnumber(int32)>= 1
Example: 332
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": 8,
    "version": 1,
    "strategy_id": 332,
    "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" } }

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

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

Request

Update an attachment by ID

Security
Auth0
Path
attachment_idintegerrequired

Numeric ID of the attachment to update

Bodyapplication/json
target_idnumber(int32)>= 0
Example: 8
versionnumber(int32)required
Example: 1
strategy_idnumber(int32)>= 1
Example: 332
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": 8,
    "version": 1,
    "strategy_id": 332,
    "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" } }

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