> ## Documentation Index
> Fetch the complete documentation index at: https://docs.provenlog.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrity

> Verify hash chains, compute Merkle roots, and export evidence

## GET /v1/verify

Verify hash chain integrity for an agent.

### Query parameters

| Parameter  | Type   | Description                      |
| ---------- | ------ | -------------------------------- |
| `agent_id` | string | **Required.** Agent ID to verify |

### Example

```bash theme={null}
curl "http://localhost:7600/v1/verify?agent_id=my-agent"
```

### Response (valid)

```json theme={null}
{
  "valid": true,
  "agent_id": "my-agent",
  "events_verified": 150
}
```

### Response (invalid)

```json theme={null}
{
  "valid": false,
  "agent_id": "my-agent",
  "error": "hash mismatch at sequence 42"
}
```

***

## GET /v1/merkle/root

Compute the Merkle root across all chains.

### Example

```bash theme={null}
curl http://localhost:7600/v1/merkle/root
```

### Response

```json theme={null}
{
  "root": "a1b2c3d4e5f6...",
  "tree_size": 1500
}
```

The root is computed on demand and represents the current integrity state of all stored events.

***

## GET /v1/export

Export a verifiable evidence package.

### Query parameters

| Parameter  | Type   | Description                      |
| ---------- | ------ | -------------------------------- |
| `agent_id` | string | **Required.** Agent ID to export |
| `since`    | string | Start time (ISO 8601)            |
| `until`    | string | End time (ISO 8601)              |

### Example

```bash theme={null}
curl "http://localhost:7600/v1/export?agent_id=my-agent" > package.plog
```

### Response

Returns a `.plog` JSON document containing events, hash chain data, and Merkle inclusion proofs. See [Verifiable Exports](/features/verifiable-exports) for the full format.
