---
title: "Create a PDF code"
method: POST
path: "/pdf/create/"
tags: ["PDF codes"]
---

# Create a PDF code

`POST /pdf/create/`

## Request

- Base URL: `https://hovercode.com/api/v2`
- URL: `https://hovercode.com/api/v2/pdf/create/`
- Auth: API key in header `Authorization`

Hosts a PDF and returns a dynamic QR code pointing at it. Provide `pdf_url` or `pdf_base64` (max 20 MB). Counts toward the dynamic-code limit.

## Request body

- union
  - object
    - `workspace` string, uuid, required
    - `pdf_url` string, uri, required
    - `pdf_base64` string: Base64 PDF bytes; `data:` URI prefix allowed.
    - `filename` string
    - `display_name` string
    - `domain` string
  - object
    - `workspace` string, uuid, required
    - `pdf_url` string, uri
    - `pdf_base64` string, required: Base64 PDF bytes; `data:` URI prefix allowed.
    - `filename` string
    - `display_name` string
    - `domain` string

## Response `200`

OK

- PdfCode: A QR code (Hovercode). `vcard` / `gs1_product` are present only for those types.
  - `id` string, uuid, required
  - `qr_data` string, nullable: Link URL, plain text, or (GS1) the Digital Link short URL. Omitted for vCard codes.
  - `qr_type` 'Link' | 'PDF' | 'Text' | 'vCard' | 'App stores' | 'Call' | 'Send email' | 'Send message' | 'Page' | 'Wifi' | 'Form' | 'GS1', required
  - `display_name` string, nullable
  - `shortlink_url` string, uri, nullable: Short link the code encodes; null for static codes.
  - `dynamic` boolean, required
  - `frame` string, nullable: Frame slug.
  - `frame_color` string, nullable
  - `logo` string, nullable: Logo image URL.
  - `primary_color` string, nullable
  - `eye_style` 'Square' | 'Rounded' | 'Drop' | 'Leaf'
  - `eye_color` string, nullable
  - `background_color` string, nullable: Hex color; null when transparent.
  - `pattern` 'Original' | 'Circles' | 'Squares' | 'Diamonds' | 'Triangles' | 'Lines'
  - `text` string, nullable
  - `text_secondary` string, nullable
  - `has_border` boolean
  - `svg` string, nullable: Inline SVG markup.
  - `svg_file` string, uri, nullable
  - `png` string, uri, nullable
  - `created` string, date-time, required
  - `gps_tracking` boolean
  - `folder` FolderRef, nullable: The folder a code is filed in, or null when unfiled.
    - `id` string, uuid, required
    - `name` string, required
    - `slug` string, nullable, required
    - `path` string, required: Full breadcrumb, e.g. `Campaigns / Spring 2026`.
  - `vcard` VCard
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `mobile_number` string, nullable
    - `phone_number` string, nullable
    - `website` string, nullable
    - `email` string, nullable
    - `company_name` string, nullable
    - `position` string, nullable
    - `street` string, nullable
    - `city` string, nullable
    - `state` string, nullable
    - `country` string, nullable
    - `post_code` string, nullable
    - `description` string, nullable
  - `gs1_product` GS1ProductSummary
    - `id` string, uuid
    - `identifier_type` '01' | '00' | '414' | '417' | '253' | '255' | '401' | '402' | '8003' | '8004' | '8006' | '8010' | '8013' | '8017' | '8018'
    - `identifier_value` string
    - `digital_link_path` string
  - `error_correction` 'L' | 'M' | 'Q' | 'H' | 'null', nullable
  - `pdf_file_url` string, uri: The raw hosted PDF file.

## Other responses

- `400`: Validation error.
- `401`: Missing or invalid API token.
- `404`: Not found, or not in a workspace you belong to.
- `415`: Request body was not JSON.
- `429`: Rate limit exceeded. Wait `Retry-After` seconds before retrying.

---

[API](https://skmtc.dev/hovercode/apis/hovercode-api.md) · [All operations](https://skmtc.dev/hovercode/apis/hovercode-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hovercode/apis/hovercode-api/revisions/4a9bc3cafe41?raw)
