Skip to main content

API

Use the Pritset API to manage reusable DOCX templates and generate PDFs from them.

Start hereโ€‹

  • Quickstart โ€” create an account, upload the sample DOCX, and generate your first PDF.
  • Template management โ€” create, list, inspect, update, download, validate, and delete templates.
  • Templating syntax โ€” define placeholders, loops, links, images, and charts in a DOCX file.
  • Direct and webhook processing โ€” combine a stored template with JSON data and generate a PDF.
  • Error handling โ€” understand response formats, status codes, and retry behavior.

Authenticationโ€‹

Create an access token and secret on the Profile page, then include them in every API request.

HeaderValue
AuthorizationYour access token.
X-SecretYour secret.

Generate a PDF directlyโ€‹

After you upload a template, replace the placeholders below and send JSON that matches its templating syntax:

curl --request POST \
"https://api.pritset.com/api/template/process/direct/YOUR_TEMPLATE_ID" \
--header "Authorization: YOUR_ACCESS_TOKEN" \
--header "X-Secret: YOUR_SECRET" \
--form 'data={"title":"Hello Pritset","description":"Generated from the sample template.","advantages":[{"title":"First result","description":"The API returned a PDF."}]}' \
--output generated.pdf

A successful direct request returns application/pdf; this command saves the response as generated.pdf. The payload matches the sample used in the quickstart. See Template processing for the complete direct and webhook request formats.

Explore with Postmanโ€‹

If you prefer a graphical API client, download the Pritset API Postman collection and import it into Postman.

Set its token and secret variables to your Pritset credentials. The apiBaseUrl variable defaults to https://api.pritset.com.

You can now upload and manage a template or process an existing template.