# See the audit log

See who signed in to your account, and who invited, changed or removed its members, newest first.

## Before you start

You need to be an owner or admin of a team account. See [Invite someone to the account](/docs/account/team.md).

## See the audit log

**Studio**

1. Open **Account settings** > **Audit log**. You should now see the last 7 days' events, newest first, with each one's **Time**, **Actor**, **Event** and **Target**.

2. Click **Filters**.

3. Click **Event**.

4. Pick **Member removed**. You should now see only the removals.

   ![The Audit log filtered to Event: Member removed, showing one removal](/docs-assets/platform/guides/account/audit-log-member-removed.png "docs-screenshot:1100x640")

5. Click **Export**.

6. Click **Export CSV**. You should now see a CSV file download with every event the filters match.

**REST**

1. Set `ACCOUNT_ID` to your account's id, the part after `/accounts/` in its Studio settings address: `export ACCOUNT_ID=<id>`.
2. List the account's member removals. You should now see them under `data`, newest first:

```bash
curl -s "https://api.veryfront.com/accounts/$ACCOUNT_ID/audit-events?event_type=account.member.removed" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

3. Export every event as a CSV file. You should now see `audit.csv`, with a header row and one line for each event:

```bash
curl -s -o audit.csv "https://api.veryfront.com/accounts/$ACCOUNT_ID/audit-events/export/csv" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

`/export/jsonl` gives the same events as JSON Lines. `from`, `to`, `actor_type` and `actor_id` narrow both.

### Troubleshooting

**If the API says "Requires account.audit.read"**, the key belongs to an account member. Use a key from an owner or admin.

## Next steps

* [Set roles](/docs/account/roles.md)
* [Remove an account member](/docs/authentication/remove-member.md)
