Skip to main content
POST
/
v1
/
host
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"
  }'

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.
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

{
  "namespace": "acme-report",
  "deployment": {
    "url": "https://acme-report.okrapdf.dev"
  }
}