> For the complete documentation index, see [llms.txt](https://docs.mailtrap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailtrap.io/account-and-organization/privacy-and-security/activity-log.md).

# User Audit Logs

Track user activities and actions in your Mailtrap account for security, transparency, and user management purposes.

User Audit Log automatically tracks the activities and actions performed by users within your account. It's a stream of events, logging actions taken and indicating who performed them, which is used for security purposes.

{% hint style="warning" %}
This feature is available to Enterprise plan users only.
{% endhint %}

## How to view User Audit Log

To view the Audit Log:

1. Log in to your Mailtrap account.
2. Click on **Settings** in the left-side menu and select **Audit Log**.

Once you're on the Audit Log page, you'll be able to see the activities performed by users:

<div align="left" data-with-frame="true"><figure><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FgdaeApdTvHp7oSm8Qg5G%2FSCR-20261003-uisv.png?alt=media&amp;token=40bcf43b-96f6-4540-8dc1-4b7cc9efbc41" alt="Mailtrap Activity Log page showing user actions with Actor, Description, Resource and Date columns" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
Events start saving the moment you upgrade to Enterprise plan.
{% endhint %}

## User Audit Log event examples

In the Audit Log, you can see events such as:

* John Doe added a domain.
* John Doe created the field First Name.
* John Doe deleted a sandbox QA.
* John Doe invited the user <email@example.com> to the account.
* Someone attempted to log in to the user John Doe using GitHub.
* John Doe removed the webhook Logging from Transactional.

## Why should you use the User Audit Log?

Some of the reasons you should use the Audit Log include:

* **Security** – With events being tracked automatically, you can easily debug and investigate security incidents.
* **Transparency** – See what's happening in your account in real time by having a transparent overview of actions performed by users.
* **User management** – Monitor how your team members are interacting with Mailtrap services.

## Using User Audit Log with Mailtrap Webhooks

You can also pair the Audit Log with Mailtrap Webhooks and build an integration to monitor activities live.

Here's what you need to do:

1. Navigate to **Webhooks** and click on **Create New Webhook**.

<div align="left" data-with-frame="true"><figure><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2F0LUyl6g7DM5LHbM8nItD%2FSCR-20261006-shdq.png?alt=media&amp;token=e188ea9a-5f69-40b1-90db-1ecefcde08a9" alt="Mailtrap Webhooks settings page with Create New Webhook button highlighted" width="563"><figcaption></figcaption></figure></div>

2. Enter your unique webhook URL, choose the Payload format, and select Audit Log.

<div align="left" data-with-frame="true"><figure><img src="https://1476453098-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS3xyr7ba7aGO19rc8dSK%2Fuploads%2FlagtxpTTd5NMhtEVMSdr%2FSCR-20261006-silp.png?alt=media&amp;token=1a43c627-ef53-4d70-a5ca-4c4d9ea806f3" alt="Add new webhook form with Activity Log selection and JSON payload example" width="563"><figcaption></figcaption></figure></div>

Now you can build an integration to monitor activities live, increasing your security measures.

Here's an example of a webhook payload:

{% code title="Audit Log webhook payload" %}

```json
{
  "events": [
    {
      "event": "activity_log.user.updated",
      "description": "updated the user profile",
      "actor": {
        "id": 783,
        "type": "user",
        "name": "Jane Doe"
      },
      "resource": {
        "id": "783",
        "type": "user",
        "name": "Jane Doe"
      },
      "changes": {
        "name": {
          "to": "[FILTERED]",
          "from": "[FILTERED]"
        }
      },
      "timestamp": 1733739084
    }
  ]
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mailtrap.io/account-and-organization/privacy-and-security/activity-log.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
