Ad platform APIs for agents

PubNio connects 9 ad providers behind one API and one MCP server. It reads daily spend on each and creates campaign plans paused; activating a campaign and changing a budget are human-only, so MCP refuses them and links the web app page where a person does them.

Ad providersView as Markdown

Providers

Connect your agent

Sign in with OAuth when the agent asks. Each provider's MCP page shows the calls an agent makes there.

terminal.sh
claude mcp add --transport http pubnio https://pubnio.com/mcp
codex mcp add pubnio --url https://pubnio.com/mcp && codex mcp login pubnio

Spend controls

  • ads.createCampaignPlan creates every level paused.
  • Activating a campaign takes confirmation: "activate_spend" from a workspace owner's signed-in session in the web app; an API key or an MCP session gets 403 human_actor_required. It also resumes the campaign's paused ad groups and ads under the same checks, and ends partial when one stays paused. Resuming an ad group or ad later is its own owner-only operation, ads.resumeAdGroup or ads.resumeAd, with the same checks and the same refusal over MCP; pausing stays open to an agent.
  • MCP never runs a human-only operation, whatever the credential: an agent connected to the hosted MCP server through OAuth is refused like an API key, and the problem's nextAction links to the web app page where the owner does it.
  • ads.resumeAdGroup and ads.resumeAd are human-only: an agent over MCP, by OAuth session or API key, gets human_actor_required and cannot resume spend. The problem's nextAction links to the web console. ads.setAdGroupStatus and ads.setAdStatus take only paused or archived, so an agent can still stop spend.
  • An agent turns the kill switch on with ads.enableKillSwitch. Clearing it is ads.clearKillSwitch, human-only like resuming, and it never resumes spend.
  • Activating a campaign, ad group, or ad, or raising a budget, needs a monthly cap on the account's spend policy, or it fails with ad-spend-forbidden and monthly_cap_required (its nextAction names ads.updateSpendPolicy), and it fails with ad-kill-switch-active while the kill switch is on; lowering a budget needs neither.
  • A budget increase must fit the per-campaign maximum, the daily cap, and the monthly cap, counted as 30.4 days of daily budgets with queued increases at their new amount; a decrease skips those checks.
  • ads.enableKillSwitch marks the account's active, activating, and pending-review campaigns, ad groups, and ads paused in PubNio's records, queues a retryable provider pause for each (one per campaign), and turns away activations, resumes, and budget increases until it is cleared. A level the provider cannot pause is counted in providerPauses.unsupported and must be paused in the provider's ads manager. A sync cannot restore an active status while the switch is on. A member, an MCP session, or an ads_manage key may turn it on; clearing it is the separate ads.clearKillSwitch, which only a signed-in owner may do in the web app, and it never resumes spend.
  • Insights and writes that can start or raise spend need a plan with ads included; pause, archive, spend caps, and the kill switch work on every plan.