/// GENERATE
1 credit

DOCX Template API — render Word documents from JSON

Upload a .docx with {{ variables }} and table loops; render it from JSON data to DOCX or PDF.

/// Quick answer

A DOCX template is a normal Word document with {{ }} placeholders and row loops inside its tables. ASHDOCS fills it from a JSON payload and returns the finished document — which means the person who owns the wording can keep owning it, in Word, without touching any code.

Try DOCX Template API — free →Read the docs

Free account. No card required.

How does the DOCX Template API work?

One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.

curl -X POST https://www.ashdocs.com/api/v2/tools/docx-template \
  -H "X-API-Key: ash_live_..." \
  -H "Content-Type: application/json" \
  -d '{"template_id":"dtpl_...","data":{"customer_name":"Ada","items":[{"name":"Widget","price":10}]},"output":"pdf"}'

Common use cases

Frequently asked questions

Do I need Word installed anywhere?+

No. The template is a .docx file; filling it does not require Word, and neither does converting it.

Why did my placeholder not get replaced?+

Almost always because Word split it across text runs. Retype it in one action or paste it as plain text.

Can a template have conditional sections?+

Yes. Templates are filled by docxtpl in a sandboxed Jinja2 environment, so {% if %} … {% endif %} blocks work alongside {{ }} placeholders and {%tr for %} row loops; docxtpl's {%p if %} form shows or hides a whole paragraph.

How much does it cost?+

One credit for a .docx, two when you ask for the PDF — the conversion is the second credit.

RELATED TOOLS