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

# REST API Overview

> Endpoints exposed by the Parmana Runtime server

The REST API is implemented in the [`api`](/docs/packages/api) package (`packages/api/src`), an Express application composed by `application.ts` and mounted route-by-route under `packages/api/src/routes/`.

<Note>
  **Implementation vs. specification.** The monorepo also ships `openapi/openapi.yaml`, a broader OpenAPI 3.1 specification that additionally describes `Overrides`, `Trust Chain`, and `Policies` discovery tags with more endpoints than currently exist under `packages/api/src/routes/`. This page documents only endpoints with a real route handler in the codebase today. Treat the OpenAPI file as the target specification, not as confirmation that every endpoint it describes is implemented yet.
</Note>

## Base URL

Locally, after running `npm run dev` from the monorepo root:

```
http://localhost:3000
```

## Implemented endpoints

| Method | Path                  | Purpose                                                                     |
| ------ | --------------------- | --------------------------------------------------------------------------- |
| `GET`  | `/health`             | [Service health check](/docs/api/system#health)                             |
| `GET`  | `/version`            | [Service version](/docs/api/system#version)                                 |
| `GET`  | `/transactions`       | [List Business Transactions](/docs/api/transactions#list-transactions)      |
| `GET`  | `/transactions/:id`   | [Get a Business Transaction](/docs/api/transactions#get-a-transaction)      |
| `POST` | `/execute`            | [Execute a Business Transaction](/docs/api/execute)                         |
| `POST` | `/verify`             | [Verify an Execution Trust Record](/docs/api/verify#trigger-a-verification) |
| `GET`  | `/verification/:id`   | [Get the latest Verification](/docs/api/verify#get-the-latest-verification) |
| `POST` | `/replay`             | [Replay a Business Transaction](/docs/api/replay)                           |
| `POST` | `/receipt`            | [Generate a Receipt](/docs/api/receipt#generate-a-receipt)                  |
| `GET`  | `/receipt/latest/:id` | [Get the latest Receipt](/docs/api/receipt#get-the-latest-receipt)          |
| `GET`  | `/trust-records/:id`  | [Get an Execution Trust Record](/docs/api/trust-records)                    |
| `POST` | `/policies/validate`  | [Validate a policy](/docs/api/policies)                                     |

All request/response bodies are JSON. All errors follow the [canonical error model](/docs/api/error-model).

<Note>
  The "get latest" paths for verification and receipts are easy to guess wrong — they are **not** `/verify/:id` and `/receipt/:id`. `packages/api/src/app.ts` mounts those GET handlers under `/verification` and `/receipt/latest` respectively. See [Verify](/docs/api/verify#get-the-latest-verification) and [Receipt](/docs/api/receipt#get-the-latest-receipt) for the source-level confirmation.
</Note>

## SDKs

You generally won't call these endpoints directly — the [TypeScript SDK](/docs/typescript-sdk/installation) and [Python SDK](/docs/python-sdk/installation) wrap them behind typed clients. This reference exists for direct HTTP integration and for understanding what the SDKs are doing under the hood.
