Account History
account-history

Account History

GET accounts/:account_id/account_history

Retrieve a summary of changes made to the entity_id specified in the request.

Note: This endpoint is currently in beta and requires allowlisting.

Resource URL

https://ads-api.x.com/12/accounts/:account_id/account_history

Parameters

Name Description
account_id
required
The identifier for the leveraged account.

Type: string

Example: 18ce54d4x5t
count
optional
Specifies the number of records to try and retrieve per distinct request.

Type: int

Default: 200
Min, Max: 1, 1000
cursor
optional
Specifies a cursor to get the next page of results. See Pagination for more information.

Type: string

Example: 8x7v00oow
entity_type
required
The entity type to retrieve data for.

Type: enum

Example: PROMOTED_TWEET
Possible values: CAMPAIGN, LINE_ITEM, PROMOTED_TWEET, TARGETING_CRITERIA, PROMOTED_ACCOUNT
entity_id
required
The specific entitiy to retrieve data for.

Type: string

Example: 8u94t
start_time
required

Scopes the retrieved data to the specified start time, expressed in ISO 8601.

Note: Must be expressed in whole hours (0 minutes and 0 seconds).

Type: string

Example: 2017-05-19T07:00:00Z

end_time
required

Scopes the retrieved data to the specified end time, expressed in ISO 8601.

Note: Must be expressed in whole hours (0 minutes and 0 seconds).

Type: string

Example: 2017-05-26T07:00:00Z

user_id
optional
Scopes the response to a specific user.

Type: long

Example: 3271358660

Example Request

GET https://ads-api.x.com/12/accounts/18ce54d4x5t/account_history?entity_type=CAMPAIGN&entity_id=fc3h5&count=1

Example Response

{
  "request": {
    "params": {
      "account_id": "18ce54d4x5t",
      "entity": "CAMPAIGN",
      "entity_id": "fc3h5",
      "count": 1
    }
  },
  "next_cursor": "1r2407sb4lc",
  "data": [
    {
      "change_by": {
        "user_id": "982978172",
        "platform": "API_OTHER"
      },
      "changes": {},
      "change_time": "2021-04-02T20:55:42Z",
      "entity_id": "fc3h5",
      "entity": "CAMPAIGN",
      "entity_data": {
        "name": "test_campaign",
        "start_time": "2021-04-02T18:59:11Z",
        "purchase_order_number": null,
        "daily_budget_amount_local_micro": 100000000,
        "end_time": null,
        "duration_in_days": null,
        "standard_delivery": true,
        "total_budget_amount_local_micro": 100000000,
        "entity_status": "ACTIVE",
        "frequency_cap": null,
        "created_at": "2021-04-02T20:55:42Z",
        "updated_at": "2021-04-02T20:55:42Z",
        "deleted": false
      },
      "change_type": "CREATE"
    }
  ]
}