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

# API Reference

> REST API for document parsing, analytics, and embedding.

## Base URL

```
https://api.lendpathway.com/api
```

## Authentication

Every request requires a Personal Access Token (PAT), a long-lived credential scoped to one organization and user. PATs are prefixed `pat_`.

```http theme={null}
Authorization: Bearer pat_your_token_here
```

Generate one from **Settings → Account → New Token**. The raw token is shown once on creation and cannot be retrieved again.

## Errors

All error responses have a `detail` field.

```json theme={null}
{ "detail": "Invalid or revoked access token" }
```

| Status | Meaning                                                         |
| ------ | --------------------------------------------------------------- |
| `400`  | Invalid parameters or book in wrong state (e.g. not yet parsed) |
| `401`  | Missing or invalid token                                        |
| `403`  | Token doesn't have access to this resource                      |
| `404`  | Resource not found                                              |
| `500`  | Server error                                                    |

## Sections

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/endpoint/authentication">
    Generate and verify PAT tokens.
  </Card>

  <Card title="Books" icon="file-lines" href="/api-reference/endpoint/books">
    Submit documents, poll parse status, fetch analytics and exports.
  </Card>

  <Card title="Embed" icon="code" href="/api-reference/endpoint/embed">
    Create embed tokens and iframe parsed reports.
  </Card>

  <Card title="OpenAPI spec" icon="arrow-up-right-from-square" href="https://api.lendpathway.com/docs">
    Full interactive reference with all schemas and response shapes.
  </Card>
</CardGroup>
