Upload Document
Create and save a document in the Workspace using file upload or a PDF template.
method field:
file-upload- import an existing file from a URL or multipart uploadtemplate- generate a PDF from a Lumin PDF template and optionally prefill fields
document_id in the id field. Use that ID with PDF operation endpoints such as Merge Documents or Compress Document.
Upload from file
Setmethod to file-upload and provide the file via document_data.file_url or a multipart document_data.file upload.
Supported file formats
PDF, DOCX, XLSX, PPTX, DOC, XLS, PNG, JPEG/JPGFile size limits
| Plan | Max size |
|---|---|
| Free | 20 MB |
| Paid | 200 MB |
Create from template
Setmethod to template, provide a pdf_ template ID, and optionally prefill form fields.
- List templates with List Templates and find a template whose ID starts with
pdf_. - Optionally inspect fields with Get Template Details.
pdf_ prefix) are supported for document creation.
| Field | Description |
|---|---|
document_data.template_id | PDF template ID (must start with pdf_). |
document_data.fields | Optional key–value pairs for form fields defined in the template. Supports text and checkbox fields. |
Required scopes (OAuth 2.0)
Required scopes (OAuth 2.0)
pdf:filesAuthorizations
Provide your API key in the X-API-Key header, e.g., X-API-Key: YOUR_API_KEY.
Body
- file-upload
- template
Import from a file (PDF or other supported formats).
file-upload Human-friendly title of the document (1–255 characters).
1 - 255Payload for file-upload method.
Response
Returns the summary of the created document.
Unique identifier of the document in Lumin.
Human-friendly name of the document.
Unix timestamp (milliseconds) when the document was created.
Unix timestamp (milliseconds) when the document was last updated.
Where the document is stored.
Size of the PDF file in bytes.
MIME type of the file (e.g. application/pdf).
URL to open the document in Lumin's viewer.