create_microsoft_campaign

Microsoft Advertising Write

Create a Microsoft Advertising campaign of ANY type Microsoft supports — Search, Shopping (incl

Endpoint

POST https://api.adspirer.ai/api/v1/tools/create_microsoft_campaign/execute

Headers

Description

Create a Microsoft Advertising campaign of ANY type Microsoft supports — Search, Shopping (incl. Smart Shopping), Dynamic Search Ads, Audience (Microsoft Audience Network), Performance Max, Hotel, or App — with deep control over budget, bidding scheme and every scheme param, languages, schedule, URL tracking and the type-specific Settings. Multi-entity: pass ad_groups[], each with nested ads[] and keywords[], to build a whole campaign in ONE call. Everything lands PAUSED — review before activating. Money is plain decimal account currency (for 50/day pass 50).

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
account_idstring optionalMicrosoft Advertising ad account id (numeric AccountId — NOT the 8-character account number shown in the UI). Get it from list_microsoft_accounts. Required when more than one account is connected; may be omitted with exactly one. `customer_id` is accepted as an alias. If the tool replies that several accounts are connected, re-run with this set — that reply is NOT a connection problem.
customer_idstring optionalAlias of account_id.
namestring requiredCampaign name (required, ≤128 chars, unique in the account).
campaign_typestring optionalSearch, Shopping, DynamicSearchAds, Audience, Hotel, PerformanceMax, or App. Default Search. default: "Search"
statusstring optionalActive or Paused. DEFAULT Paused — a new campaign should not spend until reviewed. Only set Active deliberately. default: "Paused"
daily_budgetnumber optionalDaily budget — plain decimal in the account currency (for 50/day pass 50, NOT 5000, NOT micros). Omit if using budget_id.
budget_typestring optionalDailyBudgetStandard (default), DailyBudgetAccelerated, or LifetimeBudgetStandard.
budget_idstring optionalUse an existing SHARED budget instead of daily_budget (from list_microsoft_budgets).
bidding_schemeobject optionalBidding scheme object: {type, ...params}. type ∈ EnhancedCpc, ManualCpc, MaxClicks, MaxConversions (max_cpc, target_cpa), MaxConversionValue (max_cpc, target_roas), MaxRoas, TargetImpressionShare (max_cpc, target_ad_position, target_impression_share), PercentCpc, Commission (commission_rate), CostPerSale, InheritFromParent. Money params (max_cpc) are plain decimals in the account currency — NOT cents, NOT micros.
bid_strategy_idstring optionalAttach a portfolio bid strategy (from list_microsoft_bid_strategies).
languagesarray optionalLanguages e.g. ['English'] or ['All']. Required for Audience campaigns.
time_zonestring optionalCampaign time zone, e.g. PacificTimeUSCanadaTijuana.
start_datestring optionalStart date YYYY-MM-DD (campaign level; only Audience honors it).
end_datestring optionalEnd date YYYY-MM-DD.
tracking_url_templatestring optionalTracking template URL.
final_url_suffixstring optionalFinal URL suffix parameters.
url_custom_parametersany optionalCustom URL params: {key:value} or [{key,value}].
shopping_settingobject optionalShopping/Smart Shopping: {sales_country_code, store_id (Merchant Center), priority, feed_label, local_inventory_ads_enabled, shoppable_ads_enabled}.
dsa_settingobject optionalDynamic Search Ads: {domain_name, language, page_feed_ids:[...], source, dynamic_description_enabled}.
performance_max_settingobject optionalPerformance Max: {auto_generated_image_opt_out, auto_generated_text_opt_out, final_url_expansion_opt_out, cost_per_sale_opt_out, page_feed_ids:[...]}.
app_settingobject optionalApp campaign: {app_id, app_store}.
hotel_settingobject optionalHotel/Lodging: {hotel_ad_group_type}.
ai_search_settingobject optionalAI Search (Copilot) settings: {ai_search_enabled, search_term_matching_opt_out, final_url_expansion_opt_out}.
settingsarray optionalAdvanced escape hatch: full polymorphic Settings[] passed verbatim. Prefer the per-type setting fields above. If none given, the required empty setting for the type is added automatically.
ad_groupsarray optionalAd groups to create under this campaign in the same flow. Each: {name, cpc_bid, network, ad_group_type, start_date, ..., ads:[...], keywords:[...]}. Multi-entity create — one campaign, many ad groups, each with many ads and keywords.

Example request

{
  "arguments": {
    "name": "string",
    "account_id": "string",
    "customer_id": "string",
    "campaign_type": "Search",
    "status": "Paused",
    "daily_budget": 1.0,
    "budget_type": "string"
  }
}

Example responses

200 — Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for create_microsoft_campaign)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "create_microsoft_campaign"
}

400 — Tool-level error (bad arguments / multi-account selection)

{
  "success": false,
  "error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n  - Acme Holdings (ad_account_id=\"act_123456789\")\n  - Acme EU (ad_account_id=\"act_987654321\")",
  "is_error": true,
  "tool": "create_microsoft_campaign"
}

402 — Quota exhausted

{
  "success": false,
  "error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
  "is_error": true,
  "tool": "create_microsoft_campaign",
  "quota": {
    "used": 150,
    "limit": 150,
    "tier": "plus",
    "period_end": "2026-05-01",
    "upgrade_url": "https://adspirer.ai"
  }
}

Try it live


Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai