Mediago API
en
  • en
  • zh
  1. Campaign Management
Mediago API
en
  • en
  • zh
  • Authentication
    • Get Access Token
      POST
  • Account Management
    • Get Authorized Account List
      GET
  • Campaign Management
    • Get Authorized Campaign List
      GET
    • Get Campaigns Detail
      GET
    • Create Campaign
      POST
    • Update Campaign
      POST
    • Batch Update Campaigns
      POST
    • Batch Active/Pause Campaigns
      POST
    • Batch Archive Campaigns
      POST
  • Ad Management
    • Get Authorized Ad List
      GET
    • Batch Active/Pause Ads
      POST
  • Sites Block Management
    • Get Account Block List
      GET
    • Block/Unblock Sites at Account
      POST
    • Get Campaign Block List
      GET
    • Block/Unblock Sites at Campaign
      POST
  • Report APIs
    • Get Daily Summary Data of All Campaign
      GET
    • Get Daily Report in Campaign Dimension
      GET
    • Get Daily Report in Ad Dimension
      GET
    • Get Hourly Realtime Data in Campaign or Ad Dimension
      GET
    • Get Account Daily Report in Site Dimension
      GET
    • Get Daily Report in Site Dimension
      GET
  1. Campaign Management

Create Campaign

POST
https://api.mediago.io/manage/v1/campaign/create
Last modified:2025-12-24 11:06:28
Submit a JSON object representing the new campaign in the request body. (See examples below.) Limit 50 new campaign a day.
Each account can create a maximum of 200 assets per day , and each campaign can have up to 100 assets , and each account can create a maximum of 50 campaigns per day .
QPS limit: 60, IP limit: 15.
Request Parameters:
Field NameTypeDescriptionRequired
account_idstringaccount that newly create campaign belongs toNo
campaign_namestringname of the newly create campaignYes
charge_typestringBidding Strategy, historical values by default. The allowed value contains: cpc, smart_bid, max_cvNo
statusintthe active/pause status of the newly create campaign, while 0 represents pause, 1 represents activeYes
day_parting[][]intan 7*24 array indicating the certain times of day or certain days of the week that you open your campaign, where index 0-6 in first dimension means Monday to Sunday, index 0-23 in second dimension means hours in a day, value 1 means selected, 0 means unselected
e.g.
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]
means campaign will run from 3am to 2pm every Friday
Yes
dp_timezonestringBy default your account time zone is selected. We'll schedule your campaign to run based on the selected time zone.

The allowed value contains:
EST
UTC-12
UTC-11
UTC-10
UTC-9
UTC-8
UTC-7
UTC-6
UTC-5
UTC-4
UTC-3
UTC-2
UTC-1
UTC
UTC+1
UTC+2
UTC+3
UTC+4
UTC+5
UTC+6
UTC+7
UTC+8
UTC+9
UTC+10
UTC+11
UTC+12
UTC+13
UTC+14
No
start_timestringthe exactly start time for the campaign, format yyyy-mm-dd hh:mm:ss, it can not before very day manage-api calledYes
end_timestringthe exactly end time for the campaign, format yyyy-mm-dd hh:mm:ss, it can neither before start_time nor after year 2030Yes
daily_capdoublecpc cost as most everyday, minimum daily_cap cap is $20/day, daily_cap/cpc can not be less than 30Yes
spend_limitdoublecpc cost as most for the campaignYes
spend_modeintthe speed to consume daily budget: 1 represents consume budget uniformly; 0 means spend consume budget as soon as possibleYes
cpcdoublebudget for a click(unit: USD), cpc can not be higher than $5, daily_cap/cpc can not be less than 30When charge_type is set to cpc or smart_bid, cpc is required. When charge_type is set to maxcv, cpc is not required.
audienceobjectthe audience you want to target: type="ALL", value=[] means no limitation; type="INCLUDE" means target audience in the value set; type="EXCLUDE" means target audience not in the value set. The allowed value contains: News, Weather, Election, Entertainment, Sports, Finance, Health, Foodanddrink, Travel, Autos, Video, Money, TV, Movies, Music, HomepageYes
languagestringlanguage = "en " means the language your campaign target , the allowed language value contains: en , es , de , fr , it , pt , nl ,pl, sv, cs, nb, da, hu, ga Default language = " en "
Thefollowing are thesupportedlanguages foreachcountry.
US:en;es
CA:en,fr
AU:en
GB:en
DE:de
FR:fr
IT:it, de, fr
ES:es
AT:de
BR:pt
MX:es
BE:fr,nl,de
PT:pt
CH:de,fr,it
NL:nl
PL:pl
SE:sv
CZ:cs
NO:nb
DK:da
HU:hu
IE:en,ga
NZ: en
No
locationarrayObject Array;
Note: You can choose targeted country in this section.
In USA you can choose certain ZipCodes or States.

Region means region targeting
The allowed region value contains: US , CA ,AU , GB , DE , FR , IT , ES,AT, BR, MX, BE, PT, CH,NL,PL,SE,CZ,NO,DK,HU
Please note: GB represents United Kingdom of Great Britain and Northern Ireland
Default region = "US"
DE, FR, IT, ES, AT, BR, MX, BE, PT, CH only support type="ALL"

type="ALL", value=[] means no limitation;
type="INCLUDE" means target state/zipcode in the value set
type="EXCLUDE" means target state/zipcode not in the value set
option="state" means using state targeting, option="zipcode" means using zipcode targeting.

For more details, please find the request Sample above.

USA supports states :
AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY

Canada supports states contains:
AB, BC, MB, NB, NL, NS, ON, PE, QC, SK, NT, NU, YT

Australia supports states contains:
NSW, QLD, SA, TAS, VIC, WA, ACT, NT
New South Wales = NSW
Queensland = QLD
South Australia = SA
Tasmania = TAS
Victoria = VIC
Western Australia = WA
Australian Capital Territory = ACT
Northern Territory = NT

United Kingdom supports states contains:
ENG, NIR, SCT, WLS
England = ENG
Northern Ireland = NIR
Scotland = SCT
Wales = WLS
Yes
platform_targetingobjectthe platform you want to target: type="ALL", value=[] means no limitation; type="INCLUDE" means target platform in the value set; type="EXCLUDE" means target platform not in the value set. The allowed value contains: Desktop, Mobile, Tablet, XboxYes
os_targetingobjectthe os you want to target: type="ALL", value=[] means no limitation; type="INCLUDE" means target os in the value set; type="EXCLUDE" means target os not in the value set. The allowed value contains: Mac OS, Windows, Android, IOSYes
browser_targetingobjectthe browser you want to target: type="ALL", value=[] means no limitation; type="INCLUDE" means target browser in the value set; type="EXCLUDE" means target browser not in the value set. The allowed value contains: Chrome, Safari, Internet Explorer, Edge, FirefoxYes
product_typestringproduct type of your campaign. Note: Please choose ONE product type. The allowed value contains: E-commerce, Lead Gen, Health & Fitness, Finance & Insurance, Real Estate, Auto, Careers, Technology & Computing, Education, Arts & Entertainment, Style & Fashion, Family & Parenting, Food, Hobbies & Interests, Home & Garden, Law Gov't & Politics, News, Pets, Religion & Spirituality, Science, Sports, Travel, Society, OthersYes
objectivestringobjective of your campaign. Note: Please choose ONE Objective. The allowed value contains: "lead" means Lead Generation, "conversions" means Online Purchases, "awareness" means Website EngagementYes
target_cpadoubletarget CPA ofyour campaign . (unit: USD) daily_cap< tcpa*30(when the charge type =maxcv)When Marketing Objective selects Lead Generation or Online Purchases , target CPA is required ; when Website Engagement is selected , target CPA is not required.
optimization_typestringconversion goal of your campaign. Note: Please fill in ONE conversion goal. The conversion goal is the type of pixel important conversion embedded in the account. If the pixel important conversion has not installed, please choose '-1' as the value. The allowed value contains: "1" means View Content, "2" means App Install, "3" means Complete Registration, "4" means Add to Cart, "5" means Add Payment Info, "6" means Search, "7" means Start Checkout, "8" means Purchase, "9" means Add to Wishlist, "10" means Lead, "-1" means Default OptimizationWhen Marketing Objective selects Lead Generation or Online Purchases, optimization_type is required;when Website Engagement is selected, optimization_type is not required.
The optimization_type is the type of pixel important conversion embedded in the account. If the pixel important conversion has not been installed, you can choose Default Optimization, which will optimize for important conversions that are passed back by default.
landing_pagestringlanding pageYes
utm_trackingstringtracking code for campaign level tracking.
Refer help doc to see details.
Yes
brand_namestringname of brand, 30 character at mostYes
adobject arraycontains at most 10 object of creativeYes
asset_namestringname of the creativeYes
imgstringlink of the creative, The image size must be greater than 600×400.Yes
headlinestringheadline of your creative, 80 character at most. You can set dynamic macro in your title: ${LOCATION_STATE} ${TIME_MON} ${LOCATION_CITY}Yes

Request

Header Params

Body Params application/json

Example
{
  "account_id": "1",
  "campaign_name": "demo-campaign",
  "status": 0,
  "day_parting": [
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
  ],
  "dp_timezone": "UTC-7",
  "start_time": "2021-04-27 12:30:18",
  "end_time": "2030-04-30 06:30:19",
  "daily_cap": 50,
  "spend_limit": 200,
  "spend_mode": 0,
  "cpc": 1,
  "product_type": "Auto",
  "objective": "lead",
  "target_cpa": 1.2,
  "optimization_type": "1",
  "audience": {
    "type": "INCLUDE",
    "value": [
      "News",
      "Weather"
    ]
  },
  "language": "en",
  "location": [
    {
      "type": "EXCLUDE",
      "option": "state",
      "value": [
        "NY"
      ],
      "region": "US"
    },
    {
      "type": "INCLUDE",
      "option": "state",
      "value": [
        "AB"
      ],
      "region": "CA"
    },
    {
      "type": "INCLUDE",
      "option": "state",
      "value": [
        "NSW"
      ],
      "region": "AU"
    },
    {
      "type": "INCLUDE",
      "option": "state",
      "value": [
        "NIR"
      ],
      "region": "GB"
    }
  ],
  "platform_targeting": {
    "type": "ALL",
    "value": []
  },
  "os_targeting": {
    "type": "ALL",
    "value": []
  },
  "browser_targeting": {
    "type": "ALL",
    "value": []
  },
  "landing_page": "https://www.demo.com",
  "utm_tracking": "utm_source=mediago&utm_medium=referral&utm_campaign=${CAMPAIGN_NAME}&utm_content=${AD_TITLE}&utm_term=${CONTENT_NAME}",
  "brand_name": "demo-brand",
  "ad": [
    {
      "asset_name": "demo-asset-1",
      "img": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1587908803684&di=708b357ac67c164adfa14ad3fe269ced&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D3571592872%2C3353494284%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1200%26h%3D1290",
      "headline": "demo-headline-1"
    },
    {
      "asset_name": "demo-asset-2",
      "img": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1587908803684&di=bd6c2a974d397b3c4e6ff3e0d7fcdad0&imgtype=0&src=http%3A%2F%2Ft7.baidu.com%2Fit%2Fu%3D3616242789%2C1098670747%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D900%26h%3D1350",
      "headline": "demo-headline-2"
    }
  ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.mediago.io/manage/v1/campaign/create' \
--header 'Authorization: Bearer your_access_token_here' \
--header 'Content-Type: application/json' \
--data-raw '{
  "account_id": "1",
  "campaign_name": "demo-campaign",
  "status": 0,
  "day_parting": [
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 
      [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
  ],
  "dp_timezone": "UTC-7",
  "start_time": "2021-04-27 12:30:18",
  "end_time": "2030-04-30 06:30:19",
  "daily_cap": 50,
  "spend_limit": 200,
  "spend_mode": 0,
  "cpc": 1,
  "product_type": "Auto",
  "objective": "lead",
  "target_cpa": 1.2,
  "optimization_type": "1",
  "audience": {
    "type": "INCLUDE",
    "value": [
      "News",
      "Weather"
    ]
  },
  "language": "en",
  "location": [
    {
      "type": "EXCLUDE",
      "option": "state",
      "value": [
        "NY"
      ],
      "region": "US"
    },
    {
      "type": "INCLUDE",
      "option": "state",
      "value": [
        "AB"
      ],
      "region": "CA"
    },
    {
      "type": "INCLUDE",
      "option": "state",
      "value": [
        "NSW"
      ],
      "region": "AU"
    },
    {
      "type": "INCLUDE",
      "option": "state",
      "value": [
        "NIR"
      ],
      "region": "GB"
    }
  ],
  "platform_targeting": {
    "type": "ALL",
    "value": []
  },
  "os_targeting": {
    "type": "ALL",
    "value": []
  },
  "browser_targeting": {
    "type": "ALL",
    "value": []
  },
  "landing_page": "https://www.demo.com",
  "utm_tracking": "utm_source=mediago&utm_medium=referral&utm_campaign=${CAMPAIGN_NAME}&utm_content=${AD_TITLE}&utm_term=${CONTENT_NAME}",
  "brand_name": "demo-brand",
  "ad": [
    {
      "asset_name": "demo-asset-1",
      "img": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1587908803684&di=708b357ac67c164adfa14ad3fe269ced&imgtype=0&src=http%3A%2F%2Ft8.baidu.com%2Fit%2Fu%3D3571592872%2C3353494284%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D1200%26h%3D1290",
      "headline": "demo-headline-1"
    },
    {
      "asset_name": "demo-asset-2",
      "img": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1587908803684&di=bd6c2a974d397b3c4e6ff3e0d7fcdad0&imgtype=0&src=http%3A%2F%2Ft7.baidu.com%2Fit%2Fu%3D3616242789%2C1098670747%26fm%3D79%26app%3D86%26f%3DJPEG%3Fw%3D900%26h%3D1350",
      "headline": "demo-headline-2"
    }
  ]
}'

Responses

🟢200Success Response
application/json
Body

Example
{
    "campaign_id": "1234556",
    "msg": "success"
}
🟠400Bad Request - Invalid Parameters
🟠401Unauthorized - Invalid Access Token
🟠403Forbidden - Token Expired
Modified at 2025-12-24 11:06:28
Previous
Get Campaigns Detail
Next
Update Campaign
Built with