Documentation  ›  API Reference

Document help center

Choose a task, follow its example, then try it with your own file. Start in the browser — no Base64 tools needed.

Your first request

  1. Get an active API key from your dashboard on this environment. A key from another environment may not work.
  2. Choose an action below and press Try Online. This loads the correct example.
  3. Choose your input file in File 1. For merge, choose a second PDF in File 2; for image watermark, choose a PNG/JPEG there.
  4. Paste your key and edit the example values. Keep the Base64 placeholders unchanged; the tester fills them from your upload.
  5. Press Run Request. Check the status and response. File results enable Download Output; text and metadata results appear as JSON.
Walkthrough: create a Word template and export PDF

Quick start: DOCX template to PDF

  1. Create a Word file and add placeholders such as <<[customer.name]>>.
  2. In the web tester, upload the DOCX directly. For API clients only: Linux uses base64 -w 0 invoice-template.docx, macOS uses base64 -i invoice-template.docx, and PowerShell uses [Convert]::ToBase64String([IO.File]::ReadAllBytes('invoice-template.docx')).
  3. Send the request below with your dashboard API key. Replace <base64_docx> with the value from step 2.
curl -X POST https://flowdocker.com/v1/document/populate-docx-to-pdf \
  -H "x-api-key: YOUR_API_KEY" -H "content-type: application/json" \
  --data '{"fileName":"invoice-template.docx","fileContentBase64":"<base64_docx>","data":{"customer":{"name":"Nguyen Van A","vip":true},"invoice":{"reference":"INV-1001","total":"330 USD"}},"outputFileName":"invoice.pdf"}'

The curl example above is for Bash on the FlowDocker test environment. Save the JSON response as response.json. Decode only its fileContentBase64 property, never the whole JSON. In the browser, simply use Download Output.

Copy-ready template and data

In Word, type these lines (the spelling and brackets must match):

Invoice: <<[invoice.reference]>>
Customer: <<[customer.name]>>
Total: <<[invoice.total]>>
<<if [customer.vip]>>VIP customer<<else>>Standard customer<</if>>

Use this matching data object:

{
  "invoice": { "reference": "INV-1001", "total": "330 USD" },
  "customer": { "name": "Nguyen Van A", "vip": true }
}

Web tester shortcut: click the endpoint's Try Online, choose the DOCX in File 1, leave <base64_docx> in the payload, paste your API key, and run. Do not paste the binary file itself into the JSON.

PowerShell output: save the JSON response as response.json, then run $r = Get-Content response.json | ConvertFrom-Json; [IO.File]::WriteAllBytes('invoice.pdf',[Convert]::FromBase64String($r.fileContentBase64)).

Replace the entire data object in the tester with the object above. Expected output: INV-1001, Nguyen Van A, 330 USD and VIP customer. To keep an editable Word document, choose Populate Word Template and use an output name ending in .docx.

Supported: fields, nested properties, loops and conditions. Images, HTML insertion and charts in templates are not supported yet.

Authentication

  • /v1/document/* and /v1/pdf/* use header x-api-key. Keep your key private.
  • Request format is JSON with base64 file content.

Errors

  • 401: key missing or invalid. Check your dashboard key and environment.
  • 400 / TEMPLATE_DATA_MISSING: compare missing properties in the error with your data. Use allowMissingValues: true only if blank values are intentional.
  • TEMPLATE_SYNTAX_ERROR: check matching opening/closing if and foreach tags.
  • 429: request limit reached. Wait before retrying.
  • Conversion unavailable: retry later; contact support with the response request ID if it persists.

All errors follow standard structure:

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "human readable message",
    "details": []
  }
}

Import and Tooling

Download the live OpenAPI files or Postman collection directly from this environment. The exported spec uses the current host so you can import it into Power Automate without editing the base URL first.

Power Automate

Use the connector-focused OpenAPI 2.0 document with grouped Word template and PDF actions.

Recommended for Power Automate custom connectors. Includes Word template and PDF actions grouped by category.

OpenAPI 3.0

Use the OpenAPI 3.0 export for tooling that expects the newer schema format.

Useful for SDK generators and API platforms.

Postman Collection

Import the collection with the current environment base URL already injected.

Includes the active host for this deployment.

  1. Open Power Automate and create a Custom Connector from an OpenAPI file.
  2. Upload the downloaded Power Automate OpenAPI document.
  3. Set API key authentication to the x-api-key header.
  4. Create a connection with your MiniPDF API key, then call the desired document or PDF operation.

Try API Online

Select endpoint below

Upload the file(s), paste a real API key, and keep the <base64_...> placeholders. DOCX, PDF, and image content is injected automatically.

No request executed yet.

{}

Ready to start building?

Get your API key and process your first document in seconds.