> ## 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 Campaign

> Updates an X (Twitter) Ads campaign with a raw fields payload; only provided fields are changed

Updates an X (Twitter) Ads campaign with a raw fields payload; only provided fields are changed. Prefer x\_ads\_update\_campaign\_status, x\_ads\_rename\_campaign, and x\_ads\_update\_campaign\_budget for plain changes.

|                       |                         |
| --------------------- | ----------------------- |
| **App**               | X Ads                   |
| **Operation ID**      | `x_ads_update_campaign` |
| **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 campaign.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `campaign_id`    | string or SelectItem | Yes      | -       | X Ads campaign ID to update. Do not repeat it inside update\_payload.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `update_payload` | object or string     | Yes      | -       | Campaign 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 (up to 255 chars), entity\_status (ACTIVE or PAUSED), daily\_budget\_amount\_local\_micro and total\_budget\_amount\_local\_micro (raw micro-currency integers, e.g. 5500000 = 5.50 in the account currency), and purchase\_order\_number (up to 50 chars). Prefer the dedicated operations for plain changes: x\_ads\_update\_campaign\_status, x\_ads\_rename\_campaign, x\_ads\_update\_campaign\_budget. Example: \{"total\_budget\_amount\_local\_micro": 100000000, "purchase\_order\_number": "PO-123"} |
| `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 campaign object.

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