---
title: "Update Ad Campaign"
method: PUT
path: "/ad-campaigns/{campaign_id}"
tags: ["Ad Campaigns"]
---

# Update Ad Campaign

`PUT /ad-campaigns/{campaign_id}`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/ad-campaigns/{campaign_id}`
- Auth: HTTP bearer

Edit a LIVE campaign: budget, schedule, creative, keywords, ad copy,
targeting, pause or resume.

Omitted fields are left alone; an unknown field is a 422 (the app's model
forbids extras, so a typo cannot silently do nothing). Read
`GET /ad-campaigns/{campaign_id}/editable` first - the platform refuses
some changes on some campaign types and states.

A 200 is NOT blanket success: the response `status` is `partial` whenever
any single change failed, and `changes[]` says which.

## Path parameters

- `campaign_id` integer, required: The ad campaign's id.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- UpdateAdCampaignRequest: Body for ``PUT /campaigns/{id}`` and ``POST /campaigns/{id}/edit-preview``. ``extra="forbid"`` is load-bearing (PRD hazard H8): the model used to inherit Pydantic's default ``extra="ignore"``, so the wizard could POST a field the backend had never wired, get a 200, and render a green "Campaign updated" toast for an edit that reached nothing. An unknown field is now a 422 — a phantom control is structurally impossible to ship. List-shaped fields (``keywords``, ``rsa_headlines``, ``rsa_descriptions``, ``geo_targets``) are COMPLETE desired lists, never deltas. Google replaces repeated fields wholesale, so a partial list silently deletes the omitted entries; the handler read-modify-writes against the platform's current state. ``None`` means "not provided / unchanged" — an empty list is a real request to clear, and is rejected where clearing would break the ad.
  - `action` string, nullable
  - `name` string, nullable
  - `daily_budget` number, nullable
  - `end_date` string, date, nullable
  - `headline` string, nullable
  - `primary_text` string, nullable
  - `cta` string, nullable
  - `destination_url` string, nullable
  - `creative_image_url` string, nullable
  - `creative_image_url_square` string, nullable
  - `creative_image_url_portrait` string, nullable
  - `logo_image_url` string, nullable
  - `auto_pause_at` string, date-time, nullable: Absolute UTC instant to auto-pause at (ISO-8601 with offset)
  - `auto_pause_tz` string, nullable
  - `spend_cap` number, nullable
  - `clear_auto_stop` boolean
  - `keywords` object[], nullable: Google Search only: COMPLETE desired keyword list [{text, match_type, negative, paused, cpc_bid}]
  - `rsa_headlines` string[], nullable: Google Search only: COMPLETE list of 3-15 RSA headlines (<=30 chars each)
  - `rsa_descriptions` string[], nullable: Google Search only: COMPLETE list of 2-4 RSA descriptions (<=90 chars each)
  - `video_asset_ids` integer[], nullable: Google Video only: COMPLETE list of 1-5 ad_video_assets ids (None = unchanged)
  - `video_headlines` string[], nullable: Google Video only: COMPLETE list, 3-5 × ≤40
  - `video_long_headlines` string[], nullable: Google Video only: COMPLETE list, 3-5 × ≤90
  - `video_descriptions` string[], nullable: Google Video only: COMPLETE list, 3-5 × ≤90
  - `video_business_name` string, nullable: Google Video only: ≤25 chars
  - `video_cta` string, nullable: Google Video only: CallToActionType value
  - `selected_channels` object, nullable: Google Video only: COMPLETE placement map (7 DemandGenSelectedChannels keys)
  - `geo_targets` string[], nullable: Google only: COMPLETE list of geo target constant ids, e.g. ["2840"]
  - `campaign_negative_keywords` object[], nullable: Google only: COMPLETE desired campaign-level negative keywords [{text, match_type}]

## Response `200`

Successful Response

- ApiResponseAdPayload
  - `data` AdPayload, required: One ad-platform object, or one handler response.
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
