# Audit log

> See who changed what in your organization: members, invitations, settings, environments, VMs, CI and staff. Filter it and export it as CSV or JSON.

- URL: https://flockvm.com/docs/team/audit-log
- Section: Organizations
- Last updated: 2026-11-01

Enterprise

The audit log records who did what in your organization, and when: members, invitations, settings, VMs, CI and the flockvm team's decisions. Owners and admins of an Enterprise organization can read it, filter it and export it.

![The audit log of an Enterprise organization](https://flockvm.com/docs/screenshots/audit-log.webp "Settings → Audit log: filters on top, the latest events below, times in UTC.")

## Who can see it

The audit log lives at **Settings → Audit log**, [flockvm.com/dashboard/settings/audit-log](https://flockvm.com/dashboard/settings/audit-log). To open it you need both:

- the **Owner** or **Admin** role in the organization (members see "Owners and admins only"), and
- an organization with **Enterprise** turned on.

Without Enterprise, the page says **Audit logs come with Enterprise**.

> **Tip: Recording starts before Enterprise.** flockvm records events for every organization from the start. When Enterprise is turned on, the log already holds your organization's history, within the retention period.

## Get Enterprise

Enterprise is turned on per organization by the flockvm team. Write to <hello@flockvm.com> with your organization's name and **Organization ID** (the `org_…` value in [organization settings](https://flockvm.com/docs/team/organizations#organization-settings)). Turning Enterprise on or off is itself recorded in the log.

## What is recorded

Each event has a time (UTC), an actor, an action, a target and, when known, the IP address and user agent of the request. Names and emails are stored as they were at the time, so an event still reads correctly after someone leaves or renames something.

### Organization

| Action                             | Recorded when                                                                                                                                                       |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `organization.created`             | Someone creates the organization.                                                                                                                                   |
| `organization.updated`             | An owner or admin changes the name or the slug (old and new values).                                                                                                |
| `organization.deleted`             | An owner deletes the organization, or its only member deletes their account.                                                                                        |
| `organization.status_changed`      | The organization's first plan payment approves it (at the end of the free trial, or when the plan is paid directly), or the flockvm team suspends or reinstates it. |
| `organization.enterprise_enabled`  | The flockvm team turns Enterprise on.                                                                                                                               |
| `organization.enterprise_disabled` | The flockvm team turns Enterprise off.                                                                                                                              |

### Members and invitations

| Action                    | Recorded when                                                         |
| ------------------------- | --------------------------------------------------------------------- |
| `member.joined`           | Someone accepts an invitation (with their role and who invited them). |
| `member.role_changed`     | An owner or admin changes a member's role (from and to).              |
| `member.removed`          | An owner or admin removes a member.                                   |
| `member.left`             | A member leaves, or deletes their account.                            |
| `invitation.created`      | Someone invites an address, with a role.                              |
| `invitation.resent`       | Someone sends an invitation again.                                    |
| `invitation.link_created` | Someone copies a new invitation link.                                 |
| `invitation.revoked`      | Someone revokes an invitation.                                        |

### Environments

These events name the environment, and the variable key or file path. They never hold a value or a file's content.

| Action                        | Recorded when                                                                                                                          |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `org.environment.create`      | An owner or admin creates an environment.                                                                                              |
| `org.environment.update`      | Someone renames an environment, makes it the default, or turns **Safe for third parties** or a section on or off (old and new values). |
| `org.environment.delete`      | Someone deletes an environment.                                                                                                        |
| `org.environment.reveal`      | An owner or admin reveals an environment's values.                                                                                     |
| `org.environment.var.set`     | Someone adds or changes a variable (its key).                                                                                          |
| `org.environment.var.delete`  | Someone deletes a variable (its key).                                                                                                  |
| `org.environment.file.set`    | Someone adds or replaces a secret file (its path).                                                                                     |
| `org.environment.file.delete` | Someone deletes a secret file (its path).                                                                                              |

See [Environments](https://flockvm.com/docs/vms/environments).

### API keys

| Action                   | Recorded when                                                                                                                  |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `api_key.created`        | Someone creates an API key (its name, its first characters, when it expires, its actions, environments, VMs and IP allowlist). |
| `api_key.updated`        | Someone renames an API key or changes its description.                                                                         |
| `api_key.rotated`        | Someone gives an API key a new secret (with the grace period of the old one).                                                  |
| `api_key.revoked`        | Someone revokes an API key, theirs or, for an owner or admin, another member's.                                                |
| `api_key.policy_updated` | An owner or admin changes the organization's API key policy (the rules that changed).                                          |

The key's secret is never recorded. See [API keys and scopes](https://flockvm.com/docs/api/api-keys).

### Changes made with an API key

A change made through the [API](https://flockvm.com/docs/api/overview) or the MCP server is recorded as the same event as in the dashboard, with the key's creator as the actor. The page adds which key it was, for example "Ada Martin created VM web-1 · via the API key laptop", or "via MCP with the API key laptop". In exports, `details` holds `via` (`api_key` or `mcp`), `apiKeyId` and `apiKeyName`.

### VMs, CI and network restrictions

| Action                     | Recorded when                                                                                                                                |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `vm.created`               | Someone creates a VM (with its size, image and region).                                                                                      |
| `vm.paused`, `vm.resumed`  | Someone pauses or resumes a VM.                                                                                                              |
| `vm.stopped`, `vm.started` | Someone stops or starts a VM.                                                                                                                |
| `vm.deleted`               | Someone deletes a VM.                                                                                                                        |
| `ci.github.connected`      | Someone connects a GitHub account to [CI](https://flockvm.com/docs/ci/setup).                                                                |
| `ci.github.disconnected`   | Someone disconnects it.                                                                                                                      |
| `abuse.vm_restricted`      | The flockvm team restricts a VM's outbound network, with the reason. See [Acceptable use](https://flockvm.com/docs/security/acceptable-use). |
| `abuse.vm_unrestricted`    | The flockvm team lifts that restriction.                                                                                                     |
| `audit_log.exported`       | Someone exports the audit log (format and number of events).                                                                                 |

Actions by the flockvm team show the person's name followed by **(flockvm staff)**.

## Filter events

The filter bar has four fields. Pick values and click **Filter**; **Clear** resets them.

`Activity` (select, default `Everything`): One category: **Organization**, **Members**, **Invitations**, **VMs**, **CI**, **Network restrictions**, **Environments**, **API keys** or **Audit log**.

`By` (select, default `Anyone`): Only the events of one current member.

`From` (date): The first UTC day to include.

`To` (date): The last UTC day to include (the whole day).

The page shows 50 events at a time, newest first. **Older events** loads the next page, **Newest** goes back to the top.

Filters live in the URL, so you can bookmark or share a filtered view with another owner or admin:

```text
https://flockvm.com/dashboard/settings/audit-log?category=member.&from=2026-10-01&to=2026-10-31
```

## Export

Click **Export CSV** or **JSON** at the top of the page. The export follows the filters you have set, holds up to 10,000 events, newest first, and is recorded as an `audit_log.exported` event.

The file is named after the organization's slug and the day, for example `flockvm-audit-log-northwind-labs-2026-10-31.csv`.

The CSV has one row per event with these columns:

```text title="flockvm-audit-log-northwind-labs-2026-10-31.csv"
time,action,actor_id,actor_name,actor_email,actor_staff,target_type,target_id,target,summary,ip,user_agent,details
```

`summary` is the sentence the page shows ("Ana Duarte changed Sam Okafor's role from member to admin"), and `details` holds the event's extra fields as JSON. Cells that start with `=`, `+`, `-` or `@` are prefixed with `'` so that a spreadsheet never runs them as a formula.

The JSON export wraps the events with the organization, the export time, the filters and a `truncated` flag (true when more than 10,000 events matched):

```json title="flockvm-audit-log-northwind-labs-2026-10-31.json"
{
  "organization": { "id": "org_…", "name": "Northwind Labs", "slug": "northwind-labs" },
  "exportedAt": "2026-10-31T09:12:44.000Z",
  "truncated": false,
  "filters": { "category": "member.", "actorId": null, "since": null, "until": null },
  "events": [
    {
      "id": "evt_…",
      "organizationId": "org_…",
      "at": "2026-10-30T16:02:11.000Z",
      "action": "member.role_changed",
      "actor": { "id": "usr_…", "name": "Ana Duarte", "email": "ana@northwind.test", "staff": false },
      "target": { "type": "member", "id": "usr_…", "label": "Sam Okafor" },
      "details": { "from": "member", "to": "admin", "email": "sam@northwind.test" },
      "ip": "203.0.113.7",
      "userAgent": "Mozilla/5.0 …"
    }
  ]
}
```

To look at an export from the command line:

```bash
# Role changes only, from a CSV export
grep ',member.role_changed,' flockvm-audit-log-*.csv

# The same from a JSON export, with jq
jq -r '.events[] | select(.action == "member.role_changed") | "\(.at) \(.actor.name) \(.target.label) \(.details.from) -> \(.details.to)"' flockvm-audit-log-*.json
```

## Retention

flockvm keeps audit events for **400 days**. Older events are removed. Export the log regularly if you need a longer history.

## Next steps

- [Members and roles](https://flockvm.com/docs/team/members): Who may invite, promote and remove.
- [Organizations](https://flockvm.com/docs/team/organizations): Approval, settings and the Organization ID.
- [Acceptable use](https://flockvm.com/docs/security/acceptable-use): Network restrictions and how they are logged.
- [Support](https://flockvm.com/docs/resources/support): Ask for Enterprise or report a problem.
