---
title: "OpenAPI"
description: "The machine-readable reference."
url: "https://openemail.uk/docs/api/reference/openapi"
area: "API"
category: "Reference"
---

# OpenAPI

The machine-readable reference.

## The document

Served unauthenticated at `/openapi.json`, because a client generator needs it to know how to authenticate, and requiring a key to learn that would be a circle.

**Generate a client**

```
curl -s https://api.openemail.uk/openapi.json -o openemail.json
openapi-generator generate -i openemail.json -g python -o ./client
```

The request schemas are derived from the same zod that validates them, so the document cannot describe a field the server would reject. A hand-written spec is a second description of the API that drifts silently, and the failure mode is a generated client sending something the server refuses, which looks like the client's bug.
