Audit Logs - version 2 (2)·续
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.resultis 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). 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 initiated by users through Cloudflare interfaces, including the dashboard and API. These logs capture who or what performed the action. They also record when it occurred and which resource was affected. User-initiated actions can have four actor types:
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 documentation for more information.actor_type="delegated_service": Action was performed by a Cloudflare service acting on a user's behalf. The log does not identify the initiating user.
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. These logs capture user-initiated actions performed by Org Admins through organization-level APIs.
You can retrieve Organization audit logs using either the API or the Cloudflare dashboard.
API access
Retrievable via the Audit Logs v2 API:
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.
<details>
<summary>
Required API token permissions
</summary>
At least one of the following <a href="https://developers.cloudflare.com/fundamentals/api/reference/permissions/">token permissions</a> is required:
- <code>Account Settings Write</code>
- <code>Account Settings Read</code>
</details>
Get account audit logs (Version 2)bash
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/logs/audit" \
--request GET \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
Example responsejson
{
"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 or what performed the action. Its identity attributes depend on the actor type. These attributes can include a user ID, email address, and IP address. Actor types include user, account, cloudflare_admin, delegated_service, or system. An actor can also include the context used to initiate the action:
api: The action was performed through the API. The specific credential type was not recorded.api_key: The action was authenticated with a Cloudflare Global API Key.api_token: The action was authenticated with an API token.dash: The action was performed through the Cloudflare dashboard.oauth: The action was authenticated with an OAuth token.origin_ca_key: The action was authenticated with an Origin CA key.
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 are recorded for supported endpoints and are available through the Audit Logs v2 API and Logpush. The dashboard excludes view actions by default. For details, refer to View actions.
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
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/fundamentals/account/account-security/audit-logs/#page","headline":"Audit Logs - version 2","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/fundamentals/account/account-security/audit-logs/og.png?v=86ea1f6eba2914ff","dateModified":"2026-10-22","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/"}}
description: View and revoke active account sessions. title: Review active sessions image: https://developers.cloudflare.com/learning-paths/application-security/account-security/review-active-sessions/og.png?v=fcb7f0776274a5b2
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/learning-paths/llms.txt
Use this file to discover all available pages before exploring further.
Docs