/// 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

DOCX Template renders a Word document you upload once (with `{{ variable }}` placeholders and `{%tr for %}`/`{%tr endfor %}` table-row loops) against JSON data you send per call, returning a real editable DOCX or, with `output: "pdf"`, a converted PDF (2 credits instead of 1). Rendering runs inside a sandboxed template engine — a template can't reach outside its own variables — and a variable your data doesn't supply returns a clear 422 (`missing_variable`) unless you pass `strict: false`.

Try DOCX Template API — free →Read the docs

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://api.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}],"total":10},"output":"pdf"}'

Common use cases

Frequently asked questions

How much does the DOCX Template API tool cost?+

1 credit per successful call. Sandbox keys (prefix ash_test_) run the tool end-to-end without ever consuming credits — use them in CI or for tuning.

What is the endpoint URL for this tool?+

The endpoint is documented in the curl example on this page. All ASHDOCS endpoints share the base URL https://www.ashdocs.com and require an X-API-Key header.

Can I run this tool inside Make, Zapier, or n8n?+

Yes — through each platform's built-in HTTP mechanism (Make's HTTP module, Webhooks by Zapier, n8n's HTTP Request node). Nothing to install: point it at this exact endpoint with your X-API-Key header. See /integrations/make, /integrations/zapier or /integrations/n8n for step-by-step setup.

Does this tool support batch or scheduled runs?+

Yes. POST /api/v1/batch runs any tool over up to 50 files with a single credit ledger entry, and pipeline schedules let you trigger the same tool on a cron. Both are documented in /docs.

RELATED TOOLS