Skip to content

Upload Updated Site Lists

Request

Upload updated site lists

Security
Auth0(Required scopes: offline_accessmanage:services)
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, <= 64 characters

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=@file.bin \
  -F organization_id=string \
  -F 'name=Test List' \
  -F restriction=INCLUDE \
  -F status=true \
  -F version=0

Responses

Site list response

Bodyapplication/json
dataobject(site_list_full)
metaobject(single_metadata)
Response
{ "data": { "id": 126, "version": 2, "status": true, "organization_id": 16, "name": "string", "restriction": "INCLUDE", "filename": "test_site_list.csv", "content_updated_on": "2019-08-24T14:15:22Z", "sites_count": 100, "sites_count_domain": 1, "sites_count_app": 2, "sites_count_primary_seller_id": 3, "created_on": "2019-08-24T14:15:22Z", "updated_on": "2019-08-24T14:15:22Z" }, "meta": { "status": "success" } }