add_pmax_asset_group_asset

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/add_pmax_asset_group_asset/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 Add ONE text or video asset to a Performance Max asset group. Text slots (pass `text`): HEADLINE (โ‰ค30 chars), LONG_HEADLINE (โ‰ค90), DESCRIPTION (โ‰ค90), BUSINESS_NAME (โ‰ค25). Video (pass `youtube_video_id`): YOUTUBE_VIDEO. Over-limit text is auto-truncated. Per-group maxima are enforced (15 headlines / 5 long headlines / 5 descriptions / 1 business name / 5 videos) โ€” you'll get a clear error if the slot is full. **Use when:** - "Add a headline 'Summer Sale' to the PMax group" โ†’ field_type=HEADLINE, text=... - "Attach this YouTube video to the asset group" โ†’ field_type=YOUTUBE_VIDEO, youtube_video_id=... **Parameters:** - campaign_id: The PMax campaign ID (REQUIRED) - field_type: The slot (REQUIRED โ€” see list above) - text: For text slots (REQUIRED for those) - youtube_video_id: For YOUTUBE_VIDEO (REQUIRED for that) - asset_group_id: Required if the campaign has 2+ groups - customer_id: Optional (uses connected account if omitted) **Execution time:** 2-5 seconds

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
campaign_idstring requiredThe PMax campaign ID (numeric). Example: '21854471508'
field_typestring requiredAsset slot: HEADLINE (max 30 chars), LONG_HEADLINE (max 90), DESCRIPTION (max 90), BUSINESS_NAME (max 25), or YOUTUBE_VIDEO. Use add_pmax_asset_group_image for images.
textstring optionalThe text โ€” REQUIRED for HEADLINE/LONG_HEADLINE/DESCRIPTION/BUSINESS_NAME. Over-limit text is truncated.
youtube_video_idstring optionalThe YouTube video ID (11 chars) โ€” REQUIRED for YOUTUBE_VIDEO. e.g. 'dQw4w9WgXcQ'.
asset_group_idstring optionalRequired when the campaign has more than one asset group. Get IDs from get_pmax_asset_groups.
customer_idstring optionalGoogle Ads customer ID. Required for multi-account users. Get from get_connections_status.

Example request

{
  "arguments": {
    "campaign_id": "<campaign_id>",
    "field_type": "string",
    "text": "string",
    "youtube_video_id": "string",
    "asset_group_id": "string",
    "customer_id": "string"
  }
}

Example responses

200 โ€” Success

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

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": "add_pmax_asset_group_asset"
}

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": "add_pmax_asset_group_asset",
  "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