---
description: Use Cloudflare Audit Logs v2 to track user-initiated and system-initiated actions across your account via the dashboard, API, or Logpush.
title: Audit Logs - version 2
image: https://developers.cloudflare.com/og-docs.png
---

[Skip to content](#main-content)

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

# Audit Logs - version 2

Last updated Aug 24, 2026|Copy as Markdown|[View as Markdown](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/fundamentals/account/account-security/audit-logs/index.md)|[Agent setup](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/agent-setup/)

Cloudflare Audit Logs are account-based. All user-initiated actions are recorded automatically across both the Cloudflare API and dashboard. System-initiated logs are also captured to reflect actions taken automatically by Cloudflare systems, such as configuration updates, background processes, or internal policy enforcement.

When a user-initiated action triggers additional automated behavior, corresponding system-initiated logs will be generated. In some cases, user-initiated logs include additional enrichments that provide more context about what was changed, offering deeper visibility into the full lifecycle of the action.

When an action occurs, it is streamed through Cloudflare's audit logging pipeline and stored. This ensures consistent visibility into activity across all products.

For more detailed information about how the user-initiated actions are logged automatically, refer to the [Cloudflare Blog ↗](https://blog.cloudflare.com/introducing-automatic-audit-logs/).

Note

A transition plan from Audit Logs v1 to Audit Logs v2 will be communicated in due course.

## Key features

Audit Logs (version 2) provide a unified and standardized system for tracking and recording actions across Cloudflare products. This system enhances transparency and accountability by offering comprehensive insights into user-initiated and system-initiated activities within your Cloudflare environment.

* **Standardized logging**: Audit logs are automatically generated in a consistent format across all Cloudflare services, ensuring uniformity and eliminating inconsistencies.
* **Expanded product coverage**: Audit Logs covers \~95% of Cloudflare products, capturing actions from key endpoints, such as `/accounts`, `/zones`, `/user`, and `/memberships` APIs.
* **Granular filtering**: Uniformly formatted logs allow for precise filtering by actions, actors, methods, and resources, facilitating efficient investigations.
* **Enhanced context and transparency**: Each log entry includes detailed context, such as the authentication method used, the interface (API or dashboard) through which the action was performed, and mappings to Cloudflare Ray IDs for improved traceability.
* **Comprehensive activity capture**: Audit Logs records create, update, and delete actions across all supported products. Selective logging of `GET` requests for sensitive read operations is planned for a future release.

## Retention

* Audit logs are retained for 18 months before being deleted. No additional setup is required.
* In the Audit Logs v2 UI, queries are limited to the most recent 90 days for performance reasons. To access the full 18 months of data, use the API or [Logpush](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/logs/logpush/).
* Enterprise customers can use [Logpush](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/logs/logpush/) to store audit logs beyond 18 months.

Note

Approximately 30 days of logs from the Beta period (back to \~February 8, 2026) are available at GA. These Beta logs will expire on \~April 9, 2026\. Logs generated after GA will be retained for the full 18 months. Older logs remain available in Audit Logs v1.

## Access Audit Logs

You can retrieve audit logs using the Cloudflare dashboard, the API, or Logpush.

### API

Audit Logs are available through the Cloudflare API. To retrieve audit logs, use the following endpoint:

```bash
https://api.cloudflare.com/client/v4/accounts/{account_id}/logs/audit
```

Below is an example request to retrieve audit logs for a certain period of time along with its corresponding response. Replace the example values in the URL with your actual values:

* `account_id`: Your Cloudflare account identifier.
* `since` (required): Start date for the audit log retrieval. Accepts `yyyy-mm-dd` (interpreted as UTC) or RFC3339 timestamp (`yyyy-mm-ddTHH:MM:SSZ`).
* `before` (required): End date for the audit log retrieval. Same format as `since`.

```bash
GET https://api.cloudflare.com/client/v4/accounts/1234567890abcdef/logs/audit?since=2025-03-01T00:00:00Z&before=2025-03-26T23:59:59Z
```

```json
{
	"result": [
		{
			"action": "zone.settings.change",
			"actor": {
				"email": "user@example.com",
				"id": "0987654321abcdef"
			},
			"ip": "192.0.2.1",
			"method": "PUT",
			"interface": "dashboard",
			"resources": [
				{
					"resource_id": "zone123",
					"resource_type": "zone"
				}
			],
			"timestamp": "2025-03-15T14:25:37Z"
		}
		// Additional log entries
	],
	"success": true,
	"errors": [],
	"messages": []
}
```

For more information refer to the [API documentation ↗](https://developers.cloudflare.com/api/resources/accounts/subresources/logs/subresources/audit/methods/list/#%28params%29%20default%20%3E%20%28param%29%20since%20%3E%20%28schema%29).

### Dashboard

To access audit logs in the Cloudflare dashboard, go to **Manage Account** \> **Audit Logs**.

[Go to **Audit logs** ↗](https://dash.cloudflare.com/?to=/:account/audit-log)

Note

The Audit Logs v2 is shown by default. You can switch between Audit Logs v2 and v1 as needed.

### Logpush

Note

For customers who already have a Logpush job set up for Audit Logs v1, note that a separate Logpush job must be configured for [Audit Logs v2](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/logs/logpush/logpush-job/datasets/account/audit%5Flogs%5Fv2/) (dataset). We will communicate the timeline for when Logpush Audit Logs v1 will be deprecated and turned off.

To create a Logpush job:

1. In the Cloudflare dashboard, go to the **Logpush** page.  
[Go to **Logpush** ↗](https://dash.cloudflare.com/?to=/:account/logs)
2. Select **Create a Logpush job**.
3. In **Select a destination**, select the destination of your choice and add the destination details.
4. In the datasets section, select the [Audit Logs v2 dataset](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/logs/logpush/logpush-job/datasets/account/audit%5Flogs%5Fv2/). Audit Logs v2 is an account-based dataset.
5. Once you are done configuring your logpush job, select **Submit**.

## Resource History

Resource History shows what changed on every configuration modification captured in Audit Logs. For any audit log entry, you can see the sequence of previous changes to the same resource and view a side-by-side diff of what was modified.

Resource History is available in the Cloudflare dashboard and via the Audit Logs API. It uses the audit log entries you already have. There is no additional configuration, no backend recapture, and no changes to how audit logs are generated.

### What Resource History gives you

For any audit log entry, Resource History retrieves every other audit log entry for the same resource, ordered chronologically. You can then pick an earlier entry from that history to see exactly which fields changed between the two.

### Use Resource History in the dashboard

1. Go to **Manage Account** \> **Audit Logs**.
2. Open any audit log entry.
3. Select the **History** tab to see the full history for the resource that entry describes.
4. In the history view, select any earlier entry to see a side-by-side diff of the fields that changed between it and the current entry.

When Resource History cannot identify the underlying resource (for example, for certain system-initiated events), the dashboard shows an empty state indicating that change history is not available for that entry.

### Use Resource History via the API

You can retrieve the change history for any audit log entry using the History endpoint. Given the `id` of a source audit log entry, the endpoint derives identifying filters from that entry and returns matching audit log entries within a date window you specify.

For account-scoped audit logs, use:

```bash
GET https://api.cloudflare.com/client/v4/accounts/{account_id}/logs/audit/{id}/history
```

For organization-scoped audit logs, use:

```bash
GET https://api.cloudflare.com/client/v4/organizations/{organization_id}/logs/audit/{id}/history
```

The `{id}` path parameter is the `id` of the source audit log entry whose resource history you want to retrieve.

Required API token permissions

At least one of the following [token permissions](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/fundamentals/api/reference/permissions/) is required:

* `Account Settings Read`
* `Account Settings Write`

The endpoint requires three query parameters:

* `action_time` (required): RFC3339 timestamp of the source audit log entry's action time. Provide the `action.time` value from the audit log identified by `{id}`. This narrows the source-entry lookup window.
* `since` (required): Limits returned results to entries newer than this date. Accepts a date string (`2024-10-30`, interpreted as UTC) or an RFC3339 timestamp.
* `before` (required): Limits returned results to entries older than this date. Same format as `since`.

Optional query parameters:

* `direction`: `desc` (default) or `asc`.
* `limit`: Number of entries to return per page. Default `100`.
* `cursor`: Pagination cursor from a previous response's `result_info.cursor`.

Required API token permissions

At least one of the following [token permissions](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/fundamentals/api/reference/permissions/) is required:
* `Account Settings Write`
* `Account Settings Read`

```bash
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/logs/audit/$ID/history" \
	--request GET \
	--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
```

Each entry in `result` has the same shape as an entry returned by the Audit Logs list endpoint. Results are paginated using the `cursor` value in `result_info`.

The `result_info.history_status` field indicates the quality of resource identification used to build the history:

* `exact`: The source entry contained a resource URI, so the history was built from an exact resource match.
* `approximate`: The source entry did not contain a resource URI, so the history was built from an approximate match (other resources of the same product and type). The dashboard surfaces this state with a warning banner.
* `unavailable`: The source entry did not contain enough information to identify the resource. `result` is empty. This can happen for certain system-initiated events.

Resource History reflects the audit log entries currently retained by Audit Logs v2 (refer to [Retention](#retention)). Entries older than the retention window are not returned. Resource History is a query-time capability and is not exposed as additional fields in the `audit_logs_v2` Logpush dataset.

## Audit Log structure

Cloudflare's audit logs offer a detailed view of activity across your environment by capturing both the source of actions and the context in which they occur. These logs are categorized by who initiated the action (user or system) and whether the activity occurred within a specific account or spanned multiple accounts under the same user profile. This structure enables flexible filtering, investigation, and compliance monitoring.

### Initiation type

Audit logs can be initiated either by users or the system. Understanding the type of actor involved helps in identifying the source and intent of actions.

#### User initiated Audit Logs

Track actions performed directly by users through Cloudflare interfaces (dashboard or API). These logs capture who performed the action, when it occurred, and what resource was affected. User initiated actions can be performed by three actors:

* `actor_type="user"`: Action was performed by an individual user.
* `actor_type="Cloudflare_admin"`: Action was performed by Cloudflare.
* `actor_type="account"`: Action was performed using an account API token. Refer to the [Account API tokens](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/fundamentals/api/get-started/account-owned-tokens/) documentation for more information.

#### System initiated Audit Logs

Record changes made automatically by Cloudflare systems, without direct user input. These logs provide visibility into internal processes, automated tasks, and security events. Some entries may include associated user context for traceability (`actor_type="system"`).

### Activity Scope

#### Account Activity Logs

Contain events scoped to a single Cloudflare account. These logs are filterable by `account ID` and reflect actions within that account only. You can optionally filter events further using the `resource_scope` field, which specifies whether the resource is associated with a user, an account, or a zone (`resource_scope ="user"`, `resource_scope ="accounts"`, or `resource_scope ="zones"`).

#### User Profile Activity Logs

Reflect actions associated with a user's login (email) across multiple accounts. These logs enable cross-account tracking and can be filtered by `user ID` or `email`. They are visible on any account the user had access to at the time of the activity. User Profile Activity Logs can be filtered using `resource_scope ="user"`.

The `GET /memberships` endpoint supports cross-account access. To query memberships, use the parameter `resource_scope=memberships`.

#### Organization Activity Logs

Contain events scoped to specific [Cloudflare Organizations](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/fundamentals/organizations/). These logs capture user-initiated actions performed by Org Admins through organization-level APIs.

Note

Cloudflare Organizations is Enterprise-only and currently in public beta.

You can retrieve Organization audit logs using either the API or the Cloudflare dashboard.

##### API access

Retrievable via the Audit Logs v2 API:

```bash
GET https://api.cloudflare.com/client/v4/organizations/{organization_id}/logs/audit
```

##### Dashboard access

To access organization audit logs in the Cloudflare dashboard, go to **Organizations** \> _(select your organization)_ \> **Manage Organization** \> **Audit Logs**.

If you are viewing account-level audit logs and the account belongs to an organization where you are an Organization Super Administrator, you can navigate to the parent organization's audit logs using the **View Organization Audit Logs** button.

Note

Organization-level audit logs are separate from account-level audit logs. Actions performed within a specific account continue to be available via the account-level Audit Logs UI, Audit Logs v2 API, and Logpush.

This release covers user-initiated actions only. Support for system-initiated actions and Logpush for organizations will be added in future releases.

## Example how to query Audit Logs

Use the following example to get a list of audit logs for a Cloudflare account.

Required API token permissions

At least one of the following [token permissions](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/fundamentals/api/reference/permissions/) is required:
* `Account Settings Write`
* `Account Settings Read`

```bash
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/logs/audit" \
	--request GET \
	--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
```

```json
{
	"errors": [
		{
			"message": "message"
		}
	],
	"result": [
		{
			"account": {
				"id": "4bb334f7c94c4a29a045f03944f072e5",
				"name": "Example Account"
			},
			"action": {
				"description": "Add Member",
				"result": "success",
				"time": "2024-04-26T17:31:07Z",
				"type": "create"
			},
			"actor": {
				"id": "f6b5de0326bb5182b8a4840ee01ec774",
				"context": "dash",
				"email": "alice@example.com",
				"ip_address": "198.41.129.166",
				"token_id": "token_id",
				"token_name": "token_name",
				"type": "user"
			},
			"raw": {
				"cf_ray_id": "8e9b1c60ef9e1c9a",
				"method": "POST",
				"status_code": 200,
				"uri": "/accounts/4bb334f7c94c4a29a045f03944f072e5/members",
				"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) Safari/605.1.15"
			},
			"resource": {
				"id": "id",
				"product": "members",
				"request": {},
				"response": {},
				"scope": {},
				"type": "type"
			},
			"zone": {
				"id": "id",
				"name": "example.com"
			}
		}
	],
	"result_info": {
		"count": "1",
		"cursor": "ASqdKd7dKgxh-aZ8bm0mZos1BtW4BdEqifCzNkEeGRzi_5SN_-362Y8sF-C1TRn60_6rd3z2dIajf9EAPyQ_NmIeAMkacmaJPXipqvP7PLU4t72wyqBeJfjmjdE="
	},
	"success": true
}
```

## Common terms and definitions

### Actor

The actor represents who performed the action. It includes identity attributes like user ID, email address, IP address, and the type of actor (`user`, `account`, `Cloudflare_admin`, or `system`). It also includes the context used to initiate the action, such as API or dashboard (`dash`).

### Action

The action field captures the nature of the event and whether it was successful. It includes a high-level type (e.g., `create`, `update`, `delete`), a specific description (such as `SSO_LOGIN`), the timestamp of when the action occurred, and the result (`success` or `failure`).

`view` actions correspond to `GET` requests. These are defined in the schema but not currently captured in Audit Logs. Selective `GET` logging for sensitive read operations is planned for a future release.

### Account

This field refers to the Cloudflare account under which the action was executed. It includes a unique account ID and a human-readable account name to help associate activity with a customer environment.

### Resource

The resource identifies the object impacted by the action. It includes the resource type, the unique resource ID, the scope (`user`, `account`, or `zone`), and optionally the product associated with the change.

### Audit Log ID

This is a unique identifier for the log record itself. It can be used for deduplication, correlation, or referencing specific actions during investigations.

Was this helpful?

YesNo

## On this page

[![](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/fundamentals/account/account-security/audit-logs/#page","headline":"Audit Logs - version 2 · Cloudflare Fundamentals docs","description":"Use Cloudflare Audit Logs v2 to track user-initiated and system-initiated actions across your account via the dashboard, API, or Logpush.","url":"https://developers.cloudflare.com/fundamentals/account/account-security/audit-logs/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","dateModified":"2026-08-24","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
