Developers

Adwave MCP server

Adwave is always-on advertising on a prepaid wallet. This MCP server is how Claude, ChatGPT, Cursor, Codex, VS Code, Gemini and custom agents launch campaigns, fund the wallet, and read performance. Connect the URL and sign in with OAuth; new accounts sign up in the same window. Tools match REST API v1.

What connectors should know

Server name waverunner (title Adwave). Transport: Streamable HTTP, POST https://waverunner.adwave.com/api/mcp. Clients must send Accept: application/json, text/event-stream. A call without credentials gets 401 with WWW-Authenticate naming /.well-known/oauth-protected-resource/api/mcp, which points at /.well-known/oauth-authorization-server.

  • OAuth sign-in: the person approves the app on an Adwave consent screen; new accounts sign up in the same window. Clients identify themselves with a Client ID Metadata Document or register at /oauth/register. PKCE S256, refresh tokens, and iss on every redirect. Cursor's static client cursor-mcp still works.
  • API key: for apps that only send headers, use a key from the account menu, API & agents, as Authorization: Bearer. Same tools as OAuth.
  • Signup without a browser: https://waverunner.adwave.com/api/mcp/signup answers signup_start and signup_poll with no credentials. The poll returns an API key once.
  • Plugin: the Adwave plugin bundles this server and a skill for Claude Code, Cursor, Codex, Gemini, OpenClaw and Hermes.
  • Money: integer cents on a prepaid wallet. launch_campaign sets day one aside, and only what runs is charged for media. Ads still to be made under a deferred plan are charged at launch. A 402 includes nextTool: "create_wallet_checkout". Never send card numbers through MCP. Tools carry readOnlyHint, destructiveHint and openWorldHint, so apps ask before anything that spends or changes live ads.

Quick start (two minutes)

  1. Add Adwave to your app in one click: Add to Claude, Open in Claude Code, Open in Codex, Add to Cursor, Add to VS Code. In any other app, add the server URL https://waverunner.adwave.com/api/mcp (steps for each app below).
  2. Sign in in the window your app opens, or create an account there, and allow access.
  3. Ask your agent something: try "List my Adwave campaigns and their spend". The agent discovers tools from tools/list and the server instructions.
The MCP server wraps the same REST API v1 handlers in-process: same organization scoping, validation, and rate limits. Authenticated tools are listed below; each maps to a documented REST operation. Prefer specialized tools over the bulk org export when you only need one resource.

How to connect each client

  • Claude: Add the connector in one click, then select Add and Connect, and sign in. Or Customize, Connectors, Add custom connector, and paste the server URL. Add to Claude
  • Claude Code: Open Claude Code with the setup typed in and press Enter, or run the command below; then type /mcp and sign in. Or install the plugin with /plugin marketplace add AdwaveInc/adwave-agent-plugin. Open in Claude Code
    claude mcp add --scope user --transport http adwave https://waverunner.adwave.com/api/mcp
  • ChatGPT: Plugins, Add custom MCP server. Paste the server URL, choose OAuth, then sign in. ChatGPT lets custom servers launch and change campaigns on Business and Enterprise workspaces; on other plans it may only read your account.
  • Codex: Open the Codex app with the setup typed in and press Enter. In the Codex CLI, run the command below, then codex mcp login adwave. Open in Codex
    codex mcp add adwave --url https://waverunner.adwave.com/api/mcp
  • Cursor: Add the server in one click, then sign in when Cursor asks. Add to Cursor
  • VS Code and GitHub Copilot: Add the server in one click or with the command below, then sign in when VS Code asks. Add to VS Code
    code --add-mcp '{"name":"adwave","type":"http","url":"https://waverunner.adwave.com/api/mcp"}'
  • Grok: grok.com, Connectors, New connector, Custom. Paste the server URL, then sign in.
  • Perplexity: Customize, Connectors, Add custom, Add MCP connector. Paste the server URL, choose OAuth, then sign in. Organization admins may need to allow custom connectors first.
  • Gemini CLI: Install the Adwave extension, then sign in when Gemini asks.
    gemini extensions install https://github.com/AdwaveInc/adwave-agent-plugin

With an API key (apps that cannot sign in, scripts, CI). Any client that supports Streamable HTTP with custom headers uses this shape:

{
  "mcpServers": {
    "adwave": {
      "url": "https://waverunner.adwave.com/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}

Claude Code with a key:

claude mcp add --scope user --transport http adwave https://waverunner.adwave.com/api/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

xAI API: Remote MCP takes the key as authorization, sent on the Authorization header.

Custom agents: the official MCP TypeScript SDK (Python and other SDKs work the same way):

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(
  new StreamableHTTPClientTransport(new URL("https://waverunner.adwave.com/api/mcp"), {
    requestInit: {
      headers: { Authorization: `Bearer ${process.env.ADWAVE_API_KEY}` },
    },
  }),
);
const { tools } = await client.listTools();
const report = await client.callTool({
  name: "get_campaign_report",
  arguments: { campaignId: "018f..." },
});

The server is stateless: no sessions to create or clean up, and a dropped connection can simply reconnect. Treat the API key like a password. Anyone holding it can spend from your wallet.

OAuth sign-in

Apps connect without a key. The app reads /.well-known/oauth-protected-resource/api/mcp and /.well-known/oauth-authorization-server, identifies itself (a Client ID Metadata Document URL as client_id, or registration at /oauth/register), then sends the person through /oauth/authorize. That page shows who is asking, where sign-in returns, which workspace it will work in, and what it can do; the code is issued only when the person approves. The app exchanges it at /oauth/token (PKCE S256) for a one-hour access token and a refresh token. A connection lasts 30 days. The person can disconnect it any time in Settings, For developers, Connected apps; apps can revoke at /oauth/revoke.

Ad review webhook

Manual-approval orgs can poll list_ad_reviews or register a URL with set_ad_review_webhook. HTTPS is required except on localhost. The tool returns secret once; store it. get_ad_review_webhook never includes the secret. Each set call rotates it. clear_ad_review_webhook stops delivery.

We POST { "type": "ad_review.pending", "campaignId", "campaignName", "pending" } with x-webhook-id, x-webhook-timestamp, and x-webhook-signature (v1,<hex>). Verify HMAC-SHA256 of id.timestamp.rawBody (periods between the three values, exact JSON bytes) and reject timestamps more than 300 seconds off. A down endpoint does not undo the review email; poll list_ad_reviews if a delivery is missed. Same contract as API ad reviews.

Agency tools

An agency API key (Scale) can list, create, read, and update child clients, disable or restore a client, pull a child's campaign report, and download a cost CSV of media spend at cost. Prefer update_agency_client with operatingMode managed or self_serve (same packaged setter as the console). Client-scoped keys stay inside that client. There is no leads inbox tool. Fund the wallet with create_wallet_checkout (hosted Stripe URL; never send card numbers). offboard_agency_client pauses live campaigns and that client's keys; it does not delete history. restore_agency_client does not resume campaigns.

Signup tools (no API key)

The signup endpoint https://waverunner.adwave.com/api/mcp/signup answers these without credentials. Open verificationUri (/mcp-signup/verify?user_code=…). The human confirms the displayed code matches userCode, then enters the email one-time code. After signup_poll returns apiKey, connect https://waverunner.adwave.com/api/mcp with that bearer token to see the authenticated catalog.

WRITEsignup_start

Create an Adwave account from an agent. Sends an email one-time code and returns deviceCode (keep secret), userCode to show the human, verificationUri to open (/mcp-signup/verify?user_code=...), and poll interval. Never returns an API key. Next: the human confirms userCode on that page, enters the email code, then you call signup_poll.

WRITEsignup_poll

Wait until the human finishes the email one-time code. Pass deviceCode from signup_start. status=pending: keep polling at interval seconds. status=consumed: apiKey is returned once with connection.serverUrl, the account server to connect with Authorization: Bearer. status=expired with reason device_expired or otp_expired: start over with signup_start.

Authenticated tools

Same org scope as REST API v1. Read tools send readOnlyHint; money and disable tools send destructiveHint where it applies. Grouped by resource:

Businesses

READlist_businesses

List your businesses with their analysis status. Poll after add_business until ready.

WRITEadd_business

Add a business by website URL (analysis) or by name, category, description, and offerings (manual, ready immediately). Agency parent keys cannot add a business (use a client workspace).

WRITEarchive_business

Archive a business that has no live or launching campaigns. Hidden from list_businesses; restore any time with unarchive_business.

WRITEunarchive_business

Restore an archived business to active use.

READget_business

Business detail: the extracted profile, restrictedContent (locks and attestation), googleListing (read-only Google listing status, matched locations, hours, photo/review presence, and Maps asset status; no tokens or email), and every buyer profile on the business profile with its id and Profile reach (targetingSeeds). Campaigns copy Reach after interest targeting is planned; buyer profile seeds stay as written on the Creative profile.

WRITEupdate_business_restricted_content

Confirm system locks, attest restricted categories (or none), and set political disclosure fields. Cannot clear system locks; refused for restrictive upgrades while campaigns are launching, live, or paused.

WRITEcreate_persona

Create a buyer profile for a business from free-text notes (enqueues enrichment; the worker builds the full buyer profile). Free.

WRITEupdate_persona

Partial update of a buyer profile: name, description, demographics, motivations, pain points, selected flag, demographic pins and exclusions, and/or interest pins (catalog segment keys). A pin change on a buyer profile that live campaigns use needs applyToLiveCampaigns: true.

WRITEcopy_persona

Copy a buyer profile, with optional edits on the copy. The original and its campaigns stay as they are.

READget_business_ltv

Customer lifetime value for a business: average/quartile LTV and acquisition-month payback cohorts.

Creatives

READlist_creatives

List generated creatives for the business (newest first) with static variants, video ads, render status, and asset URLs. Paginated: default 20, max 100 per page; pass the returned nextCursor to fetch the next page.

READlist_ad_revisions

Media revision history for one static, video, or audio creative (prior deliverable URLs). Distinct from campaign serving version lineage.

WRITErestore_ad_revision

Restore a prior media revision to current (free). Live/paused campaign ads require a rationale; replaces DSP creatives when externalized.

WRITEgenerate_creatives

Charge and enqueue a library ad generation batch for a ready business (paid from the wallet). Quote first with get_creation_quote and pass its confirm values; a batch that now costs more is refused (price_changed) and nothing is charged.

READget_creation_quote

Pre-flight price for an ad generation batch. Pass campaignId for statics × interest lines; omit for library Launch-pack pricing.

Campaigns

READget_campaign_budget_settings

Read Daily, Monthly or total budget settings, dated one-day amounts and any separately funded external allocation.

READpreview_campaign_budget_settings

Estimate the next eligible day's digital amount and Adwave charge for proposed Daily or Monthly settings without saving or charging.

WRITEset_campaign_budget_settings

Choose Daily or Monthly. Monthly limits Adwave charges including fees; an external allocation is paid separately and defaults to 50%.

READlist_campaigns

List campaigns with objective, status, and daily budget.

WRITEcreate_campaign

Create a draft campaign with one of seven outcomes (awareness, traffic, leads, calls, visits/foot traffic, bookings, or sales), optionally with targeted states or a geo (the US, its territories and Canada only; Canada is countries ["CA"], Puerto Rico countries ["PR"]), named platforms (google_ads, meta, reddit, google_search; a present platforms array is authoritative and does not re-add open inventory), inventorySurfaces (mobile-web, mobile-apps, tv), playbook (follow-journey | open-mix), followSpend (omitted stamps on; pass false to opt out), prospectSpend (omitted stamps on), winback (omitted stamps on), metaStoryBeats (omitted stamps off; only true is on; not a spend path), playbookRun (the playbook the daily split follows: { key, settings? }; omitted starts on the agency default, else the recommended playbook for its goal, business and channels; null starts on the automatic split), driveTo (tactic + confirmed locationIds; omit on visits to use every confirmed store), googleCampaignMode (auto, the default: one Google Performance Max campaign when it applies; individual: each Google channel on its own), a landing URL, a geo-holdout for lift measurement, and audience boost. After interest targeting is planned, Autopilot builds a recommended creative plan (reuse ready creatives, generate only gaps across targeted buyer profiles; generationDeferred). Pass campaignAds: false for reuse-only. Metered: quote with campaignId once lines exist. Channels use Preparing → Starting → Live after launch.

READget_campaign

Full setup detail for one campaign: status, budget, flight dates, landing URL, targeted states, platforms, inventory surfaces, autopilotMode (auto | manual; manual = Guided), followSpend, prospectSpend, winback, metaStoryBeats (false when absent), playbook, playbookRun (the playbook the daily split follows, or null), runMode (playbook | your_split | automatic), audioEnabled, mail (Neighborhood mail enabled + pieceCap), measureLift, audience boost, geo-holdout states, buyer profiles, budgetMix (Your split vs Autopilot), driveTo (tactic, locationIds, snapshot), googleCampaignMode and google (how Google runs: performance_max or individual, and why), and the offer/instructions brief.

WRITEupdate_campaign_budget

Change a campaign's daily budget. On a running campaign today's set-aside is recomputed and rises only if the wallet covers it; only what runs is charged.

WRITEupdate_campaign_budget_mix

Set Your split (channel and buyer profile shares of daily media) or return the mix to Autopilot. Returning to Autopilot requires a short reason. Shares must add up to 100%.

WRITEupdate_campaign_playbook

Pick the playbook a campaign's daily split follows (search-first, calls-now, community-first, social-first, video-first, customers-first, foot-traffic, convert-traffic, follow-journey or tv-household), change its settings, or send null to return to the automatic split. Your split, or a line holding a locked share, wins: turn Your split off first, which releases the locks (409 split_on). 422 policy_locked when the agency locked the playbook.

READget_campaign_frequency_caps

Read each channel's frequency cap: Adwave's default, the campaign's own cap, and which of its channels can't take one.

WRITEupdate_campaign_frequency_caps

Set how often one person or household sees the ads on each channel, or hand a channel back to Adwave's default. Autopilot never moves a cap you set.

WRITErename_campaign

Rename a campaign in any status except mid-launch. Display-only; never affects serving or billing.

WRITEupdate_campaign_end_date

Set or clear the flight end date (YYYY-MM-DD or null). Live or paused pushes the new schedule to every channel; a draft updates the setup value. 422 invalid_end_date when the date is before today on a live flight, not after the start date, or more than 365 days out; 422 end_date_required when clearing the end date of a total budget (a total budget needs an end date; use a daily or monthly budget for ongoing spend); nothing is written when a field is invalid.

WRITEupdate_campaign_landing_url

Change the landing page on a live or paused campaign; refreshes serving ads to the new URL.

WRITEupdate_campaign_autopilot

Switch a campaign between Autopilot (auto) and Guided (manual). Returning to Autopilot requires a short reason.

WRITEupdate_campaign_setup

Edit draft campaign setup: geo (the US, its territories and Canada only; Canada is countries ["CA"], Puerto Rico countries ["PR"]), US states (empty = national), named platforms (a present array is authoritative; google_ads, meta, reddit, google_search), live inventory tiles (inventorySurfaces: mobile-web, mobile-apps, tv), targeted buyer profiles (icpIds from get_business), spend legs (followSpend, prospectSpend, winback), Meta story (metaStoryBeats; not a spend path; sole-field PATCH is valid), playbook (follow-journey | open-mix), audioEnabled, Neighborhood mail (mail: enabled + pieceCap 200..5000; draft/error only), geo-holdout (measureLift), driveTo (foot-traffic stores; live updates strategy only and does not push geo), googleCampaignMode (auto: one Google Performance Max campaign; individual: each Google channel on its own; also live/paused; a campaign launched before Performance Max is 409 legacy_campaign), and/or audience boost. Platforms, inventorySurfaces, spend-leg flags, metaStoryBeats, audioEnabled, and driveTo also apply live/paused (Audio is 422 audio_unavailable until that inventory is live). icpIds, playbook, and mail are refused once the campaign has launched. icpIds takes at most 12 buyer profiles (422 persona_cap); an id that is not a selected buyer profile is 422 invalid_icp_ids, never silently dropped. A Follow-only social mix with no pool source (Mobile web, Mobile apps, Google Search, or an imported customer list) is 422 follow_needs_pool. Switch Autopilot vs Guided with update_campaign_autopilot (campaign-wide). Send at least one field.

WRITElaunch_campaign

Launch a draft. Sets day one aside at launch (only what runs is charged for media; ads still to be made under a deferred plan are charged at launch), and commits with awaitingCreatives while ads are still rendering. 402 includes nextTool create_wallet_checkout. 409 license_inactive when the agency license is not active. 422 location_not_chosen when a step-by-step draft is still on an Entire US nobody chose.

READlaunch_campaign_dry_run

What launching would do, without doing it: canLaunch plus pass/fail for every pre-check, every launch gate, and day-one wallet coverage. Reads only; charges nothing.

WRITEcancel_campaign_launch

Cancel a launch that is still waiting on creatives (no charge yet). Returns the campaign to draft.

WRITEretry_campaign_launch

Retry a failed campaign: runs it through the launch gate again (sets day one aside on an active flight day; ads may still be rendering).

WRITEpause_campaign

Pause a live campaign. Future days stop. Today's set-aside stays until the next morning, when only what ran is charged and the rest is freed.

WRITEresume_campaign

Resume a paused campaign. On an active flight day, sets today's budget aside if it isn't already before serving restarts; only what runs is charged.

WRITEend_campaign

Permanently end a campaign. Stops all serving and charges; cannot be undone.

WRITEbulk_campaign_lifecycle

Pause, resume, or end up to 100 campaigns of one business in one call. Same rules per campaign as the single tools; every id must belong to that business or nothing is requested. Returns per-campaign results and a batchId.

WRITEarchive_campaign

Archive a campaign that is not launching or live. Hidden from list_campaigns; restore any time with unarchive_campaign.

WRITEunarchive_campaign

Restore an archived campaign to your lists.

WRITEdelete_campaign

Permanently delete a never-run draft campaign. Generated ads stay in the Ad Library; campaigns that have run can only be archived.

READget_campaign_report

Full performance rollup: spend, conversions, revenue, CPA, ROAS, sessions (ad visits from this campaign's ads), per-platform breakdowns with honest channel fields (clickable vs TV views, assisted conversions as reporting-only union plus path breakdown, identity coverage, seed impact), and CPM breakout (all-in, audience list-rate fees, media remainder).

READget_campaign_analytics

Daily funnel timeseries (impressions → clicks → ad visits/sessions → conversions), device/region mix (observed phones/computers/TVs, not sold channel cards), where ads appeared as publishers (TV channels, web/apps, Google networks, Meta platforms, Reddit communities), per-buyer-profile and per-segment performance, per-day spend story. Channel cards stay Mobile web / TV / Google / Meta; deviceMix is a breakdown.

READget_campaign_lift

Lift scorecard: geo-holdout causal lift, cross-channel overlap, and Autopilot effectiveness (acted vs observe-only), each with a 95% CI and significance flag. searchAfterTv compares Search clicks in the 14 days before and after TV started (a comparison, not proof; null until both windows are full and no budget moved). Includes holdoutInconclusive when the holdout read is still directional.

READget_campaign_customers

Customers we introduced (first-touch-new identities with no prior graph presence before ad exposure) plus new vs returning conversions and cost per new / introduced customer.

READlist_campaign_landing_pages

Landing pages on a campaign: slug, publish status, and content kind (blocks, or unknown when the saved content does not parse). Does not return HTML.

READget_campaign_ads

Every ad in the campaign Ads set (not the business creative library) with status, buyer profile, and lifetime performance. isSearchPack marks a Google Search ad, switched with the Search channel rather than set_ad_serving.

WRITEset_ad_serving

Pause or resume one campaign ad across every platform. reasonCode is optional; when given it is recorded as feedback. To label a resume, use resume_optimizer_pause for Autopilot pauses and resume_user_pause for manual pauses. Pausing the last ad a line carries goes ahead: the line falls back to the buyer profile's own ads first, then to any active ad for the same audience, and with none of those shows no ads until another one runs.

Audiences

WRITEset_audience_boost

Turn audience boost on or off (draft, live, or paused). Turning it on requires an imported customer list for that business.

READlist_audiences

Website audiences (observe-first): first-party visitor segments with member counts, platform audiences (campaign reach, synced lists, lookalikes), customer sources for Audience boost, plus Customize targeting guides (interest and demographic catalog picks Autopilot always includes on the next launch). Profile reach (targetingSeeds) is on each buyer profile via get_business.

WRITEcreate_segment

Create a custom first-party segment for a business with a rule definition, evaluated immediately.

WRITEset_segment_active

Activate or pause a segment. Paused segments stop evaluating membership and syncing.

WRITEdelete_segment

Delete a custom (non-system, non-discovered) segment.

WRITErefresh_segment

Enqueue a re-evaluation of one segment's membership.

WRITEcustomize_audience

Add or remove an interest or demographic catalog pick that Autopilot always includes on the business's next launch.

WRITEresolve_audience_suggestion

Accept or dismiss a discovered-audience suggestion. Accept creates a segment with the suggestion's exact proposed rule.

WRITEupdate_audience_sync_consent

Turn organization-wide audience sync on or off (on by default). Off stops customer-list uploads and Meta/TikTok/Reddit exposure sharing.

WRITEimport_customer_csv

Import a customer CSV for a business to seed Audience boost. Hashed at rest; raw emails are never returned. Rate limited.

Tracking

READget_tracking_setup

A business's site tag snippet, server-side conversion webhook (POST JSON to conversionWebhook.url; the token is in the path, no bearer), conversion rules, and settings. Wire carts, CRMs, and your own systems into attribution.

WRITEcreate_conversion_rule

Create a conversion rule for a business (pageview, post_action, checkout_return, or call_click). Intent-page-looking patterns require acknowledgeIntentPage: true.

WRITEupdate_conversion_rule

Set or clear a conversion rule's per-conversion value estimate. Applies to new conversions only.

WRITEdelete_conversion_rule

Delete a conversion rule.

WRITEupdate_tracking_settings

Update a business's tracking-tag settings (autocapture, lead detection, origin enforcement, view-through window). Disabling recommended settings requires acknowledgeImpact: true.

WRITEupsert_form_conversion_value

Set or clear the per-conversion value estimate for a named Form conversion (lead, signup, or subscribe). Creates a value-only carrier when needed; clearing with null removes the estimate. Applies to new conversions only.

WRITEresolve_conversion_suggestion

Accept or dismiss an AI-discovered conversion suggestion. Accept creates or links a conversion rule; dismiss remembers the verdict forever.

WRITEsend_test_conversion

Record a test conversion event for a business to verify the tag/webhook pipeline end to end.

Wallet

READget_wallet

Prepaid wallet: balanceCents, heldCents (set aside today) and availableCents, plus auto-refill state. Each morning a live campaign sets aside the day's amount. The next morning, once delivery is reported, we charge what ran, never more than the amount set aside. A day when nothing can serve is not charged. Check availableCents before launching. Fund with create_wallet_checkout (hosted Stripe URL; never send card numbers).

READget_wallet_ledger

Paginated wallet ledger (newest first): deposits, daily campaign charges, refunds, adjustments, and ad-creation charges. Default 25, max 100 per page.

WRITEcreate_wallet_checkout

Create a Stripe Checkout session to fund the prepaid wallet. Returns a hosted url plus requestedCents (what the wallet is credited) and grossCents (what the card is charged, processing fee included); never send card data through MCP. Amount is integer cents, same floor and ceiling as wallet top-up in the app. Launch 402 includes nextTool create_wallet_checkout.

WRITEcreate_billing_portal_session

Create a Stripe Customer Portal session so the human can manage saved payment methods. Returns a hosted url. 422 portal_not_configured if the billing portal is not enabled yet; use create_wallet_checkout instead.

Ad reviews

READlist_ad_reviews

List ads waiting on manual approval for this organization (kind, entityId, campaign). Empty when the org auto-approves. Approve with approve_ad before those ads can serve. Optional push: set_ad_review_webhook, or poll this tool.

WRITEapprove_ad

Approve one pending_review ad so it can serve. Pass kind (static, video, or audio) and entityId from list_ad_reviews. Does not launch a campaign; it only clears the approval hold on that ad.

READget_ad_review_webhook

Show whether this org has an ad-review webhook. Returns { configured, url }. Never returns the secret; set_ad_review_webhook mints a new one.

WRITEset_ad_review_webhook

Register an HTTPS URL (http on localhost only) to receive signed POSTs when ads need manual approval. Returns { url, secret } once. Store the secret; GET never shows it. Each call rotates the secret.

WRITEclear_ad_review_webhook

Stop sending ad-review webhooks. Clears the URL and secret.

Organization

WRITEretry_failed_placements

Re-run distribution for a live or launching campaign's failed placements only; serving placements are left untouched.

READget_landing_page

One landing page and its variants, including each variant's latest generation attempt state. Does not return HTML or a generation id.

READlist_recommendations

Pending cross-campaign budget moves the portfolio optimizer computed but didn't auto-apply, with the marginal-CPA evidence.

WRITEapply_recommendation

Apply a pending budget move between two campaigns (the same validated transactional path as a manual budget edit).

WRITEdismiss_recommendation

Dismiss a pending budget recommendation without moving any money.

READlist_integrations

List connected customer-data sources (provider, status, last sync). Tokens are never returned. Pass businessId to filter to one website.

WRITEsync_integration

Enqueue a sync for an already-connected customer-data source. Connect/disconnect stay in the web app.

READget_website_insights

Read business-scoped Search Console and Google Analytics reports, selected property, date window, freshness and data-quality limits. Website key events remain separate from campaign conversions.

WRITEconnect_website_insights

Get a browser consent link for a business’s Search Console or Analytics account. The user signs in to Google and grants read-only access; no passwords or tokens are accepted.

READlist_integration_properties

List accessible Google website properties and Analytics web streams, with pagination and the current connection revision.

WRITEselect_integration_property

Select a listed property and web stream for this business using the observed connection revision, then request its first report.

WRITEdisconnect_integration

Disconnect a Search Console or Google Analytics source and remove its local credentials and reports. Google properties, tracking, and other business connections are unchanged.

WRITEupdate_organization

Update organization product settings. Currently just crossCampaignOptimization: enabling it lets the portfolio optimizer apply cross-campaign budget moves automatically.

READexport_org_data

Full organization data export as one large JSON document (businesses, buyer profiles, creatives, campaigns, ledger entries, delivered spend, segments, per-ad performance, and more). Rate limited to 5 requests per hour per organization.

WRITEstart_assistant_workflow

Start a private Assistant conversation. Does not create a business or spend.

READlist_assistant_workflows

List this viewer's private Assistant conversations.

READget_assistant_workflow

Read one private Assistant conversation you own.

WRITEupdate_assistant_answers

Save private scratch answers. Does not create a business or spend.

WRITErevise_assistant_artifact

Replace a private artifact payload. No secrets.

READget_assistant_capabilities

Read-only map of tenant tools and whether each is a read, a proposal, or an approved write.

Agency

READlist_agency_team

List agency staff roles, assignments and pending invitations. Administrators only. Supports limit and offset.

WRITEinvite_agency_teammate

Invite a teammate with a fixed role and explicit clients. Reuse operationId when retrying.

WRITEupdate_agency_teammate

Save staff permissions using the current expectedRevision. Reload after a conflict.

WRITErevoke_agency_teammate

Revoke agency access without deleting the person’s account.

WRITEcancel_agency_team_invitation

Cancel a pending agency staff invitation.

READlist_agency_clients

List child client organizations for an agency API key. Scale license required. Refused on a client-scoped key.

WRITEcreate_agency_client

Create a child client with name, optional case-sensitive externalId and operatingMode (managed or self_serve). Save one UUID idempotencyKey and reuse it with the same body after an uncertain result; changed bodies return 409. Matching externalId and name/mode can return an existing client. Omitted keys return a retry warning. Never automatically retry with a new key. Scale license required.

READget_agency_provisioning_request

Read a client creation result by its original idempotencyKey. Unknown means no completed result is available yet; retry the original body with the same key if needed. Complete results include the client id and current availability: available, disabled, or erased.

READget_agency_client

Read one child client's stored experience/billing modes (Managed vs Self-serve pair), fee percent, monthly spend cap, digest routing, campaignPolicy (stored + inheritance-resolved defaults/locks), and effective rate split. Change the pair with update_agency_client operatingMode.

WRITEupdate_agency_client

Update one child client: operatingMode (managed or self_serve), the agency fee percent (null = inherit the agency default), the monthly spend cap in cents (null = no cap), digest mail routing (true = client + agency, false = agency only, null = follow experience mode), dspBilling on Self-serve (platform_seat or client_dsp), and campaignPolicy defaults/locks (null clears the child's stored policy). Only the fields you pass change.

WRITEoffboard_agency_client

Disable a child client: pause live campaigns and turn off that client's API keys. Pass confirmName matching the client name. Does not delete history. Restore with restore_agency_client.

WRITErestore_agency_client

Restore a disabled child client so they can sign in again. Does not resume paused campaigns. Pass confirmName matching the client name.

READlist_agency_client_campaigns

List campaigns that belong to one child client org.

READget_agency_client_campaign_report

Performance report for a campaign in a child client org. Spend is pass-through media at cost.

READget_agency_client_campaign_analytics

Analytics for a campaign in a child client org.

READget_agency_cost_report

CSV of pass-through media spend across child clients for agency finance.

READlist_agency_client_api_keys

List the API keys bound to one child client. 404 for a client outside this agency.

WRITEcreate_agency_client_api_key

Mint an API key that authenticates only as that child client (never the agency). Secret returned once.

WRITErevoke_agency_client_api_key

Disable one API key bound to a child client.

READlist_agency_campaigns

Campaigns across every child client with the owning client on each row. Optional status and client filters.

Agent onboarding path

A fresh API key is enough for an agent to take a website from zero to a launched campaign: add_business, wait until analysis is ready, review buyer profiles with get_business, price creatives with get_creation_quote, create_campaign, confirm get_wallet, create_wallet_checkout if the balance is short, then launch_campaign (always confirm with the user before launch, because it commits wallet money). We keep that path exercised in automated tests so it stays reliable as tools change.

After launch, prefer get_campaign_report and get_campaign_customers for results: conversions and ad visits lead. Customers we introduced counts people with no prior presence before this campaign's first ad. Raw clicks are a secondary Mobile web signal.

The full workflow, step by step

This is the sequence agents are taught via the server's instructions; each step maps to one tool call:

  1. add_business with your website URL. Analysis is free and takes a minute or two. Poll list_businesses until the status is ready.
  2. get_business: review the extracted profile and the buyer profiles. Each buyer profile has an id and Reach (targetingSeeds); pass a subset as icpIds to target specific buyer profiles. After interest targeting is planned, Reach is copied into that campaign's flight targeting.
  3. create_campaign: a draft; launching is separate. Named platforms include google_ads, meta, reddit, and google_search (Search under Google, on by default when the daily budget covers it). With both Google channels on, googleCampaignMode defaults to auto (one Google Performance Max campaign when it applies); send individual to run each Google channel on its own. After interest targeting is planned, Autopilot builds a recommended creative plan (reuse ready creatives, generate only gaps across targeted buyer profiles; generationDeferred: true; metered from the wallet). Pass campaignAds: false for a reuse-only plan with no generation charge. Daily budget is at least $30. After create, use update_campaign_setup to change channels, inventory tiles, Follow spend, playbook (Follow vs Open mix), geo, or icpIds (which buyer profiles the draft targets). Switch Autopilot vs Guided with update_campaign_autopilot (campaign-wide, not per channel).
  4. get_creation_quote: price the batch. Pass campaignId once lines exist for the recommended creative plan gaps (statics only where needed across buyer profiles, plus missing videos); omit campaignId for library Launch-pack pricing. Returns unit breakdown, billing mode, and remaining wallet funds. Watch generation with list_creatives.
  5. get_wallet: confirm the balance covers at least the first day. If it does not, create_wallet_checkout and open the returned URL. Then launch_campaign. A 402 from launch includes nextTool: "create_wallet_checkout".
  6. Manual-approval orgs: list_ad_reviews then approve_ad before those ads can serve. Optional: set_ad_review_webhook for a signed POST when new ads need review.
  7. get_campaign_report: spend, conversions, revenue, CPA, ROAS, per-platform breakdowns. Manage spend with update_campaign_budget, update_campaign_end_date, update_campaign_landing_url, update_campaign_autopilot, pause_campaign, resume_campaign, end_campaign, or bulk_campaign_lifecycle for many campaigns of one business at once. Before a launch, launch_campaign_dry_run lists every check, gate, and the wallet as pass/fail without charging anything.
  8. Optimize: get_campaign_analytics for daily trends and buyer profile/segment/device breakdowns, get_campaign_ads for per-ad numbers, then set_ad_serving to pause the weak ads (a reasonCode is optional; to label a resume, use resume_optimizer_pause or resume_user_pause to match how the ad was paused). Wire your own conversion data in with get_tracking_setup so the loop runs on real outcomes.

A tool call and its result look like this (all money values are integer cents):

// → tools/call
{ "name": "create_campaign",
  "arguments": {
    "businessId": "018f3a2b-...",
    "name": "Summer Sale",
    "objective": "sales",
    "dailyBudgetCents": 5000,
    "offer": "Free shipping over $40"
  } }

// ← result
{ "campaign": { "id": "018f3c91-...", "status": "draft" },
  "campaignAdsEnqueued": false, "generationDeferred": true }

Use cases & example prompts

Paste these into any connected agent and adjust the specifics. They exercise the whole surface:

Sign up from a headless agent

No browser sign-in available. The agent creates the account on the signup endpoint, the human enters the email code, then the agent connects the account server with the returned key.

Connect to the Adwave signup endpoint. Start signup with my email, open the verification link, wait until I enter the one-time code, then store the API key, connect the account server, and list my businesses.

Zero to live campaign

You have a website and a budget, and want an agent to handle everything: analysis, buyer profiles (personas), ad generation, and launch.

Add acme-coffee.com to Adwave, wait for the analysis, show me the buyer profiles it found, then create a $50/day sales campaign with the offer “free shipping over $40”. Show me the generated ads and the wallet balance, then ask me before launching.

Morning performance check

A recurring assistant task: pull yesterday's numbers and flag anything that needs a decision.

Pull the report for every live Adwave campaign. Summarize spend, conversions, CPA, and ROAS, compare platforms, and tell me if anything looks off or is worth pausing.

Budget management

Shift money toward what works without logging into the dashboard.

My “Summer Sale” campaign is converting at 4x ROAS and “Brand Awareness” is barely spending. Raise Summer Sale to $80/day and drop Brand Awareness to $30/day.

Spend guardrails

Stop spending fast when priorities change: pausing keeps the campaign resumable, ending is permanent.

We're out of inventory until Thursday. Pause every live Adwave campaign now, and remind me to resume them Thursday morning.

Audience review

Review Website audiences and platform sync state before planning the next campaign.

List my Adwave audiences. How many people are in the high-intent segment, and which platform audiences are synced and ready for Delivery?

Closed-loop creative optimization

The full optimization loop: pull daily and per-ad data, join it with your own numbers (margins, inventory, CRM), decide, and push the changes back.

Pull the last 30 days of analytics and the per-ad performance for my “Summer Sale” Adwave campaign. Cross-reference the conversion revenue with the product margins in my spreadsheet, then pause any ad whose margin-adjusted CPA is above $40 and tell me if the budget should move.

Approve ads from your own queue

The org requires manual approval. Register a webhook so new ads arrive as a signed POST instead of polling.

Set my Adwave ad-review webhook to https://example.com/hooks/ads. Save the secret, then whenever a signed POST arrives, list pending reviews and approve the ones I named.

Wire in your own conversion data

Attribution is only as good as the conversions it sees. Feed them from any backend so reports and per-ad numbers reflect reality.

Get my Adwave tracking setup and write a small script that posts a conversion to the webhook whenever a Stripe payment succeeds, including the order id and the customer email.

Errors & limits

Failed tool calls return the HTTP status and the same JSON error the REST API sends, so agents can react precisely:

ErrorMeaningWhat to do
401 unauthorizedNo credentials, or an invalid, expired or revoked API key or OAuth token. The response names the OAuth discovery document in WWW-Authenticate. Only the signup endpoint answers without credentials.Sign in with OAuth (your app does this when it sees the 401), or send a valid API key as Authorization: Bearer. Do not call signup_start while a Bearer is set.
402 insufficient_fundsThe wallet can't cover the first day's budgetCall create_wallet_checkout, open the Stripe URL, then launch again
422 portal_not_configuredStripe Customer Portal is not enabled yetUse create_wallet_checkout until the billing portal is enabled
404 *_not_foundThe id doesn't exist in your organizationRe-list (businesses/campaigns) and use a returned id
409 no_servable_adsNothing ready to serve: BYO or prepaid with no finished ad; Autopilot if ads cannot start or generation already failedUpload ads, add a buyer profile, or wait for generation. Autopilot starts ads at launch if none were requested yet
409 byo_missing_serve_familiesUpload-your-ads campaign has no finished ad for any channel that can run. With some channels covered, launch runs those and returns the rest in skippedServeFamiliesUpload a mobile, TV, or follow ad, then launch again
422 illegal_comboAgency client update mixed Managed and Self-serve fields illegallySend operatingMode managed or self_serve, or a legal experience/billing pair
409 invalid_statusThe campaign isn't in a state that allows the actionCheck list_campaigns (e.g. only live campaigns pause)
409 creative_rejectedResuming an ad whose creative was rejectedAllow the creative to serve again, then resume the ad
400 resume_reason_mismatchResume used the wrong dedicated reason for how the ad was pausedUse resume_optimizer_pause for Autopilot pauses, resume_user_pause for manual pauses
422 invalid_inputA parameter failed validationFix the field named in the issues array and retry
429 rate_limitedToo many requests this minuteBack off and retry (120 reads / 30 writes per minute)

Rate limits are shared with the REST API: 120 reads and 30 writes per minute per key, plus 120 MCP requests per minute. Analysis and ad generation are subject to the daily fair-use caps in the ad creation docs.

Money safety

launch_campaign and resume_campaign move media money: launching sets the first day's budget aside from your prepaid wallet (and the daily budget each active day after); resuming a paused campaign sets today's budget aside if it isn't already. Only what runs is charged, the next morning once delivery is reported. Ad generation through API and MCP (inside create_campaign, or at launch under a deferred plan) is quoted per unit, priced up front by get_creation_quote, charged to the wallet, and rejected with a 402 (nothing created) when the wallet cannot cover it. In the product UI, for businesses: Your first campaign comes with free starter ads. Making all your ads now, filling gaps and Ad Library extras use published unit prices, and you see the price before you accept. Adding businesses and analysis are always free, and a launch fails cleanly (never overdrafts) when the wallet can't cover day one. Agents are told to confirm with you before launching, resuming, or ending, and money only ever leaves the prepaid wallet you topped up, never a card on file (unless you opted into auto-refill). To fund from the agent, call create_wallet_checkout and open the hosted Stripe URL.

Was this helpful?