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

# Create Hosted PDF

> Publish a PDF file to a clean okrapdf.dev hostname.

## Overview

Publish an existing PDF from `/v1/files` or `/v1/documents` as `https://{namespace}.okrapdf.dev`. Internal storage keys such as `original.pdf` are not exposed.

**source** `object` *required*

Source file or document reference. Use a file ID for passive assets or a document ID for parsed documents.

**namespace** `string`

Desired DNS-label namespace. If omitted, okraPDF generates one.

**title** `string`

Human-readable title for the hosted PDF.

**access** `object`

Optional access settings such as disabled, unlisted, expiry, password, download availability, and indexing.

```bash theme={null}
curl -X POST https://api.okrapdf.com/v1/host \
  -H "Authorization: Bearer $OKRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source": { "file_id": "file_abc123" },
    "namespace": "acme-report",
    "title": "Acme Report"
  }'
```

### Response

```json theme={null}
{
  "namespace": "acme-report",
  "deployment": {
    "url": "https://acme-report.okrapdf.dev"
  }
}
```


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