---
title: Get account audit logs (Version 2)
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Accounts](https://developers.cloudflare.com/api/typescript/resources/accounts)

[Logs](https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs)

[Audit](https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Get account audit logs (Version 2)

client.accounts.logs.audit.list(AuditListParams {account\_id, before, since, 26 more } params, RequestOptionsoptions?): CursorPaginationAfter< [AuditListResponse](<https://developers.cloudflare.com/api/typescript/resources/accounts#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)>) {id, account, action, 4 more } >

GET/accounts/{account\_id}/logs/audit

Gets a list of audit logs for an account.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Account Settings Write``Account Settings Read`

##### ParametersExpand Collapse

<details>

<summary>

params: AuditListParams {account\_id, before, since, 26 more }

</summary>

account\_id: string

Path param: The unique id that identifies the account.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

before: string

Query param: Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.

formatdate

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20before">Link to this property</a>

since: string

Query param: Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.

formatdate

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20since">Link to this property</a>

<details>

<summary>

id?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20id%20%3E%20(schema)">ID</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by their IDs.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20id%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20id">Link to this property</a>

<details>

<summary>

account\_name?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_name%20%3E%20(schema)">AccountName</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the account name.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_name%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_name">Link to this property</a>

<details>

<summary>

action\_result?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_result%20%3E%20(schema)">ActionResult</a>

Query param

</summary>

<details>

<summary>

not?: Array&lt;"success"| "failure"&gt;

Filters out audit logs by whether the action was successful or not.

</summary>

One of the following:

"success"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_result%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"failure"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_result%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_result%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_result">Link to this property</a>

<details>

<summary>

action\_type?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_type%20%3E%20(schema)">ActionType</a>

Query param

</summary>

<details>

<summary>

not?: Array&lt;"create"| "delete"| "view"| "update"&gt;

Filters out audit logs by the action type.

</summary>

One of the following:

"create"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"delete"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"view"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"update"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_type%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20action_type">Link to this property</a>

<details>

<summary>

actor\_context?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context%20%3E%20(schema)">ActorContext</a>

Query param

</summary>

<details>

<summary>

not?: Array&lt;"api"| "api\_key"| "api\_token"| 3 more&gt;

Filters out audit logs by the actor context.

- <code>api</code>: The action was performed through the API. The specific credential type was not recorded.
- <code>api_key</code>: The action was authenticated with a Cloudflare Global API Key.
- <code>api_token</code>: The action was authenticated with an API token.
- <code>dash</code>: The action was performed through the Cloudflare dashboard.
- <code>oauth</code>: The action was authenticated with an OAuth token.
- <code>origin_ca_key</code>: The action was authenticated with an Origin CA key.

</summary>

One of the following:

"api"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"api\_key"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"api\_token"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"dash"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"oauth"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

"origin\_ca\_key"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_context">Link to this property</a>

<details>

<summary>

actor\_email?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_email%20%3E%20(schema)">ActorEmail</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the actor’s email address.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_email%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_email">Link to this property</a>

<details>

<summary>

actor\_id?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_id%20%3E%20(schema)">ActorID</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the actor ID. This can be either the Account ID or User ID.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_id%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_id">Link to this property</a>

<details>

<summary>

actor\_ip\_address?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_ip_address%20%3E%20(schema)">ActorIPAddress</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs IP address where the action was initiated.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_ip_address%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_ip_address">Link to this property</a>

<details>

<summary>

actor\_token\_id?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_token_id%20%3E%20(schema)">ActorTokenID</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the API token ID when the actor context is an api\_token or oauth.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_token_id%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_token_id">Link to this property</a>

<details>

<summary>

actor\_token\_name?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_token_name%20%3E%20(schema)">ActorTokenName</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the API token name when the actor context is an api\_token or oauth.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_token_name%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_token_name">Link to this property</a>

<details>

<summary>

actor\_type?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_type%20%3E%20(schema)">ActorType</a>

Query param

</summary>

<details>

<summary>

not?: Array&lt;"account"| "cloudflare\_admin"| "delegated\_service"| 2 more&gt;

Filters out audit logs by the actor type.

</summary>

One of the following:

"account"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"cloudflare\_admin"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"delegated\_service"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"system"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

"user"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_type%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_type%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20actor_type">Link to this property</a>

<details>

<summary>

audit\_log\_id?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20audit_log_id%20%3E%20(schema)">AuditLogID</a>

Query param

</summary>

Deprecatednot?: Array&lt;string&gt;

Filters out audit logs by their IDs.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20audit_log_id%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20audit_log_id">Link to this property</a>

cursor?: string

Query param: The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result\_info structure of a previous response.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20cursor">Link to this property</a>

<details>

<summary>

direction?: "desc"| "asc"

Query param: Sets sorting order.

</summary>

One of the following:

"desc"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20direction%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"asc"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20direction%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20direction">Link to this property</a>

limit?: number

Query param: The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.

maximum1000

minimum1

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20limit">Link to this property</a>

product\_category?: Array&lt;string&gt;

Query param: Filters audit logs by one or more predefined product categories. Each product category expands into a curated set of resource\_product values and is unioned with any explicit resource\_product filter. Matched case-insensitively; unknown product categories return 400. Repeatable. Use the audit log product categories endpoint to discover the available values.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20product_category">Link to this property</a>

<details>

<summary>

raw\_cf\_ray\_id?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_cf_ray_id%20%3E%20(schema)">RawCfRayID</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the response CF Ray ID.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_cf_ray_id%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_cf_ray_id">Link to this property</a>

<details>

<summary>

raw\_method?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_method%20%3E%20(schema)">RawMethod</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the HTTP method for the API call.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_method%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_method">Link to this property</a>

<details>

<summary>

raw\_status\_code?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_status_code%20%3E%20(schema)">RawStatusCode</a>

Query param

</summary>

not?: Array&lt;number&gt;

Filters out audit logs by the response status code that was returned.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_status_code%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_status_code">Link to this property</a>

<details>

<summary>

raw\_uri?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_uri%20%3E%20(schema)">RawURI</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the request URI.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_uri%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20raw_uri">Link to this property</a>

<details>

<summary>

resource\_id?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_id%20%3E%20(schema)">ResourceID</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the resource ID.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_id%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_id">Link to this property</a>

<details>

<summary>

resource\_product?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_product%20%3E%20(schema)">ResourceProduct</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the Cloudflare product associated with the changed resource.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_product%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_product">Link to this property</a>

<details>

<summary>

resource\_scope?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_scope%20%3E%20(schema)">ResourceScope</a>

Query param

</summary>

<details>

<summary>

not?: Array&lt;"accounts"| "user"| "zones"| "memberships"&gt;

Filters out audit logs by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.

</summary>

One of the following:

"accounts"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_scope%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

"user"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_scope%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

"zones"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_scope%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

"memberships"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_scope%20%3E%20(schema)%20%3E%20(property)%20not%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_scope%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_scope">Link to this property</a>

<details>

<summary>

resource\_type?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_type%20%3E%20(schema)">ResourceType</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs based on the unique type of resource changed by the action.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_type%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20resource_type">Link to this property</a>

<details>

<summary>

zone\_id?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_id%20%3E%20(schema)">ZoneID</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the zone ID.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_id%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

<details>

<summary>

zone\_name?: <a href="https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_name%20%3E%20(schema)">ZoneName</a>

Query param

</summary>

not?: Array&lt;string&gt;

Filters out audit logs by the zone name associated with the change.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_name%20%3E%20(schema)%20%3E%20(property)%20not">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_name">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.logs.audit%20%3E%20(method)%20list%20%3E%20(params)%20default>)

##### ReturnsExpand Collapse

<details>

<summary>

AuditListResponse {id, account, action, 4 more }

</summary>

id?: string

A unique identifier for the audit log entry.

maxLength32

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

account?: Account {id, name }

Contains account related information.

</summary>

id?: string

A unique identifier for the account.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20account%20%3E%20(property)%20id">Link to this property</a>

name?: string

A string that identifies the account name.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20account%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20account">Link to this property</a>

<details>

<summary>

action?: Action {description, result, time, type }

Provides information about the action performed.

</summary>

description?: string

A short description of the action performed.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(property)%20description">Link to this property</a>

result?: string

The result of the action, indicating success or failure.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(property)%20result">Link to this property</a>

time?: string

A timestamp indicating when the action was logged.

formatdate-time

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(property)%20time">Link to this property</a>

type?: string

A short string that describes the action that was performed.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

<details>

<summary>

actor?: Actor {id, context, email, 4 more }

Provides details about the actor who performed the action.

</summary>

id?: string

The ID of the actor who performed the action. If a user performed the action, this will be their User ID.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

context?: "api"| "api\_key"| "api\_token"| 3 more

The context in which the action was initiated.

- <code>api</code>: The action was performed through the API. The specific credential type was not recorded.
- <code>api_key</code>: The action was authenticated with a Cloudflare Global API Key.
- <code>api_token</code>: The action was authenticated with an API token.
- <code>dash</code>: The action was performed through the Cloudflare dashboard.
- <code>oauth</code>: The action was authenticated with an OAuth token.
- <code>origin_ca_key</code>: The action was authenticated with an Origin CA key.

</summary>

One of the following:

"api"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20context%20%3E%20(member)%200">Link to this property</a>

"api\_key"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20context%20%3E%20(member)%201">Link to this property</a>

"api\_token"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20context%20%3E%20(member)%202">Link to this property</a>

"dash"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20context%20%3E%20(member)%203">Link to this property</a>

"oauth"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20context%20%3E%20(member)%204">Link to this property</a>

"origin\_ca\_key"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20context%20%3E%20(member)%205">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20context">Link to this property</a>

email?: string

The email of the actor who performed the action.

formatemail

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20email">Link to this property</a>

ip\_address?: string

The IP address of the request that performed the action.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20ip_address">Link to this property</a>

token\_id?: string

The API token ID when the actor context is an api\_token or oauth.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20token_id">Link to this property</a>

token\_name?: string

The API token name when the actor context is an api\_token or oauth.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20token_name">Link to this property</a>

<details>

<summary>

type?: "account"| "cloudflare\_admin"| "delegated\_service"| 2 more

The type of actor.

</summary>

One of the following:

"account"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20type%20%3E%20(member)%200">Link to this property</a>

"cloudflare\_admin"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20type%20%3E%20(member)%201">Link to this property</a>

"delegated\_service"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20type%20%3E%20(member)%202">Link to this property</a>

"system"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20type%20%3E%20(member)%203">Link to this property</a>

"user"

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20type%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20actor">Link to this property</a>

<details>

<summary>

raw?: Raw {cf\_ray\_id, method, status\_code, 2 more }

Provides raw information about the request and response.

</summary>

cf\_ray\_id?: string

The Cloudflare Ray ID for the request.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20raw%20%3E%20(property)%20cf_ray_id">Link to this property</a>

method?: string

The HTTP method of the request.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20raw%20%3E%20(property)%20method">Link to this property</a>

status\_code?: number

The HTTP response status code returned by the API.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20raw%20%3E%20(property)%20status_code">Link to this property</a>

uri?: string

The URI of the request.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20raw%20%3E%20(property)%20uri">Link to this property</a>

user\_agent?: string

The client’s user agent string sent with the request.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20raw%20%3E%20(property)%20user_agent">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20raw">Link to this property</a>

<details>

<summary>

resource?: Resource {id, product, request, 3 more }

Provides details about the affected resource.

</summary>

id?: string

The unique identifier for the affected resource.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20resource%20%3E%20(property)%20id">Link to this property</a>

product?: string

The Cloudflare product associated with the resource.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20resource%20%3E%20(property)%20product">Link to this property</a>

request?: unknown

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20resource%20%3E%20(property)%20request">Link to this property</a>

response?: unknown

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20resource%20%3E%20(property)%20response">Link to this property</a>

scope?: unknown

The scope of the resource.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20resource%20%3E%20(property)%20scope">Link to this property</a>

type?: string

The type of the resource.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20resource%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20resource">Link to this property</a>

<details>

<summary>

zone?: Zone {id, name }

Provides details about the zone affected by the action.

</summary>

id?: string

A string that identifies the zone id.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20zone%20%3E%20(property)%20id">Link to this property</a>

name?: string

A string that identifies the zone name.

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20zone%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20zone">Link to this property</a>

</details>

[Link to this property](<#(resource)%20accounts.logs.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)>)

### Get account audit logs (Version 2)

TypeScript

HTTPTypeScriptPythonGoTerraform

```
import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const auditListResponse of client.accounts.logs.audit.list({
  account_id: 'a67e14daa5f8dceeb91fe5449ba496ef',
  before: '2024-10-31',
  since: '2024-10-30',
})) {
  console.log(auditListResponse.id);
}
```

200 example

```
{
  "errors": [
    {
      "message": "message"
    }
  ],
  "result": [
    {
      "id": "023e105f4ecef8ad9ca31a8372d0c353",
      "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
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "message": "message"
    }
  ],
  "result": [
    {
      "id": "023e105f4ecef8ad9ca31a8372d0c353",
      "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
}
```