update_campaign

Google Ads Write

๐Ÿšจ **IF THIS TOOL RETURNS A QUOTA ERROR:** - The error message will include a clickable upgrade link - Show the FULL error message to the user (it contains the upgrade link) - DO NOT attempt to work ar

Endpoint

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

Headers

Description

๐Ÿšจ **IF THIS TOOL RETURNS A QUOTA ERROR:** - The error message will include a clickable upgrade link - Show the FULL error message to the user (it contains the upgrade link) - DO NOT attempt to work around the error or use alternative data - DO NOT create campaigns or perform actions without valid tool data - STOP and direct the user to upgrade via the provided link Update an existing campaign's settings. **Can update:** - name: Campaign name - status: ENABLED or PAUSED - budget_amount: Daily budget in dollars - target_search_network: Search Partners toggle (Search campaigns) - target_content_network: Display Network expansion (Search campaigns) - language_codes: Replace language targeting (e.g. ["en"] for English-only) - locations_to_add: Append locations to geo targeting (free text or geoTargetConstants/<id>) - locations_to_remove: Remove locations by criterion resource name (get from get_campaign_targeting) - audience_targeting_mode: OBSERVATION vs TARGETING for audience signals - ai_max_enabled: Google AI Max toggle on Search campaigns **IMPORTANT:** - Confirm with user BEFORE making changes - Use list_campaigns first to get campaign_id - At least one update field is required - For locations_to_remove, you MUST call get_campaign_targeting first to obtain the criterion resource names โ€” free-text location names will not work for removal. **Parameters:** - campaign_id: The campaign ID (REQUIRED - get from list_campaigns) - name: New campaign name (optional) - status: ENABLED or PAUSED (optional) - budget_amount: Daily budget in dollars, e.g., 50.00 for $50/day (optional) - target_search_network / target_content_network: bools (optional) - language_codes: list[str] (optional, REPLACES current set) - locations_to_add / locations_to_remove: list[str] (optional) - audience_targeting_mode: OBSERVATION | TARGETING (optional) - ai_max_enabled: bool (optional) - customer_id: Optional (uses connected account if omitted) **Execution time:** 2-6 seconds depending on number of targeting changes **Example:** User: "Increase the budget to $100/day and target English-only" Agent: 1. Uses list_campaigns to find the campaign 2. Confirms: "I'll update 'Summer Sale' budget to $100/day and set language to English-only. Proceed?" 3. Uses update_campaign(campaign_id=..., budget_amount=100.00, language_codes=["en"])

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
campaign_idstring requiredThe campaign ID to update. Use list_campaigns first to get available campaign IDs.
namestring optionalNew campaign name (optional)
statusstring optionalNew status: ENABLED or PAUSED (optional)
budget_amountnumber optionalNew daily budget in dollars, e.g., 50.00 for $50/day (optional)
target_search_networkboolean optionalSearch Partners network toggle. Default OFF on new campaigns. Search Partners traffic typically has 30โ€“50% lower conversion rates than google.com search โ€” only enable when explicitly requested. Pass true to enable, false to disable.
target_content_networkboolean optionalDisplay Network expansion for Search campaigns. Default OFF on new campaigns. Display traffic has very different user intent โ€” only enable when explicitly requested. Pass true to enable, false to disable.
language_codesarray optionalREPLACE the campaign's language targeting with this list. ISO-639-1 codes (`en`, `es`, `fr`, `de`, `pt`, `it`, `nl`, `ja`, `zh`, `ko`, `ru`, `ar`, `hi`, `tr`, `pl`, `id`, `th`, `vi`, `sv`, `fi`, `da`, `no`, `cs`, `el`, `he`, `hu`, `ro`, `sk`, `uk`, `bg`, `bn`, `ml`, `ta`, `te`, `mr`, `ur`, `fa`, `ms`, `tl`, `lt`, `lv`, `et`, `sl`, `hr`, `sr`, `ca`, `is`) or `languageConstants/<id>` resource names from `list_google_languages`. Pass `["en"]` for English-only targeting. Sending this REPLACES the campaign's existing language criteria โ€” pass the full intended list.
locations_to_addarray optionalLocations to ADD to the campaign's geo targeting. Accepts free-text (`'Miami, FL'`, `'United States'`) OR `geoTargetConstants/<id>` resource names from `resolve_google_locations`. New criteria are appended โ€” existing targets are untouched. To remove existing targets, use `locations_to_remove`.
locations_to_removearray optionalLocations to REMOVE from the campaign's geo targeting. Each entry must be a criterion resource name in the form `customers/<cid>/campaignCriteria/<campaign_id>~<criterion_id>`. Call `get_campaign_targeting` first to get the exact resource names for currently-targeted locations.
audience_targeting_modestring optionalCampaign-level audience targeting mode for AUDIENCE dimension: `OBSERVATION` (audience signals only inform reporting and bid adjustments โ€” ads still serve to non-audience users) or `TARGETING` (ads ONLY serve to users in the listed audience segments). OBSERVATION is the default and matches the SOP for most Search campaigns. Switching to TARGETING narrows reach significantly โ€” confirm with user.
ai_max_enabledboolean optionalGoogle Ads AI Max toggle on Search campaigns. AI Max uses Google's AI to expand match types and rewrite ads beyond what the advertiser specified. SOPs that require exact-match-only or fixed ad copy should keep this OFF. Pass `false` to disable, `true` to enable. Only affects Search campaigns โ€” ignored on PMax/Display.
customer_idstring optionalGoogle Ads customer ID. Required for multi-account users. Get from get_connections_status.

Example request

{
  "arguments": {
    "campaign_id": "<campaign_id>",
    "name": "string",
    "status": "string",
    "budget_amount": 1.0,
    "target_search_network": false,
    "target_content_network": false,
    "language_codes": [
      "string"
    ]
  }
}

Example responses

200 โ€” Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for update_campaign)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "update_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": "update_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": "update_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