# MIME Encoding API
> The email and MIME text encodings that general base64/hex toolkits leave out. The quoted-printable endpoint encodes and decodes Quoted-Printable (RFC 2045) — the Content-Transfer-Encoding that keeps mostly-ASCII text readable while escaping everything else as =XX hex, with the soft line-wrapping at 76 columns and trailing-whitespace handling the spec requires. The encoded-word endpoint encodes and decodes RFC 2047 encoded-words — the =?UTF-8?Q?…?= and =?UTF-8?B?…?= form used to carry non-ASCII text in email Subject, From, To and other headers — in either the Q (quoted-printable-style) or B (base64) variant, and decodes any mix of them back to plain text. Everything is UTF-8 and computed locally and deterministically, so it is instant and private. Ideal for building and parsing email (SMTP/IMAP), .eml and MIME tooling, newsletter and transactional-mail systems, and migrating legacy mail data. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. These are the MIME-specific encodings; for base64, base32, hex, URL and HTML entity encoding use a general encoding API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/mimeencode-api/..."
```

## Pricing
- **Free** (Free) — 5,135 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 14,650 calls/Mo, 8 req/s
- **Pro** ($27/Mo) — 197,500 calls/Mo, 20 req/s
- **Mega** ($65/Mo) — 1,030,000 calls/Mo, 50 req/s

## Endpoints

### MIME

#### `GET /v1/encoded-word` — RFC 2047 encoded-word

**Parameters:**
- `text` (query, required, string) — The text or encoded-word string Example: `Héllo`
- `mode` (query, optional, string) — encode (default) or decode Example: `encode`
- `charset_encoding` (query, optional, string) — Q (default) or B — for encode Example: `Q`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mimeencode-api/v1/encoded-word?text=H%C3%A9llo&mode=encode&charset_encoding=Q"
```

**Response:**
```json
{
    "data": {
        "mode": "encode",
        "result": "=?UTF-8?Q?H=C3=A9llo?=",
        "charset_encoding": "Q"
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:18.562Z",
        "request_id": "106ab3d5-3d9b-4c22-b6eb-3613c367f55c"
    },
    "status": "ok",
    "message": "RFC 2047 encoded-word",
    "success": true
}
```

#### `GET /v1/quoted-printable` — Quoted-Printable encode/decode

**Parameters:**
- `text` (query, required, string) — The text or QP string Example: `Héllo = wörld`
- `mode` (query, optional, string) — encode (default) or decode Example: `encode`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mimeencode-api/v1/quoted-printable?text=H%C3%A9llo+%3D+w%C3%B6rld&mode=encode"
```

**Response:**
```json
{
    "data": {
        "mode": "encode",
        "result": "H=C3=A9llo =3D w=C3=B6rld",
        "encoding": "quoted-printable"
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:18.652Z",
        "request_id": "9e64ab8a-be00-4482-8305-54e9b2170d27"
    },
    "status": "ok",
    "message": "Quoted-Printable encode/decode",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/mimeencode-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "MIME Encoding API",
        "notes": "Quoted-Printable uses =XX hex escapes and =\\r\\n soft breaks; encoded-words wrap header text as =?UTF-8?Q?…?= or =?UTF-8?B?…?=. For base64/hex/URL/HTML encodings use a general encoding API. Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/quoted-printable",
                "params": {
                    "mode": "encode (default) or decode",
                    "text": "the text or QP string (required)"
                },
                "returns": "the Quoted-Printable encoded or decoded text"
            },
            {
                "path": "/v1/encoded-word",
                "params": {
                    "mode": "encode (default) or decode",
                    "text": "the text or encoded-word string (required)",
                    "charset_encoding": "Q (default) or B — only for encode"
                },
                "returns": "the RFC 2047 encoded-word or the decoded text"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Email and MIME text encodings that general base64/hex toolkits leave out. The quoted-printable endpoint encodes or decodes Quoted-Printable (RFC 2045) — the Content-Transfer-Encoding that keeps mostly-ASCII text readable while escaping the rest as =XX, with soft lin
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/mimeencode-api
OpenAPI spec: https://www.oanor.com/api/mimeencode-api/openapi.json
