# Create a Google Ads campaign from an agent

Creating a Google Ads campaign takes two calls: `ads.validateCampaignPlan`, a dry run, then `ads.createCampaignPlan`, which leaves `status: PAUSED` on the Search campaign, ad group, and ad group ad. A signed-in workspace owner activates it in the web app; MCP refuses.

## What PubNio supports in a Google plan

Beyond a name, an objective, and a budget, a Google plan needs:

- A campaign budget of at least 100,000 micros, in the account's currency; below it the dry run answers `budget_below_minimum`.
- `creative.providerSettings.headlines`: at least three, each up to 30 characters; fewer answer `headline_count` and a longer one `headline_length`.
- `creative.providerSettings.descriptions`: at least two, each up to 90 characters; fewer answer `description_count` and a longer one `description_length`.
- A campaign name of 3 to 255 characters; otherwise the dry run answers `name_length`.
- `creative.destinationUrl` on every ad; without it the dry run answers `destination_required`.

| Plan objective | Google receives |
| --- | --- |
| conversions, leads, sales, app_promotion | `MAXIMIZE_CONVERSIONS` bidding |
| awareness, reach, traffic, engagement, video_views | `TARGET_SPEND` bidding |

## Spend controls

- `ads.validateCampaignPlan` compiles the plan and checks account readiness, capabilities, budget, currency, and the spend policy without calling the provider.
- Activating a campaign takes `confirmation: "activate_spend"` from a signed-in workspace owner in the web app; an API key or an MCP session gets 403 `human_actor_required`.

## 1. Validate the plan (dry run)

```http
POST /api/v1/ads/campaigns/validate?workspaceId=3d9a1f20-7c4b-4e8a-9f61-2b5c8d7e0a14
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Burst pipe repair search",
  "objective": "conversions",
  "budget": {
    "amountMinor": 3000,
    "currency": "USD",
    "kind": "daily"
  },
  "targets": [
    {
      "accountId": "7f3c2a10-5b4e-4d6f-8a9b-0c1d2e3f4a5b"
    }
  ],
  "adGroups": [
    {
      "name": "Emergency plumber",
      "providerSettings": {
        "cpcBidMicros": 2500000
      },
      "ads": [
        {
          "name": "Same-day pipe repair",
          "creative": {
            "destinationUrl": "https://plumbing.example.com/emergency",
            "providerSettings": {
              "headlines": [
                "Burst Pipe? Call Now",
                "Plumber Here in 60 Minutes",
                "Licensed and Insured"
              ],
              "descriptions": [
                "Night and weekend callouts with upfront pricing.",
                "We shut off the water, fix the pipe, and dry the floor."
              ]
            }
          }
        }
      ]
    }
  ]
}
```

A ready account gets 200 with `valid: true` and no issues. Google's adapter checks every draft locally first.

## 2. Create it paused

Send the same plan with `Idempotency-Key: plan-google-ads-1`: PubNio answers 202 `queued`, and `ads.getOperation` reports when every level exists paused. The same key with the same plan returns the same `planId`; with another plan it gets 400 `idempotency_conflict`.

## Limits

- Only Search campaigns: PubNio does not create Performance Max, Display, Video, or Shopping campaigns.
- A plan with the objective `unknown` fails validation with `objective_unsupported`.

## Related

- [Google Ads through PubNio](https://pubnio.com/ads/google-ads)
- [All ad providers](https://pubnio.com/ads)
- API reference: [ads.createCampaignPlan](https://pubnio.com/docs/reference/ads-create-campaign-plan/)

