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

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

Request

Get a list of site lists

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

To return all fields, set the value to *. For example, full=* will include all properties.

Example: full=*
curl -i -X GET \
  'https://api.mediamath.com/api/v3.0/site_lists?page_limit=100&page_offset=0&sort_by=id%2C+-id%2C+name%2C+-name&q=string&full=*' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List site lists response

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

Request

Get a site list by ID

Security
Auth0
Path
site_list_idintegerrequired

Numeric ID of the site list to get

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

Responses

Site list response

Bodyapplication/json
dataobjectrequired
data.​idintegerrequired
Example: 10
data.​versionintegerrequired
Example: 0
data.​statusbooleanrequired
Example: true
data.​organization_idintegerrequired
Example: 28
data.​namestringrequired
Example: "Test Site List"
data.​restrictionstringrequired
Enum"INCLUDE""EXCLUDE"
Example: "INCLUDE"
data.​filenamestringrequired
Example: "test_site_list.csv"
data.​content_updated_onstring(date-time)required
Example: "2024-05-31T12:35:02Z"
data.​sites_countintegerrequired
Example: 2
data.​sites_count_domainintegerrequired
Example: 1
data.​sites_count_appintegerrequired
Example: 1
data.​sites_count_primary_seller_idintegerrequired
Example: 1
data.​created_onstring(date-time)required
Example: "2025-03-21T14:39:51Z"
data.​updated_onstring(date-time)required
Example: "2025-03-21T14:39:51Z"
metaobjectrequired
meta.​statusstringrequired
Example: "success"
Response
application/json
{ "data": { "id": 10, "version": 0, "status": true, "organization_id": 28, "name": "Test Site List", "restriction": "INCLUDE", "filename": "test_site_list.csv", "content_updated_on": "2024-05-31T12:35:02Z", "sites_count": 2, "sites_count_domain": 1, "sites_count_app": 1, "sites_count_primary_seller_id": 1, "created_on": "2025-03-21T14:39:51Z", "updated_on": "2025-03-21T14:39:51Z" }, "meta": { "status": "success" } }

Request

Upload new site lists

Security
Auth0
Bodymultipart/form-datarequired
filestring(binary)required

The file to be uploaded (e.g., comma_sep.txt).

organization_idstringrequired

The ID of the organization. Its a string because form upload

namestringrequired

The name of the site list being uploaded.

Example: "Test List"
restrictionstring
Enum"INCLUDE""EXCLUDE"
statusstring
Enum"true""false""0""1"
curl -i -X POST \
  https://api.mediamath.com/api/v3.0/site_lists/upload \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string \
  -F organization_id=string \
  -F 'name=Test List' \
  -F restriction=INCLUDE \
  -F status=true

Responses

Upload response

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

Request

Upload updated site lists

Security
Auth0
Path
site_list_idintegerrequired

Numeric ID of the site list to get site list assignments

Bodymultipart/form-data
filestring(binary)

The file to be uploaded (e.g., comma_sep.txt).

organization_idstring

The ID of the organization. Its a string because form upload

namestring

The name of the site list being uploaded.

Example: "Test List"
restrictionstring
Enum"INCLUDE""EXCLUDE"
statusstring
Enum"true""false""0""1"
versioninteger
curl -i -X POST \
  'https://api.mediamath.com/api/v3.0/site_lists/{site_list_id}/upload' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string \
  -F organization_id=string \
  -F 'name=Test List' \
  -F restriction=INCLUDE \
  -F status=true \
  -F version=0

Responses

Upload response

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

Download Information for a Site List

Request

CSV download of site information for a site list

Security
Auth0
Path
site_list_idintegerrequired

Numeric ID of the site list to get site list assignments

Query
target_typestring

Filter the sites download by a target type

curl -i -X GET \
  'https://api.mediamath.com/api/v3.0/site_lists/{site_list_id}/download.csv?target_type=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful CSV download.

Headers
Content-Dispositionstring

Indicates that the response should be handled as a file attachment.

Bodytext/csv
string(binary)
Response
No content

Request

Get a list of assignments for a site list

Security
Auth0
Path
site_list_idintegerrequired

Numeric ID of the site list to get site list assignments

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

To return all fields, set the value to *. For example, full=* will include all properties.

Example: full=*
curl -i -X GET \
  'https://api.mediamath.com/api/v3.0/site_lists/{site_list_id}/assignments?page_limit=100&page_offset=0&sort_by=id%2C+-id%2C+name%2C+-name&q=string&full=*' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List assignments response

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