# Audit Logs

An **audit log** object provides information about the action and user that initiated the changes and the old and new values, where applicable.

The API allows you to retrieve audit logs for a given client, action, resource, or trigger.

### The Audit Log object

<table><thead><tr><th width="219">Attribute</th><th width="129.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td>string</td><td>The unique identifier for an audit log.</td></tr><tr><td><code>memberId</code></td><td>string</td><td>The <a href="/pages/-ME251F6qEQmQvSxlsC_">team member</a> whose actions triggered the audit log creation.</td></tr><tr><td><code>resourceType</code></td><td>string</td><td><p>The type of audited resource. Valid values include:<br></p><ol><li><code>accessRestrictionList</code></li><li><code>accountServiceSettings</code></li><li><code>address</code></li><li><code>allowedIps</code></li><li><code>apiKeys</code></li><li><code>autofill</code></li><li><code>bannedFace</code> </li><li><code>check</code> </li><li><code>client</code></li><li><code>companyLookup</code></li><li><code>customList</code></li><li><code>document</code></li><li><code>otpEmail</code></li><li><code>otpSMS</code></li><li><code>workflow</code></li><li><code>workflowTemplate</code></li><li><code>workflowSession</code></li></ol></td></tr><tr><td><code>resourceId</code></td><td>string</td><td>The id of the audited resource.</td></tr><tr><td><code>clientId</code></td><td>string</td><td>The id of the client associated with the audited resource.</td></tr><tr><td><code>trigger</code></td><td>string</td><td>The event that triggered the audit log creation, e.g. updateClient.</td></tr><tr><td><code>action</code></td><td>string</td><td><p>The type of action. Possible values are: </p><ol><li><code>create</code></li><li><code>update</code></li><li><code>delete</code></li><li><code>add</code></li></ol></td></tr><tr><td><code>diff</code></td><td>array[object]</td><td>The diff between the old and new values of the audited resource. Also, see the <a href="/pages/-MDyzD8u-FSmC269N6rV#the-diff-object">diff</a> object below.</td></tr><tr><td><code>createdAt</code></td><td>string</td><td>The date and time when the audit log was created.</td></tr></tbody></table>

#### The `diff` object

<table><thead><tr><th width="221.4">Attribute</th><th width="131">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>action</code></td><td>string</td><td><p>Indicates the kind of change. Possible values are: </p><ol><li><code>new</code> - indicates a newly added attribute/element.</li><li><code>delete</code> - indicates an attribute/element was deleted.</li><li><code>update</code> - indicates an attribute/element was updated.</li><li><code>add</code> - indicates a change occurred within an array.</li></ol></td></tr><tr><td><code>path</code></td><td>array[string]</td><td>The left-to-right path of the attribute in the audited resource e.g. <code>['personDetails', 'firstName']</code> indicates that firstName within the personDetails object is the attribute affected by the action.</td></tr><tr><td><code>old</code></td><td>string</td><td>The old value of the audited attribute.</td></tr><tr><td><code>new</code></td><td>string</td><td>The new value of the audited attribute.  When <code>action</code> is new, the type of <code>new</code> is <code>object</code> rather than <code>string</code></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.complycube.com/documentation/api-reference/other-resources/audit-logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
