List Audit Logs
List audit logs for the authenticated ad account.
Review changes to campaigns, ad groups, ads, and other resources in the ad account associated with your Ads API key.
Use Ads API-key authentication. This endpoint does not accept Ads OAuth access tokens.
Use resource IDs returned by the API, without a partition prefix, for
campaign_id, ad_group_id, and ad_id. When you provide multiple filters,
only entries that match all of them are returned. Time filters accept values
from 946684800 through 4102444800.
Pass last_id as after to request the next page, or first_id as before
to request the previous page. The has_more value indicates whether more
results exist in the requested direction: forward for after, backward for
before. On the first page, it indicates whether a next page exists. Keep the
same filters and order when moving between pages.
Use audit-log IDs, not resource IDs, as cursors. Do not send after and
before together. An invalid cursor returns HTTP 400 with the message
"Invalid pagination cursor."
changes depends on the event type. For an updated name, it can contain
"name": {"before": "Previous name", "after": "New name"}.
List Audit Logs
curl https://api.ads.openai.com/v1/audit_logs \
-H "Authorization: Bearer $OPENAI_ADS_API_KEY"{
"data": [
{
"id": "id",
"actor_id": "actor_id",
"actor_type": "actor_type",
"ad_group_id": "ad_group_id",
"audit_log_type": "audit_log_type",
"campaign_id": "campaign_id",
"changes": {},
"hierarchy_info": {},
"item_name": "item_name",
"obj_id": "obj_id",
"obj_type": "obj_type",
"ts": 0
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id",
"object": "object"
}Query Parameters
Audit-log ID from last_id to continue forward in the current order. Keep filters and order unchanged; do not also send before.
Audit-log ID from first_id to page backward in the current order. Do not also send after.
Object ID of the campaign. Includes logs for the campaign and its ad groups and ads.
Returns Examples
{
"data": [
{
"id": "id",
"actor_id": "actor_id",
"actor_type": "actor_type",
"ad_group_id": "ad_group_id",
"audit_log_type": "audit_log_type",
"campaign_id": "campaign_id",
"changes": {},
"hierarchy_info": {},
"item_name": "item_name",
"obj_id": "obj_id",
"obj_type": "obj_type",
"ts": 0
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id",
"object": "object"
}