> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Ad Group

> Updates an X (Twitter) Ads ad group (line item) with a raw fields payload; only provided fields are changed

Updates an X (Twitter) Ads ad group (line item) with a raw fields payload; only provided fields are changed. Covers bidding, goals, budgets, schedule, pacing, frequency caps, and app identifiers. Prefer the dedicated status/rename/budget operations for plain changes.

|                       |                         |
| --------------------- | ----------------------- |
| **App**               | X Ads                   |
| **Operation ID**      | `x_ads_update_ad_group` |
| **Type**              | Action                  |
| **Connection**        | `x_ads` (required)      |
| **Credits per run**   | 1                       |
| **Agent / MCP tool**  | Yes                     |
| **Requires approval** | Yes (write operation)   |

## Inputs

| Field            | Type                 | Required | Default | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------- | -------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account`        | DynamicAccount       | Yes      | -       | Select the X Ads account that owns the ad group.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `ad_group_id`    | string or SelectItem | Yes      | -       | X Ads ad group (line item) ID to update. Do not repeat it inside update\_payload.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `update_payload` | object or string     | Yes      | -       | Ad group fields to update as a JSON object; only the fields you include are changed, and a null value unsets an optional attribute. Editable fields per the X Ads docs: name, entity\_status (ACTIVE or PAUSED), start\_time and end\_time (ISO 8601), bid\_strategy (AUTO, MAX, TARGET), bid\_amount\_local\_micro (raw micro-currency integer, required for MAX or TARGET), goal, pay\_by, daily\_budget\_amount\_local\_micro, total\_budget\_amount\_local\_micro, standard\_delivery (true = even pacing), frequency\_cap with duration\_in\_days (1, 7, or 30), audience\_expansion (BROAD, DEFINED, EXPANDED), categories, advertiser\_domain, android\_app\_store\_identifier, ios\_app\_store\_identifier, and primary\_web\_event\_tag. Prefer the dedicated operations for plain changes: x\_ads\_update\_ad\_group\_status, x\_ads\_rename\_ad\_group, x\_ads\_update\_ad\_group\_budget. Example: \{"bid\_strategy": "MAX", "bid\_amount\_local\_micro": 2000000, "end\_time": "2026-09-30T00:00:00Z"} |
| `dry_run`        | boolean              | No       | `False` | When true, do not call X. Return the resolved request parameters for review.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

### SelectItem

| Field   | Type   | Required | Default | Description                                                                                          |
| ------- | ------ | -------- | ------- | ---------------------------------------------------------------------------------------------------- |
| `value` | string | Yes      | -       | The value of the selectable item.                                                                    |
| `label` | string | Yes      | -       | The label of the selectable item, used for display purposes. If not provided, defaults to the value. |

## Output

**Type**: `Dict`

Returns the updated fields, resolved request parameters, and the updated ad group object.

**Fields**: dynamic (depend on the inputs)
