---
title: "Create PDF"
method: POST
path: "/v{version}/pdfs"
tags: ["PDFs"]
---

# Create PDF

`POST /v{version}/pdfs`

## Request

- Base URL: `https://api.pdfless.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pdfless.com/v{version}/pdfs`
- Auth: API key in header `apikey`

Generate document based on template ID and payload data

## Path parameters

- `version` string, required

## Request body

- GeneratePDFCommand
  - `template_id` string, uuid
  - `payload` unknown
  - `reference_id` string
  - `encryption_user_password` string
  - `encryption_owner_password` string
  - `encryption_allow_printing` boolean
  - `encryption_allow_modifying` boolean
  - `encryption_allow_modify_annotations` boolean
  - `encryption_allow_content_copying` boolean
  - `encryption_allow_screenreaders` boolean
  - `encryption_allow_form_filling` boolean
  - `encryption_allow_document_assembly` boolean

## Response `200`

Success

- PDFDtoApiResult
  - `data` PDFDto
    - `reference_id` string: Internal reference identifier
    - `template_id` string, uuid: Targeting template identifier
    - `download_url` string: URL of generated document
    - `expires` string, date-time: Expiration date
    - `created_at` string, date-time: Creation date
  - `status` string

## Other responses

- `500`: Server Error

---

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