---
title: "System"
description: "Liveness and this document. No credential."
url: https://doorman.fyi/docs/reference/system
markdown: https://doorman.fyi/docs/reference/system.md
area: "API reference"
section: "API reference"
---

# System

Liveness and this document. No credential.

Source: https://doorman.fyi/docs/reference/system

## Health check

`GET /health`

Access `public`: no credential.

Answers as soon as the Worker runs; it does not touch storage.

OAuth: not available to delegated app tokens.

Also available as [`client.health`](https://doorman.fyi/docs/sdk/reference/system.md#health) in TypeScript, [`client.health`](https://doorman.fyi/docs/python/reference/system.md#health) in Python and [`doorman health`](https://doorman.fyi/docs/cli/commands/system.md#health) on the command line.

Answers `200`: The service is up.

**Response 200: Health**
The service is up.
- `ok` (true)
- `service` ("doorman-inbox")

Example 200 response:
```json
{
  "ok": true,
  "service": "doorman-inbox"
}
```

**Errors**

| Status | Error | Meaning |
| --- | --- | --- |

curl:
```sh
curl -s "https://api.doorman.fyi/health"
```

TypeScript:
```ts
const response = await fetch("https://api.doorman.fyi/health", {
  headers: {
  },
  redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();
```

Python:
```python
import requests

response = requests.get(
    "https://api.doorman.fyi/health",
    headers={},
    allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()
```

## The OpenAPI document

`GET /openapi.json`

Access `public`: no credential.

This document, with `servers` set to the deployment's own origin. Public and cacheable, so documentation tooling can read it from any origin.

OAuth: not available to delegated app tokens.

Also available as [`client.openapi`](https://doorman.fyi/docs/sdk/reference/system.md#openapi) in TypeScript, [`client.openapi`](https://doorman.fyi/docs/python/reference/system.md#openapi) in Python and [`doorman openapi`](https://doorman.fyi/docs/cli/commands/system.md#openapi) on the command line.

Answers `200` as `application/json`: The OpenAPI 3.1 document.

**Errors**

| Status | Error | Meaning |
| --- | --- | --- |
| 500 | `internal_error` | Something went wrong on the server. |

curl:
```sh
curl -s "https://api.doorman.fyi/openapi.json" \
  -o downloaded.bin
```

TypeScript:
```ts
const response = await fetch("https://api.doorman.fyi/openapi.json", {
  headers: {
  },
  redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const bytes = await response.arrayBuffer();
```

Python:
```python
import requests

response = requests.get(
    "https://api.doorman.fyi/openapi.json",
    headers={},
    allow_redirects=False, timeout=30,
)
response.raise_for_status()
data = response.content
```

## Model Context Protocol endpoint

`POST /mcp`

Access `key`: an API key, or a correctly scoped app token where delegated access is allowed; console sessions are refused.

The stateless Streamable HTTP endpoint for the Model Context Protocol. Authenticate with a `dm_` API key, or with an app access token issued for this address as its resource; console sessions are not accepted, and a request without a credential is answered with the challenge an agent host signs in from. A key is offered every operation in `operationTools()`, with output schemas and structured answers. An app token is offered the operations its permissions cover, sized for a model: no output schemas or examples, text-only answers, and mail text bounded with a note naming the tool that reads the rest. Neither is offered the tools of a capability the deployment has not switched on. Every answer is JSON. There is no stream to open and no session to end, so GET and DELETE answer 405.

OAuth: allowed with a token for this resource. [App permissions](https://doorman.fyi/docs/oauth.md#scopes) apply in addition to account and resource checks.

**Request body (application/json)**
No fields.

Answers `200` as `application/json`: The JSON-RPC 2.0 response.

**Errors**

| Status | Error | Meaning |
| --- | --- | --- |
| 401 | `unauthorized` | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 403 | `insufficient_scope` | The app's token lacks a required scope, or the operation cannot be delegated. |
| 405 | `method_not_allowed` | The MCP endpoint takes POST only: it is stateless, with no stream to open and no session to end. |
| 429 | `rate_limit_exceeded` | A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again. |
| 500 | `internal_error` | Something went wrong on the server. |

curl:
```sh
curl -s -X POST "https://api.doorman.fyi/mcp" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -o downloaded.bin
```

TypeScript:
```ts
const response = await fetch("https://api.doorman.fyi/mcp", {
  method: "POST",
  headers: {
    authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
  },
  redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const bytes = await response.arrayBuffer();
```

Python:
```python
import os
import requests

response = requests.post(
    "https://api.doorman.fyi/mcp",
    headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
    allow_redirects=False, timeout=30,
)
response.raise_for_status()
data = response.content
```
