> This page is for Gateway.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Audit trail

> What Gateway records in the audit trail, the fields on each entry, and how to filter and export it from the dashboard.

The audit trail is an append-only record of privileged actions in your organization (settings, key, credential, member, and role changes, sign-ins, and exports) for compliance reviews and "who changed this?". Inference requests are in the request logs instead.

## View and export

Open **Settings → Audit trail** in the [dashboard](https://gateway.merge.dev/settings/audit-trail), filter by date, event type, and member, and **Export CSV** to download the filtered set. There is no API or streaming export. Both need View audit trail, which all four [built-in roles](/merge-gateway/security/roles-and-permissions) include. Each export is recorded as `AUDIT_LOG_EXPORTED` and appears in the file it produces.

The CSV columns are Timestamp, User Name, User Email, Role, IP Address, Event Type, and Event Description. Cells starting with `=`, `+`, `-`, `@`, a tab, or a carriage return get a leading single quote so spreadsheets don't run them as formulas.

## Entry fields

| Field             | Description                                                                                                                                                                          |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Timestamp         | When the event was recorded, in UTC                                                                                                                                                  |
| User              | Name and email of the member who acted, captured at write time. Empty for system-driven events.                                                                                      |
| Role              | The member's role at the time of the event, kept even if the role is later renamed or deleted                                                                                        |
| IP address        | The client IP as seen by Cloudflare (`CF-Connecting-IP`), otherwise the connection IP                                                                                                |
| URL and method    | The request path and HTTP method that caused the event                                                                                                                               |
| Request body      | The submitted body. Omitted for API keys, credentials, SSO, sign-in, password reset, and self-hosted endpoints, so secrets never reach the audit trail.                              |
| Event type        | One of the event types below                                                                                                                                                         |
| Event description | A readable summary. Update events list each changed field, for example `Changed allowed_models: added openai/gpt-5.5; removed openai/gpt-5-mini`, with values cut to 100 characters. |

Entries are never edited and are kept indefinitely. Failed actions write no entry (it commits with the change), except failed sign-ins (`LOGIN_FAILED`).

## Reference

Event type names are the prefix plus the action, for example `API_KEY_CREATED`. The **Event type** filter lists every current type; new features add more.

| Resource                                                   | Prefix                          | Actions                                                                                                                                                                                                                                              |
| ---------------------------------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API keys                                                   | `API_KEY_`                      | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Management keys                                            | `MANAGEMENT_KEY_`               | `CREATED`, `DELETED`                                                                                                                                                                                                                                 |
| Vendor credentials (BYOK)                                  | `CREDENTIAL_`                   | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Members                                                    | `MEMBER_`                       | `INVITED`, `JOINED`, `INVITATION_RESENT`, `INVITATION_REVOKED`, `ROLE_CHANGED`, `REMOVED`                                                                                                                                                            |
| Roles                                                      | `ROLE_`                         | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Sign-in                                                    | none                            | `LOGIN_SUCCESS`, `LOGIN_FAILED`, `LOGOUT`, `PASSWORD_RESET`                                                                                                                                                                                          |
| [MFA](/merge-gateway/security/multi-factor-authentication) | `MFA_`                          | `ENABLED`, `DISABLED`, `DEVICE_CHANGED`, `ADMIN_RESET`, `VERIFICATION_FAILED`, `REQUIRED_ENABLED`, `REQUIRED_DISABLED`                                                                                                                               |
| SSO                                                        | `SSO_`                          | `PROVIDER_CREATED`, `PROVIDER_UPDATED`, `PROVIDER_DELETED`, `LOGIN_REQUIRED_ON`, `LOGIN_REQUIRED_OFF`                                                                                                                                                |
| Organization                                               | `ORG_`                          | `CREATED`, `SETTINGS_UPDATED`, `DEACTIVATED`, `REACTIVATED`, `DELETED`                                                                                                                                                                               |
| Agent signup                                               | none                            | `AGENT_SIGNUP`, `AGENT_CLAIM_REISSUED`, `ORGANIZATION_CLAIMED`                                                                                                                                                                                       |
| Projects                                                   | `PROJECT_`                      | `CREATED`, `UPDATED`, `DELETED`, `PI_SETTINGS_UPDATED`, `PI_SETTINGS_DELETED`, `DLP_SETTINGS_UPDATED`, `DLP_SETTINGS_DELETED`                                                                                                                        |
| Customers                                                  | `CUSTOMER_`                     | `CREATED`, `UPDATED`, `DELETED`, `PI_SETTINGS_UPDATED`, `PI_SETTINGS_DELETED`, `DLP_SETTINGS_UPDATED`, `DLP_SETTINGS_DELETED`                                                                                                                        |
| Routing policies                                           | `ROUTING_POLICY_`               | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Routing rules                                              | `ROUTING_RULE_`                 | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Unified routing                                            | `UNIFIED_ROUTING_CONFIG_`       | `CREATED`, `UPDATED`, `DELETED`, `REORDERED`                                                                                                                                                                                                         |
| Prompt classifiers                                         | `ROUTING_CLASSIFIER_`           | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Model aliases                                              | `MODEL_ALIAS_`                  | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Custom routing                                             | `BYOR_`                         | `CONFIG_*`, `DATASET_*`, `DATASET_SOURCE_*` (each `CREATED`, `UPDATED`, `DELETED`), `PROMPTS_IMPORTED`, `PROMPTS_IMPORTED_FROM_SOURCE`, `EVAL_RUN_TRIGGERED`, `RESULT_OVERRIDDEN`, `RESULT_RESTORED`                                                 |
| Custom routing benchmarks                                  | `BYOR_BENCHMARK_`               | `CREATED`, `UPDATED`, `DELETED`, `SCORES_UPLOADED`, `SCORE_OVERRIDE_SET`, `SCORE_OVERRIDE_DELETED`                                                                                                                                                   |
| Evals                                                      | `EVAL_`                         | `SUITE_*`, `CASE_*` (each `CREATED`, `UPDATED`, `DELETED`), `RUN_CANCELLED`                                                                                                                                                                          |
| Experiments                                                | `EXPERIMENT_`                   | `SUITE_CREATED`, `SUITE_UPDATED`, `SUITE_ARCHIVED`, `CASE_*`, `CASES_IMPORTED`, `CASES_SYNCED`, `RUN_TRIGGERED`, `RUN_CANCELLED`, `ALERT_ACKNOWLEDGED`, `ALERT_WEBHOOK_*`, `SCHEDULE_UPDATED`, `SCHEDULE_DELETED`                                    |
| Model migrations                                           | `MODEL_MIGRATION_`              | `CREATED`, `UPDATED`, `COMPLETED`, `ABANDONED`                                                                                                                                                                                                       |
| Self-hosted endpoints                                      | `SELF_HOSTED_ENDPOINT_`         | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Telemetry export                                           | `TELEMETRY_EXPORT_DESTINATION_` | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| DLP rules                                                  | `DLP_RULE_`                     | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Blocklist rules                                            | `BLOCKLIST_RULE_`               | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Compression                                                | `COMPRESSION_SETTING_`          | `CREATED`, `UPDATED`, `DELETED`                                                                                                                                                                                                                      |
| Billing                                                    | none                            | `PAYMENT_METHOD_CREATED`, `PAYMENT_METHOD_UPDATED`, `PAYMENT_METHOD_DELETED`, `BILLING_SETTINGS_UPDATED`, `CREDITS_PURCHASED`, `CREDITS_PURCHASE_RETRIED`, `CREDITS_PURCHASE_BLOCKED`, `CREDITS_REFUNDED`, `AUTO_TOPUP_PAUSED`, `AUTO_TOPUP_RESUMED` |
| Audit trail                                                | none                            | `AUDIT_LOG_EXPORTED`                                                                                                                                                                                                                                 |

> **Org-level prompt injection changes aren't recorded**
>
> Changes under **Security → Prompt injection** write no entry. Project and customer PI overrides do, as `PROJECT_PI_SETTINGS_*` and `CUSTOMER_PI_SETTINGS_*`.

A deleted member's entries keep the name, email, and role captured at write time. A deleted organization's entries can no longer be listed.

## Next steps

#### [Roles and permissions](/merge-gateway/security/roles-and-permissions)

Control who performs audited actions and views the trail

#### [Per-customer restrictions](/merge-gateway/security/per-customer-restrictions)

Block or pin models per customer

#### [Data loss prevention](/merge-gateway/security/data-loss-prevention)

Scan prompts for PII and secrets