Line Items

Set up new line items, fetch data, update or archive existing line items.

Note: MoPub Marketplace Tab is not supported.

JSON Representation

Network Line Item Example

{
    "adUnitKeys": "string array",
    "advertiser": "string",
    "allocationPercentage": "int",
    "autoCpm": "double",
    "bid": "double",
    "budget": "string",
    "budgetStrategy": "string",
    "budgetType": "string",
    "dayParts": "string array",
    "dayPartTargeting": "string",
    "deviceTargeting": "boolean",
    "disallowAutoCpm": "boolean",
    "maxAndroidVersion": "int",
    "minAndroidVersion": "double",
    "maxIosVersion": "int",
    "minIosVersion": "double",
    "targetAndroid": "boolean",
    "targetIos": "boolean",
    "targetIphone": "boolean",
    "targetIpad": "boolean",
    "targetIpod": "boolean",
    "idfaTargeting": "string",
    "end": "zulu date - time",
    "frequencyCaps": "string array",
    "frequencyCapsEnabled": "boolean",
    "includeConnectivityTargeting": "string",
    "targetedCarriers": "string array",
    "includeGeoTargeting": "string",
    "key": "string",
    "keywords": "string array",
    "name": "string",
    "networkType": "string",
    "orderKey": "string",
    "orderName": "string",
    "priority": "int",
    "refreshInterval": "int",
    "start": "zulu date - time",
    "status": "paused",
    "targetedCountries": "string array",
    "targetedRegions": "string array",
    "targetedCities": "string array",
    "targetedZipCodes": "string array",
    "type": "string",
    "userAppsTargeting": "string",
    "userAppsTargetingList": "string array",
    "enableOverrides": "boolean",
    "overrideFields": {
        "network_app_id": "string",
        "network_adunit_id": "string",
        "network_account_id": "string"
    }
}

Field Definitions

Targeting Fields

Name Description Required for Post (Create)
adUnitKeys List (comma seprated) of targeted ad units yes
frequencyCapsEnabled ‘yes’ or ‘no’ (read only) no
weeklyImpressionCap Also known as Frequency Cap. Max weekly impressions per user 0 signifies no impression cap. Read only. no
dailyImpressionCap Also known as Frequency Cap. Max daily impressions per user 0 signifies no impression cap. Read only. no
hourlyImpressionCap Also known as Frequency Cap. Max hourly impressions per user 0 signifies no impression cap. Read only. no
includeGeoTargeting Once you select ‘include’ or ‘exclude’, you have to specify the targeting in fields below, otherwise we’ll fallback to ‘all’ no
targetedCountries Two letter country abbreviation, comma seperated list (ex. [‘TW’, ‘GB’, ‘US’, ‘SG’]). no
keywords List of targeted keywords for the line item. no
dayPartTargeting read only no
deviceTargeting read only no
targetAndroid read only no
maxAndroidVersion read only no
minAndroidVersion read only no
maxIosVersion read only no
coppaAcknowledged read only no
maxIosVersion read only no
minIosVersion read only no
targetIos targetIphone read only no
targetIpad targetIpod read only no
userAppsTargeting read only no
userAppsTargetingList read only no
autoCPM Auto calculated CPM value. Only applies to autoCpm enabled network line items Read only. no
disallowAutoCpm Turn off Auto CPM. Boolean (true, false) no
idfaTargeting “all”, “only_idfa”, “no_idfa” no

Metadata Fields

Name Description Required for Post (Create)
bid CPM price yes
advertiser Advertiser set within the Order no
key System generated key for the Order (read only) no
name Line Item name yes
orderKey System generated (read only) yes
orderName Name of the Order to which the line item is created within no
type The type of the line item. Possible values: ‘mpx_line_item’, ‘network’, ‘pmp_line_item’ yes
priority System to prioritize demand source by ranked groups within the waterfall. There are 16 priorities within the MoPub waterfall, with 1 being the highest and 16, the lowest. If the inventory isn’t sold in the first priority sent, it will failover to the following priority until it fills or reaches the end of the waterfall no
status ‘paused’, ‘running’, ‘scheduled’ (read only) no
enabled Enabled means the line item is eligable to run as long as all other targeting conidtions are met (possible values: true, false) yes

Scheduling & Budgeting Fields

Name Description Required for Post (Create)
start Line Item start date/time value (ex. ‘2018-04-03T13:35:48.219Z’) or leave it blank as null no
startImmediately Use either ‘start’ or ‘startImmediately’. Boolean - true or false no
end Line Item end date/time value (ex. ‘2018-04-03T13:35:48.219Z’) or leave it blank as null no
budgetType Possible valeus: ‘unlimited’, ‘limited’, ‘daily’ no
budgetStrategy If ‘evenly’ is selected, then an end date must be defined. Possible values: ‘allatonce’, ‘evenly’ no
budget Impression serving target for the line item. Whole integer value (i.e. 10000) no

MoPub Marketplace Content Setting Fields

Name Description Required for Post (Create)
allowVideo Possible values: non_video, all, video yes
videoSetting Possible values: both, non_skippable, skippable yes, if video is allowed
dspId DSP for Deal, see reference section for possible values. yes, if line item type if Marketplace PMP
notes Note for the Deal. Only applies to PMP line items. no

Nework Line Items Fields

Name Description Required for Post (Create)
networkType Keep ‘Network Type’ table below yes
enableOverrides If disabled network ids will be pulled in from the Network Tab, if enabled setting network ids is required. Boolean, true or false. no, defaults to disabled
overrideFields See ‘Network IDs’ column for ‘Network Type’ table. no

Network Type

Name Network IDs Documentation
admob_native network_adunit_id Google
facebook network_adunit_id Facebook
adcolony network_adunit_id, network_app_id AdColony
ironsource network_adunit_id, network_app_id ironSource
pangle network_adunit_id, network_app_id Pangle
snap network_adunit_id, network_app_id Snap Audience Network
tapjoy network_adunit_id, network_app_id Tapjoy
unity network_adunit_id, network_app_id Unity Ads
verizon network_adunit_id, network_app_id Verizon Media
vungle network_adunit_id, network_app_id Vungle
applovin_sdk network_app_id, network_adunit_id (optional) AppLovin
chartboost app_signature, location (optional) Chartboost
custom-sdk custom_event_class_name, custom_event_class_data Custom Network

Example

Creating or editing a Facebook network line item.

"networkType":"facebook"

In the overrideFields, only network_adunit_id field is required, example value.

"overrideFields":{"network_adunit_id":"abcdefghijklmn1234"}

GET (Read)

Examples:

Returns all line items: https://api.mopub.com/v2/line-items/

Returns a subset of line items based on provided filter: https://api.mopub.com/v2/line-items?[FILTER]

Return a specific line item only: https://api.mopub.com/v2/line-items/[key]

Filters

If no filter is used, then all objects are returned in a list format. If the filter matches multiple objects, then a list format is returned.

Support filters:

  • adUnitKey (use this option to get all line items for a particular ad unit)
  • name (not case-sensitive)
  • orderKey (order key matches specified text)
  • appKey (app key matches specified text)
  • orderName
  • priority (number: 1 to 16)
  • type (gtee, promo, pmp_line_item, marketplace, mpx_line_item, non_gtee, network, backfill_promo)
  • networkType
  • status (archived, inactive, campaign-archived, campaign-paused, network-paused, completed, paused, scheduled, running)

POST (Create)

https://api.mopub.com/v2/line-items/

Example JSON for the body of the POST request.

{
    "data": {
        "adUnitKeys": [
            "a48d91e506f947aceb5d9350c66b9e",
            "f1c229846f994853b84701e8f3e806"
        ],
        "advertiser": "Banner Test",
        "bid": 0.05,
        "budget": null,
        "budgetStrategy": "allatonce",
        "budgetType": "unlimited",
        "end": null,
        "includeGeoTargeting": "all",
        "key": "8d69aade5fd345dcba75fa1ee70dd0",
        "name": "Vungle_Fred",
        "networkType": "vungle",
        "orderKey": "04d16c21049cb1a93cf791cdab06e8",
        "orderName": "Banner Test",
        "priority": 12,
        "status": "paused",
        "targetedCountries": ["US", "CA"],
        "type": "network"
    }
}

A successful POST will return the JSON representation for the newly createdd line item.

PUT (Update)

Usage Details The operation described here, ‘set’, will just take a dictionary in as “data” and update the object with the settings of that dictionary.

  • Uses http PUT method
  • Request body is json format (not form-data)
  • The response is the modified object

Supported Fields

  • name
  • enabled
  • archived
  • adUnitKeys
  • bid
  • disallowAutocpm
  • frequencyCapsEnabled
  • frequencyCaps
  • includeGeoTargeting
  • targetedCountries
  • Budget
  • BudgetType
  • BudgetStrategy
  • enableOverrides
  • overrideFields
  • keywords
  • startImmediately
  • filterLevel
  • allowVideo
  • videoSetting

Example

https://api.mopub.com/v2/line-items/5197a8e32adc47a8beb08e3dd87c22ww

{
    "op": "set",
    "data": {
        "name": "New_Name"
    }
}

Bulk update

The operation described here, ‘set’, will just take a dictionary in as “data” and update the object with the settings of that dictionary.

Limitations:

  • Limit: 100 objects per request
  • Supported fields: bid, priority, enabled

https://api.mopub.com.com/v2/line-items/

{
    "op": "set",
    "data": [
        {
            "key": "agltb3BpbmNyDAsSBFNpdGUYorkhDA",
            "bid": 1
        },
        {
            "key": "xvvvuullYi1pbmN6opYorkhDA",
            "bid": 1
        }
    ]
}

Reference

DSP Lookup

  • d52411K0ec, ADGOJI
  • f67445oEOC, Aark
  • cd5200u3Sm, Aarki2
  • 76bf2abiNC, Aarki3
  • f648371Zqr, AcuityAds
  • 1ae9bcDXqp, AdTheorent
  • d80b7fcad85b387764018975f16ccc05, AdXcel
  • 50cbadbbe2b39a7f37000000, AddictiveMobility
  • 4d81a7DTGh, Adelphic
  • ca6e1a1syN, Adelphic_Retargeting
  • 5df6aebcAl, Adform
  • b24b38R1bu, Adform_US
  • c53a30hopw, Adikteev_SA
  • 5eb264ZqwL, Advanced_FAN_Bidder
  • 837583t9mv, Adxperience
  • 0b266cMoht, AdzMedia
  • e9bbeb3dQk, AppNexus
  • 75f2a0Eh3P, AppNexusEuropeanTraffic
  • a25ed2YRXh, Appier
  • 0b2f7baPyK, Appier_Efficiency
  • 073211LYxr, Beeswax
  • 5748d5OBHD, Beeswax_APAC
  • 197c127ERr, Beeswax_EMEA
  • e6819bY6xJ, Bidease_Inc
  • b50d81qMPn, BidsOpt
  • 1fd828mVlI, BlisMedia
  • 996866zfdq, Bucksense
  • 5061f194d82da14c29000001, Centro_DSP
  • d6da2aGU7Y, ChalkDigital_Ntoggle
  • 233a54JT5M, Cluep
  • 83f326IkG5, Conversant
  • febaf8FDsk, CriteoAMS
  • 71d255ZtED, CriteoAMS_NATIVE
  • 351a2fK1Mq, CriteoSV
  • bfdd0cWzmg, CriteoSV_NATIVE
  • aa76a6bE7a, CriteoTokyo
  • 4b560eHsOc, CriteoTokyo_NATIVE
  • fc0ff8e9v0, Criteo_2_3_test
  • e409c1RUeY, Cross_Install
  • deb27a6Hd7, Cyberagent_tokyo
  • af13a78Tmt, DataXu_International
  • cb75dc8qeh, Dataxu_ntoggle
  • ee209fIXhM, DoubleClick_Bid_Manager
  • 0c9b4ev0Po, Dynalyst
  • 8047fcLmBj, EQ_Works
  • 4fbd776318c5c82cd1000001, EngageBDR2.1
  • 82cb6avXaO, Fiksu
  • 13ed197wtm, Finch
  • 769e546b0dd94013131c566dc23aff3a, FractionalMedia
  • 3deab6xwID, Groupon
  • 23f8c0athu, Hybrid
  • 921cbelyTQ, HyperAdx
  • 1cc809v6NH, InMobi_2.3
  • 9f6c49OZmz, Jampp
  • 3b29d5GBK2, Jampp_PMP
  • 6b49b6xipA, Jay_Spot_Bidder
  • 650dddkUmK, Jay_Spot_Bidder_E2E
  • d4d651C8G5, JiWirentoggle_testing_
  • 154ff3uSOf, Kayzen
  • 0e53251o8n, Kayzen_PMP
  • 4f283d851605d54cf9000000, Lifestreet
  • 50c9274dfcf54d754c000000, Liftoff
  • 91efcapjdr, LinkedIn
  • d332dboNeM, Linkedin_MRECT
  • abde812tfd, LiquidM
  • 7227c7eUuK, LoopMe
  • 90324139Pr, Manage_APAC
  • 420b7b6GK8, Manage_Android
  • 5009c8df2689de1736000000, Manage_Native
  • c1ffab3ZQa, Manage_iOS
  • 46feb2FhEd, MaxPoint
  • d2d8aeR6eN, MediaMath
  • 8ab14171zI, MediaMath_APAC
  • f30f9diQoY, MediaMath_Test
  • 0d29b8xL1M, MediaSmart
  • e2f6acaCep, MobileWalla
  • d63606wJXr, Mobvista
  • 4dff516UAL, Near
  • f04379X0Bx, Permodo
  • 11f204RM84, PlaceIQ
  • 0b369cOBSU, Placecast
  • 50c0ec215e95860146000000, PocketMath
  • f0d1a1u3c2, Qriously
  • 2507e6pLJf, RTBHouse_APAC
  • a4add92Yt6, RTBHouse_Europe
  • c77ac2WOBz, RTBHouse_USA
  • 8455cf5jB1, RTBIQ
  • b7957f0ZX4, RUN
  • 893e72hsek, RevX
  • 18e39fviRm, ScaleMonk
  • a51f9e2UgN, Sift_Media
  • 35b901Z5Gm, Sift_Media_APAC
  • 6111fbu5HB, Simplaex
  • 201fadkait, Simplifi
  • 4945aeFz5l, Smadex
  • bfdd73fu6L, SmartRTB
  • 21f2f9h8VT, Splicky_1
  • eefa9ccPXd, Splicky_2
  • 9e49d0XQ1r, Spotad
  • 3a9c69CfJl, StackAdapt
  • 435c738WYT, StartApp
  • 4dc818yXh6, TabMo
  • 88f8aeNIU9, Teemo
  • 453be7EbvS, The_Trade_Desk
  • aa61d4zob9, The_Trade_Desk_APAC
  • 4fbae22e18c5c82cd1000000, ThinkNear
  • 0c720dd5HJ, Triapodi
  • 2bc6aaGPSH, Triapodi_3PT
  • 3954e5ROag, Triapodi_EU
  • 5d0abcMf0e, TubeMogul
  • 1d097deuta, TubeMogul_320x50
  • dcd426JDGf, TubeMogul_PortraitVideo
  • 5fbc5658e72c4757cfdf15dd0fd2cace, Turn
  • 04537fBbM0, Ubermedia_east
  • 546e60cXoM, Ubimo_2.3
  • 127a38mpR5, VerizonMedia_DSP
  • 673a2e0Lst, Vizury_APAC
  • efb6b2tzwI, Vizury_India_APAC_NEW
  • e44a12m20X, Wapstart
  • 3d2a97OpoJ, Wapstart2
  • 4e69334aa8fd3a790d000000, Wish
  • bebf4azlmt, Yandex
  • 6faf8e0Pvt, appTV
  • ed2f9cAlzr, xAdCollapse

Last updated July 21, 2021

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2021 MoPub (a division of Twitter, Inc.)