Microsoft Advertising Write
Create a Microsoft Advertising campaign of ANY type Microsoft supports — Search, Shopping (incl
POST https://api.adspirer.ai/api/v1/tools/create_microsoft_campaign/execute
Authorization: Bearer sk_live_... — your Adspirer API key (required)Content-Type: application/json (required)Idempotency-Key: <uuid> — recommended for write operations to make retries safeAll tool arguments are wrapped in an arguments object.
| Field | Type | Description |
|---|---|---|
account_id | string optional | Microsoft 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_id | string optional | Alias of account_id. |
name | string required | Campaign name (required, ≤128 chars, unique in the account). |
campaign_type | string optional | Search, Shopping, DynamicSearchAds, Audience, Hotel, PerformanceMax, or App. Default Search. default: "Search" |
status | string optional | Active or Paused. DEFAULT Paused — a new campaign should not spend until reviewed. Only set Active deliberately. default: "Paused" |
daily_budget | number optional | Daily budget — plain decimal in the account currency (for 50/day pass 50, NOT 5000, NOT micros). Omit if using budget_id. |
budget_type | string optional | DailyBudgetStandard (default), DailyBudgetAccelerated, or LifetimeBudgetStandard. |
budget_id | string optional | Use an existing SHARED budget instead of daily_budget (from list_microsoft_budgets). |
bidding_scheme | object optional | Bidding 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_id | string optional | Attach a portfolio bid strategy (from list_microsoft_bid_strategies). |
languages | array optional | Languages e.g. ['English'] or ['All']. Required for Audience campaigns. |
time_zone | string optional | Campaign time zone, e.g. PacificTimeUSCanadaTijuana. |
start_date | string optional | Start date YYYY-MM-DD (campaign level; only Audience honors it). |
end_date | string optional | End date YYYY-MM-DD. |
tracking_url_template | string optional | Tracking template URL. |
final_url_suffix | string optional | Final URL suffix parameters. |
url_custom_parameters | any optional | Custom URL params: {key:value} or [{key,value}]. |
shopping_setting | object optional | Shopping/Smart Shopping: {sales_country_code, store_id (Merchant Center), priority, feed_label, local_inventory_ads_enabled, shoppable_ads_enabled}. |
dsa_setting | object optional | Dynamic Search Ads: {domain_name, language, page_feed_ids:[...], source, dynamic_description_enabled}. |
performance_max_setting | object optional | Performance 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_setting | object optional | App campaign: {app_id, app_store}. |
hotel_setting | object optional | Hotel/Lodging: {hotel_ad_group_type}. |
ai_search_setting | object optional | AI Search (Copilot) settings: {ai_search_enabled, search_term_matching_opt_out, final_url_expansion_opt_out}. |
settings | array optional | Advanced 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_groups | array optional | Ad 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. |
{
"arguments": {
"name": "string",
"account_id": "string",
"customer_id": "string",
"campaign_type": "Search",
"status": "Paused",
"daily_budget": 1.0,
"budget_type": "string"
}
}
{
"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"
}
{
"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"
}
{
"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"
}
}
Interactive: Swagger UI
Machine-readable: OpenAPI 3.1 spec · llms-full.txt
More tools: Microsoft Advertising · All tools
Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai