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

# Get Account History

> Retrieves the change history of one X Ads entity (campaign, ad group, ad, targeting criteria, or promoted account), showing what changed and when

Retrieves the change history of one X Ads entity (campaign, ad group, ad, targeting criteria, or promoted account), showing what changed and when. This X endpoint is in beta and requires X to allowlist the app, otherwise it returns an access error.

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

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `account` | DynamicAccount | Yes | - | Select the X Ads account that owns the entity. |
| `entity_type` | enum (`CAMPAIGN`, `LINE_ITEM`, `PROMOTED_TWEET`, `TARGETING_CRITERIA`, `PROMOTED_ACCOUNT`) | Yes | - | The kind of entity to retrieve change history for: CAMPAIGN, LINE\_ITEM (ad group), PROMOTED\_TWEET (ad), TARGETING\_CRITERIA, or PROMOTED\_ACCOUNT. |
| `entity_id` | string or SelectItem | Yes | - | The specific entity's ID. X returns change history per entity rather than for the whole account. |
| `time_range` | string or SelectableOption | No | `{'value': 'last_7_days', 'label': 'Last 7 days'}` | Period to retrieve history for: 'last\_30\_days', 'last\_14\_days', 'last\_7\_days' (default), 'today', or 'yesterday'. |
| `limit` | integer | No | `100` | Maximum number of history records to return. Default: 100. |

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

### SelectableOption

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `value` | string | Yes | - | |
| `label` | string | Yes | - | |

## Output

**Type**: `List[Dict]`

Returns the change history records for the entity.

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.