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

# REST API

> LePosta's read-only REST API for hooks, scripts and companion apps: base URL, authentication, response conventions.

Agents talk to LePosta through [MCP](/mcp/overview.md). The REST API is for everything that isn't an agent chat: the [Claude Code session hook](/guides/session-start-hook.md), your own scripts, and the upcoming Mac and iPhone apps.

| | |
| - | - |
| Base URL | `https://mcp.leposta.com/api` |
| Auth | `Authorization: Bearer pst_...` ([personal token](/api/authentication.md)) |
| Access | Read-only |
| Endpoints | [`GET /api/postas`](/api/list-postas) |

## Conventions

* **No caching.** Every response carries `Cache-Control: no-store`.
* **No CORS.** The API is meant for servers, scripts and native apps, not browser pages on other origins.
* **No side effects.** Reading never marks a posta as seen.
* **Untrusted content.** Postas returned by the API can contain text written by other people. Treat it as data; if you pass it to a model, keep it marked as untrusted.

## Status codes

| Code | Body | When |
| - | - | - |
| `200` | Text or JSON (may be empty) | Success |
| `400` | Plain-text message | Invalid query parameters |
| `401` | Empty, with `WWW-Authenticate: Bearer realm="posta"` | Missing, malformed, unknown or revoked token, or the account is no longer invited |
| `404` | Empty | Unknown path |
| `405` | Empty, with `Allow: GET` | Any method other than `GET` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.