Skip to content

t1k:marketing:monetization:create-ad-unit-from-networks

FieldValue
Modulemonetization
Version1.49.21
Effortmedium
Tools—
/t1k:marketing:monetization:create-ad-unit-from-networks

Entry point for creating monetization inventory (app record, placements, ad units) on an ad network, and for handing back the ID map that wires those units into mediation. This skill owns creation and routes each network to the script or reference that does it.

Not this skill: which formats/floors an app should have (→ mediation-strategy), floor tuning on existing units (→ mintegral playbook 4, max-bid-floor), revenue reporting (→ mintegral-report, applovin-max), UA campaign/offer creation (advertiser side, different API and keys). Facebook Instant Games placements (App Dashboard, not an API create) → t1k:marketing:monetization:fb-instant-ads.

Creation is a live, permanent write, so every decision (format set, name token, the confirmation) stays on a reasoning tier (routing SSOT: rules/orchestration-rules.md § “Task-Type → Agent Routing”). Only the read-only runs are cheap-tier:

StepAgent
Run scripts/mintegral-create-hb-unit.cjs --plan or scripts/dt-create-app-placements.cjs (without --confirm) and report the preview verbatimt1k-metrics-reporter: read-only, running a script and relaying its output
Run max-ad-unit.js slots and tabulate the free slotst1k-metrics-reporter: read-only
Run bun test scripts/tests/*.test.cjs and report pass/failt1k-tester

Stays reasoning-tier: the AskUserQuestion on the name token, the per-write confirmation, and every --confirm run. A wrong placement name is permanent.

NetworkPathRun / read
Mintegral (in-app bidding for MAX)API, bundled scriptscripts/mintegral-create-hb-unit.cjs (--max-wire attaches MINTEGRAL_BIDDING to the MAX units); procedure references/mintegral-bidding-workflow.md; API SSOT references/mintegral-open-api.md; MAX wiring references/max-bidding-wiring.md
DT Exchange (Digital Turbine / Fyber, bidding for MAX)API, bundled scriptscripts/dt-create-app-placements.cjs (app + placements; --max-wire attaches FYBER_BIDDING to the MAX units); API SSOT and MAX wiring references/dt-exchange-management-api.md
Liftoff Monetize (Vungle, bidding for MAX)API, bundled script; app created by the operatorscripts/liftoff-create-placements.cjs --app-id <id> (placements only; --max-package --max-platform attaches VUNGLE_BIDDING to the base MAX unit per format); API SSOT and MAX wiring references/liftoff-monetize-api.md
InMobi (audience bidding for MAX)API, bundled script; app created by the operatorscripts/inmobi-create-placements.cjs --app-id <id> (placements only; --max-package --max-platform attaches INMOBI_BIDDING to the base MAX unit per format; MREC is created as BANNER); API SSOT and MAX wiring references/inmobi-publisher-api.md
Moloco (in-app bidding for MAX)API (undocumented portal endpoints), bundled script; app created by the script when absent`scripts/moloco-create-ad-units.cjs —package —platform android
AppLovin MAX (the mediation ad unit itself)API, sibling skill’s scriptt1k-marketing-monetization-applovin-max/scripts/max-ad-unit.js (slots, then create); transcripts t1k-marketing-monetization-applovin-max/references/create-ad-unit.md; naming t1k-marketing-monetization-max-bid-floor/references/ad-unit-conventions.md
AdMobUI only (Partner bidding CHECKED, named (MAX): references/dashboard-and-max-only-partners.md § AdMob)apps.create / adUnits.create are allowlist-only (403 even with a correct scope). Create in the AdMob UI, read IDs off the confirmation page (Partner-bidding units are not in the adUnits list API): t1k-marketing-monetization-admob § “Creating apps / ad units”
BIGO Ads (server bidding for MAX)API, by hand (no script); app goes through a review gatereferences/bigo-inventory-api.md (BIGO_BIDDING; slots only after app status 2)
BidMachineMAX-only, nothing to createreferences/dashboard-and-max-only-partners.md (BIDMACHINE_BIDDING, shared source id, unit N/A)
Pangle / TikTokdashboard (browser)references/dashboard-and-max-only-partners.md (TIKTOK_BIDDING)
Meta AN, PubMaticblocked until the app is live on a storereferences/dashboard-and-max-only-partners.md
Yandex, Vervedashboard, the user must sign in; Yandex app can be unpublished (shows “Test mode” below the Active apps, tell the user), MAX wiring is unit id onlyreferences/dashboard-and-max-only-partners.md
Unity Adsdashboard (cloud.unity.com), rename the BP_ default placement names per app; Monetize API is 403 code 53 for every service accountreferences/dashboard-and-max-only-partners.md § Unity Ads
MAX _2.._N duplicate unitsAPI refuses; headless UI, then copy networks by APIreferences/max-duplicate-ad-units.md
GAM (shared partner lines)never created; copy from ZooMaker only with user approvalreferences/gam-shared-partner-lines.md
Chartboostthe studio stopped working with it: SKIPnever create or wire CHARTBOOST_BIDDING
ironSource/LevelPlay, othersnot automatedSee “Adding a network” below. Use each network’s dashboard and the matching network skill.

The MAX script is reused, never copied: run it from the applovin-max skill directory.

  1. Two operator rules bind before any write — on every network, not just Liftoff:
    • The InMobi app is created by the user too (see Gotchas); the same rule as Liftoff.
    • The Liftoff app is created by the user, never by a script. POST /applications cannot create an app for a game that is not on a store yet (a store.id Play does not know → 400 query <pkg> app store empty; empty → 422 minimum string length is 1). Ask for the app id from the dashboard (“Add Application” → “My app is not live yet”); never improvise an app record.
    • Wire only the base MAX ad unit per format. Units carrying a _1, _2… rung are left alone — the operator duplicates units later if they want them. --max-units names extras explicitly and is the only override.
  2. Resolve the app first, read-only. Mintegral: --plan. DT: run without --confirm (refuses a 2nd app for the same bundle+platform; reuse with --app-id). Liftoff and InMobi: run without --confirm (--app-id is mandatory; the script only reads the app and its placements). Moloco: run without --confirm (looks the app up by --package + --platform; --app-id optional). MAX: max-ad-unit.js slots --package <pkg> [--platform <p>]. An app may already exist; a second record splits reporting.
  3. Decide formats from surfaces the app really has. Slots are capped and nothing is deletable (Mintegral: no delete endpoint, 10 per format; MAX: disable-only, one unit per package/platform/format via API).
  4. Confirm the name token with the operator via AskUserQuestion. Conventions differ per network: Mintegral uses {App}_{Fmt}_AND|ios; DT uses {App}_Banner|Inter|Reward|MREC; Liftoff, InMobi and Moloco use {App}_Banner|Inter|Rewarded|MREC_{AND|ios} (note Rewarded, not Reward); MAX uses {App}_{Fmt}_AND|IOS with _1.._N rungs (rungs are UI-only). Read existing sibling names; never infer.
  5. Preview. Every script is dry-run without --confirm. Show the preview.
  6. Explicit confirmation per write, naming the network, account, app, formats and names (ad-network-mcp-write-safety). One app per run; no loops over apps without batch approval.
  7. Execute the identical command with --confirm, then verify on a re-read (every script does).
  8. Wire into mediation. Mintegral → --max-wire (read-modify-write of MINTEGRAL_BIDDING, API path in references/max-bidding-wiring.md). DT → --max-wire (read-modify-write of FYBER_BIDDING). Liftoff → --max-package <pkg> --max-platform <p> (read-modify-write of VUNGLE_BIDDING, keyed on the placement referenceID). InMobi → --max-package <pkg> --max-platform <p> (read-modify-write of INMOBI_BIDDING, ad_network_app_id = INMOBI_ACCOUNT_ID, keyed on the numeric placementId). Moloco → --max-wire (read-modify-write of MOLOCO_BIDDING, ad_network_app_key = the app’s sdk_properties.app_key, no ad_network_app_id, line = Moloco ad unit id; MREC skipped unless --max-mrec). All: base unit only unless --max-units. A new MAX unit is live on creation (AppLovin networks enabled); use --disable-after if it must not serve yet.

Liftoff wiring needs a human eyeball on two names. An app created for an unreleased game has an empty store.id, so nothing on the Liftoff side names the package. The preview prints the Liftoff app name next to --max-package; confirm they are the same game before --confirm. The script refuses when store.id is populated and disagrees — it cannot refuse when it is empty, which is exactly when the mistake is easy (Mememix placements wired into TheOneFeature’s MAX units).

Env var names only; values live in ~/.config/t1k/ads.env (set -a; . ~/.config/t1k/ads.env; set +a). Never print, paste or commit a value.

NetworkEnv vars
Mintegral (developer family)MINTEGRAL_DEV_SKEY, MINTEGRAL_DEV_SECRET (API Tools → Create APP&Unit API; not the reporting keys)
DT ExchangeDT_EXCHANGE_CLIENT_ID, DT_EXCHANGE_CLIENT_SECRET, DT_PUBLISHER_ID (the token’s id claim is not the publisher id: 403)
Liftoff MonetizeLIFTOFF_SECRET_TOKEN (dashboard Secret Token). Not LIFTOFF_REPORTING_API_KEY — that key is for report.api.vungle.com and returns 400 {"messages":["Forbidden."],"code":400403} on the publisher API
InMobiINMOBI_USERNAME (account email), INMOBI_ACCOUNT_ID (32-hex; also the MAX ad_network_app_id), INMOBI_API_KEY
MolocoMOLOCO_API_KEY (Publisher Portal -> profile -> API Key, starts pp_; exchanged for a 16 h bearer token, neither is ever printed)
AppLovin MAXAPPLOVIN_MANAGEMENT_KEY or MAX_MANAGEMENT_KEY (the Report Key returns 403)
Mintegral → MAX wiring (fallback only)MINTEGRAL_APP_KEY, only for an account with no MINTEGRAL_BIDDING entry in MAX yet

Missing key → ask the operator to add it to ads.env; do not fall back to another key family.

Same shape every time: resolve-or-create app → per-format placements → one unit per placement → emit the mediation wiring table. To add one:

  1. Confirm the network exposes a documented create API (cite the doc, retrieved date). If it is UI-only or allowlisted, document that in a reference and route to the UI, as AdMob does.
  2. Add scripts/<network>-create-*.cjs with the same contract: read-only plan, dry-run default, --confirm to write, explicit name token, re-read after write. One script per network; the auth schemes and format vocabularies share nothing.
  3. Add scripts/tests/<network>-*.test.cjs (offline fake API; prove preview never writes) and wire it into .github/workflows/floor-skill-ci.yml.
  4. Add references/<network>-*.md and a row to the routing table above.

Do not invent endpoints for ironSource: none is verified here yet. Partner facts verified 2026-10-22 are in the two partner references.

  • Nothing is deletable. Mintegral has no delete endpoint; MAX units are disable-only. Check names before confirming.
  • A Liftoff app for an unreleased game cannot be created by API and carries an empty store.id, so its package is unknowable from the Liftoff side — the operator creates the app and confirms which game it is. See Procedure step 0.
  • Liftoff MAX wiring keys on referenceID (MEMEMIX_BANNER_AND-1419211), not the numeric placement id. The app-level ad_network_app_id is the Liftoff app id, not the package.
  • An InMobi app for an unreleased game cannot be created by API (POST /v2/apps needs storeUrl). The operator makes it in the dashboard (Add Inventory -> Mobile App -> “Click here” -> Manually enter: <Title> (AND), android, Category = Game tag only, rating G) and hands over the appId; the draft app has no storeUrl, so compare the printed app name with --max-package by eye.
  • InMobi has no MREC placement type: MREC is a BANNER placement named _MREC_AND. MAX wiring uses INMOBI_BIDDING with ad_network_app_id = INMOBI_ACCOUNT_ID (not the app id) and the numeric placementId; placements read APP_INACTIVE until the app is live.
  • Moloco endpoints are the portal’s UNDOCUMENTED ones (Moloco documents only the reporting API); they can change without notice. App create is POST /v2/publisher-apps (under /publishers/{pub}/ it is 501), unit create POST /v2/ad-units. A not-live game is fine: a future Play store_url is accepted. MREC is a BANNER unit; do not wire MREC into MAX unless asked. The script stops at the first non-200: re-read state, never blind-retry.
  • Removing a network from a MAX unit is a POST with every ad unit disabled: true (the entry then disappears); ad_network_ad_units: [] returns 400. Documented in references/liftoff-monetize-api.md § “Removing Liftoff from a MAX unit”.
  • MREC and banner share Mintegral ad_type: banner; only the name tells them apart.
  • Mintegral App Key is account-wide: not in the Mintegral API, but readable from any existing MINTEGRAL_BIDDING entry in MAX (never print it); --max-wire reuses it.
  • Mintegral ad_network_ad_unit_id is the UNIT id; the placement id goes in extraParameters.ad_network_optional_placement_id.
  • Mintegral app create needs --not-live when the package is not on a store yet (verified for com.theone.feature).
  • DT category1 takes display names only (Games - Casual); an enum code returns 409. The script checks the android list first.
  • DT has no app-open format, and a FYBER_BIDDING POST deletes any line it omits: never hand-write one.
  • BIGO review gate: a new app is status 1 (auditing); slot/add fails with code 105 until status 2, and app/add needs storeUrl even for a not-listed app. See references/bigo-inventory-api.md.
  • Meta AN and PubMatic need a live store app (they read the store listing); do them after release.
  • ads.env + Kate stale buffer: if the user has ads.env open in Kate while the file is rewritten, a later save restores the stale buffer and reverts fixes. Tell the user to close Kate without saving before editing again; re-check key names after each save.
  • A bidding unit on a MAX waterfall line never fills; add it as a bidder (references/max-bidding-wiring.md).
  • references/mintegral-bidding-workflow.md: Mintegral step-by-step, format table, naming
  • references/mintegral-open-api.md: Mintegral endpoint/parameter SSOT, error codes, console equivalents
  • references/max-bidding-wiring.md: Mintegral → MAX bidder setup and verification
  • references/dt-exchange-management-api.md: DT Exchange endpoints, gotchas, naming, FYBER_BIDDING wiring
  • references/inmobi-publisher-api.md: InMobi publisher endpoints, headers, the app-creation constraint, placement enum, INMOBI_BIDDING wiring
  • references/moloco-publisher-api.md: Moloco portal endpoints (undocumented), token exchange, app/unit create bodies, MOLOCO_BIDDING wiring
  • references/liftoff-monetize-api.md: Liftoff Monetize endpoints, the app-creation constraint, house settings, VUNGLE_BIDDING wiring + removal
  • references/bigo-inventory-api.md: BIGO auth/sign, storeUrl gotcha, review gate, slot bodies, BIGO_BIDDING wiring
  • references/dashboard-and-max-only-partners.md: BidMachine, Pangle, Meta, PubMatic, Yandex, Verve, AdMob UI, Unity Ads dashboard, Chartboost
  • references/max-duplicate-ad-units.md: MAX _2.._N units via headless UI + network copy
  • references/gam-shared-partner-lines.md: GAM shared partner lines, ZooMaker template
  • Mintegral Developer Interface Documentation: https://cdn-adn-https.rayjump.com/cdn-adn/open_api/MintegralAPI.html [retrieved 2026-08-27]