> For the complete documentation index, see [llms.txt](https://docs.metamynd.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metamynd.ai/core-concepts/administrative-audit-log.md). Agents can also search and read this documentation through its [MCP server](https://docs.metamynd.ai/~gitbook/mcp).

# Administrative Audit Log

The evidence ledger records what the gate decided about each action an agent asked to take. The **Audit Log** records something different: what **people** changed. Who changed a role, a setting, a mandate, a rule, an agent's state, a credential, an incident or a review, when, and whether it went through.

Find it in the dashboard under **Reporting → Audit Log**.

#### What is recorded <a href="#user-content-what-is-recorded" id="user-content-what-is-recorded"></a>

Only administrative actions are recorded. The agent-facing gate traffic (authorize, capture, gateway reports, local receipts), chat, sandbox runs and public forms are operational and recorded elsewhere; they would drown the trail. Each entry belongs to one of these areas:

| Area (filter label)     | Examples                                                                                                                                                                                                                                                                                                                                           |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Access & roles**      | A member's role changed; an invite created, resent, revoked or accepted; a password change; two-factor turned on or off; an account closed; a regulator seat assigned or removed; a supervisory grant issued or revoked                                                                                                                            |
| **Organisation**        | An operating unit created or deleted; agents assigned to a legal entity or unit; a network identity added or rotated for a legal entity                                                                                                                                                                                                            |
| **Platform settings**   | A platform setting or Standards adapter changed (platform admins), and your own reporting timezone, profile and preferences                                                                                                                                                                                                                        |
| **Mandates & policy**   | A mandate issued, revoked, delegated or revoked with its chain; mandate limits, expiry or payload binding changed; starter rules applied; an agent taken live; counterparties and payee accounts registered or revoked; circuit breakers tripped, configured or reset; resources registered, granted or retired; agent passports issued or revoked |
| **SOPs & Standards**    | An SOP created, edited, deleted, assigned or unassigned; a Standard published, versioned, edited, assigned or unassigned; SOP Compiler uploads, rule edits, approvals and discards; regulatory profiles bound or unbound                                                                                                                           |
| **Agent state & keys**  | An agent registered, contained, reinstated; its operating mode, approval policy, rate limit or business role set; a reassessment cleared; keys verified or identities rotated; a version transition; capabilities declared or retired; a sandbox programme closed                                                                                  |
| **Reviews & overrides** | An escalation resolved or bulk-rejected; an agent request resolved; a hold refunded; an effect reconciled, force-reconciled, resolved or compensated                                                                                                                                                                                               |
| **Incidents**           | An incident logged, updated or reported to an authority; an authority acknowledging a report                                                                                                                                                                                                                                                       |
| **Credentials**         | A Credential Vault credential created, rotated or revoked; a stored credential saved or deleted                                                                                                                                                                                                                                                    |
| **KYC / KYB**           | A verification decision or renewal                                                                                                                                                                                                                                                                                                                 |
| **Exports**             | An evidence pack or compliance artefact exported, including a regulator downloading a supervised organisation's evidence pack; a Decision Explorer CSV or Audit Log CSV exported                                                                                                                                                                   |

Each entry records the time, the actor (user id, email and role), the action (for example `mandate.revoke`), the target (for example `agent` and its id), the route and its HTTP status, the **outcome**, and details.

**Details never hold secrets.** The names of every field sent are recorded, so "approverList was changed" is visible. Values are recorded only for a fixed set of non-secret governance fields, such as a role, a status, a reason, an approver list, a rate limit, an amount, a currency or a timezone. Passwords, keys, tokens, signatures and setting values are never recorded by value. For a refused attempt, the message the person was shown is kept as well.

#### Refused attempts and outcomes <a href="#user-content-refused-attempts-and-outcomes" id="user-content-refused-attempts-and-outcomes"></a>

Attempts that did not go through are recorded too, not only successes. Every entry has one of four outcomes:

| Outcome      | Meaning                                                                                     |
| ------------ | ------------------------------------------------------------------------------------------- |
| **success**  | The change went through.                                                                    |
| **denied**   | The person was not allowed to do this, or the target was not theirs (HTTP 401, 403 or 404). |
| **rejected** | The request was invalid, for example a bad value, and nothing changed (any other 4xx).      |
| **failed**   | A server error stopped the change (5xx).                                                    |

Two limits keep the log honest and bounded:

* A request with no signed-in user is not recorded: there is nobody to attribute it to. The one exception is accepting a member invite, which happens at sign-up and is recorded with the new member as the actor.
* Refused attempts are capped at 60 per person per minute (per server), so a loop of junk requests can't grow a log that can never be pruned. Successes are never capped.

An entry is written just after the action's response, outside the action's own database transaction. If the database fails at that exact moment, the entry can be lost and the failure is logged on the server; the action itself is not undone.

#### Append-only and hash-chained <a href="#user-content-append-only-and-hash-chained" id="user-content-append-only-and-hash-chained"></a>

Entries can't be edited or deleted. The application has no way to update or delete one, and the database refuses `UPDATE`, `DELETE` and `TRUNCATE` on the table.

The database rule stops the application and anyone using it, but whoever owns the database could switch it off. That is what the hash chain is for. Every entry carries an `entryHash`, the SHA-256 of the previous entry's hash plus this entry's content, in one chain across the whole log. An entry altered or removed from the middle breaks the chain at that point.

A chain cut short at the end, or rewritten from some entry onward with fresh hashes, still links up. That is what the **Hedera anchor** is for. Every 10 minutes, if new entries were written since the last anchor, the platform commits the chain head (the latest entry's sequence number and hash) to a Hedera Consensus Service topic named `audit-log`, the same ledger decision evidence is anchored to. A tick with no new entries submits nothing. Anchoring runs in the background, so an audited action never waits on Hedera or fails because of it. A failed submission is recorded and retried at the next tick. Each anchor is also stored in the database, append-only like the log itself.

Before anchoring a new head, the platform checks that the chain still holds the previously anchored entry with the same hash. If it doesn't, it refuses to anchor, so a tampered chain can't be given a fresh, clean-looking anchor.

**Verify chain** (a button on the page) walks the whole chain, then compares it with its latest anchor. The chain result is one of:

* **Chain intact: N entries verified**.
* **Chain broken at entry #N** with the reason (`PREVIOUS_HASH_MISMATCH` or `ENTRY_HASH_MISMATCH`): an entry in the middle was altered or removed.
* **Chain does not match its Hedera anchor at entry #N** (reason `ANCHOR_MISMATCH`): the anchored entry is missing or its hash differs, so entries were removed from the end or the chain was rewritten.

The anchor result is one of:

* **Anchored on Hedera through entry #N**, with the anchor transaction linked to HashScan, and how many newer entries are waiting for the next anchor ("N newer entries waiting for the next anchor").
* **Not anchored yet**: no anchor has been written, with the number of entries waiting for the first one.

Because it reads every entry of every tenant, only **platform admins** can run it.

{% hint style="warning" %} **What the anchor does and doesn't prove.**

* Entries written **after** the latest anchor are protected only once the next anchor lands, normally within 10 minutes (a failed submission is retried at the next tick). Until then, removing them from the end isn't detectable.
* **Verify chain** compares the log with the database's copy of the anchors. The independent proof is the `audit-log` topic on Hedera, which nobody with database access can change: an auditor can read the anchored heads (`seq` and `entryHash` in each message) from a public Hedera mirror node and compare them with the `entry_hash` column of a CSV export.
* An anchor is an integrity proof, not a regulatory approval.
* Anchoring can be switched off by the operator of a deployment. Then verify reports **Not anchored yet**, and entries removed from the end are not detectable. {% endhint %}

#### Who sees which entries <a href="#user-content-who-sees-which-entries" id="user-content-who-sees-which-entries"></a>

You see an entry when any of these is true:

* **You acted.** Your own changes, including your refused attempts.
* **It touched your resource.** When an action succeeds, the entry is filed under the owner of what it touched: an agent's, mandate's, SOP's, incident's, review's or hold's owner. So when a platform admin contains your agent, or an approver resolves your agent's review, it shows in **your** log.
* **It was about you.** For example, someone changed your role.

A refused attempt stays only with the person who made it. Otherwise, probing someone else's ids would reveal who owns them and put attacker-chosen text in their log.

Platform admins can also switch **Scope** to **All tenants (admin)**. Only platform admins see the owning tenant's id on each entry.

#### Filters, timezone and CSV export <a href="#user-content-filters-timezone-and-csv-export" id="user-content-filters-timezone-and-csv-export"></a>

Filter by **Period** (Last 7 days, Last 30 days (the default), Last 90 days, All time), **Area** and **Outcome**. Entries are newest first, 50 at a time (**Load older entries** fetches more).

Times are shown in your **reporting timezone** (Settings → Preferences → Language & Region → Reporting timezone), or your browser's zone if it is not set. Entries are stored in UTC, and the export writes UTC.

**Export CSV** downloads the entries matching the filters, newest first, **at most 10,000 rows**, as `metamynd-audit-log-<date>.csv`. Columns:

`seq`, `occurred_at_utc`, `actor_user_id`, `actor_email`, `actor_role`, `category`, `action`, `target_type`, `target_id`, `method`, `route`, `status`, `outcome`, `details`, `entry_hash`

A platform admin's export also has `owner_id`. `details` is written as JSON. A cell that would start with `=`, `+`, `-` or `@` is prefixed with an apostrophe so a spreadsheet never runs it as a formula. The export itself is recorded in the Audit Log.

#### How it differs from decision evidence <a href="#user-content-how-it-differs-from-decision-evidence" id="user-content-how-it-differs-from-decision-evidence"></a>

|                     | Decision evidence                                                                                            | Audit Log                                                                                                                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Records**         | What the gate decided about an agent's request, and what happened to it                                      | What people changed in the configuration and records                                                                                                                                                 |
| **Written by**      | The gate, as part of each decision                                                                           | The platform, after each audited administrative request                                                                                                                                              |
| **Integrity**       | Merkle-batched and **anchored on Hedera**; each decision has an inclusion proof anyone can check offline     | Append-only and **hash-chained**; the chain head is **anchored on Hedera** every 10 minutes when new entries were written. No per-entry proof: entries after the latest anchor wait for the next one |
| **Who can verify**  | Anyone, against a public Hedera mirror node                                                                  | Platform admins (Verify chain); anyone can read the anchored heads on the `audit-log` topic from a mirror node                                                                                       |
| **Where to see it** | Reporting → Decision Explorer; [Evidence & Audit](https://docs.metamynd.ai/core-concepts/evidence-and-audit) | Reporting → Audit Log                                                                                                                                                                                |

The two answer different audit questions. "Did the agent act within its authority?" is the evidence ledger. "Who changed that authority, and when?" is the Audit Log.

#### API <a href="#user-content-api" id="user-content-api"></a>

All routes are under `/api/v1` and need a signed-in session.

| Method + path               | Auth           | Purpose                                                                                                                                                                                                                            |
| --------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /audit-log`            | session        | The entries you may see, newest first. Response: `data` (entries) and `page` (`limit`, `nextBefore`, `scope`).                                                                                                                     |
| `GET /audit-log/export.csv` | session        | The same filters as CSV, at most 10,000 rows. The `X-Audit-Truncated` header says whether entries were left out.                                                                                                                   |
| `GET /audit-log/verify`     | platform admin | Verify the whole hash chain and compare it with its latest Hedera anchor: `{ ok, checked, breakAtSeq, reason, anchor }`. `reason` is `PREVIOUS_HASH_MISMATCH`, `ENTRY_HASH_MISMATCH` or `ANCHOR_MISMATCH`. Anyone else gets `403`. |

Query parameters for the list and the export:

| Parameter                | Meaning                                                                                                                           |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| `from`, `to`             | ISO 8601 timestamps (`from` inclusive, `to` exclusive)                                                                            |
| `category`               | `access`, `organization`, `settings`, `mandate`, `rules`, `agent`, `review`, `incident`, `credential`, `verification` or `export` |
| `action`                 | An action name, for example `member.role_change`                                                                                  |
| `outcome`                | `success`, `denied`, `rejected` or `failed`                                                                                       |
| `actor`                  | The acting user's id                                                                                                              |
| `targetType`, `targetId` | The target, for example `agent` and its id                                                                                        |
| `limit`, `before`        | List only: page size (default 50, at most 200) and the `nextBefore` sequence number of the previous page                          |
| `scope`                  | `all`: platform admins only; anyone else gets `400`                                                                               |

Each entry returns `auditId`, `seq`, `occurredAt`, `actor` (`userId`, `email`, `role`), `category`, `action`, `target` (`type`, `id`), `method`, `route`, `statusCode`, `outcome`, `details` and `entryHash`; a platform admin also gets `ownerId`.

The `anchor` object of a verify response:

| Field                                                           | Meaning                                                                                                         |
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `status`                                                        | `matched` (the chain still holds the anchored entry), `mismatch` (it doesn't) or `not_anchored` (no anchor yet) |
| `anchoredThroughSeq`, `anchoredEntryHash`, `anchoredEntryCount` | The entry the chain is anchored through, its hash, and how many entries the log held at that point              |
| `topicId`, `txId`, `topicSequenceNumber`, `anchoredAt`          | Where and when the anchor was written on Hedera                                                                 |
| `anchorRef`                                                     | A HashScan link to the anchor transaction                                                                       |
| `pendingEntries`                                                | Entries after the anchored one, waiting for the next anchor (every entry when there is no anchor)               |
| `mismatchAtSeq`                                                 | The anchored sequence number, when the chain doesn't match it                                                   |
| `message`                                                       | A plain-language finding, when there is one                                                                     |

A broken link is reported first. `ANCHOR_MISMATCH` is reported when every link checks out but the chain doesn't match its anchor; `breakAtSeq` is then the anchored sequence number.

See [Reporting & the Decision Explorer](https://docs.metamynd.ai/guides/reporting-and-the-decision-explorer) for the decision views, and [Compliance & Auditing](https://docs.metamynd.ai/regulatory-compliance/compliance-and-auditing) for the exports an auditor can ask for.

<br>


---

# 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.metamynd.ai/core-concepts/administrative-audit-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.
