Documentation Index
Fetch the complete documentation index at: https://mintfax.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Cover-page templating with tokens
Outcome
After completing these steps you can attach cover pages to faxes through the mintfax API, personalize them with tokens, set workspace-level defaults, build custom HTML cover pages, and use the HIPAA-compliant variant that strips patient-identifiable information from the rendered output.Prerequisites
- A mintfax account with a sandbox API key (
fx_test_...). See the quickstart if you have not created one yet. - Node.js 18 or later installed.
- The
node-fetchandform-datapackages (or Node 18+ built-infetch).
Step 1: Send a fax with a built-in cover page
Passcover_page in the request body to attach a built-in template. Start with standard.
queued and the fax renders with a cover page as the first page.
Step 2: Personalize with tokens
Templates support tokens that mintfax replaces at send time. Wrap each token in double curly braces.| Token | Replaced with |
|---|---|
{{recipient_name}} | Value of the recipient_name field on the request |
{{recipient_fax}} | The to number in E.164 format |
{{sender_name}} | Sender name from workspace settings |
{{sender_company}} | Company name from workspace settings |
{{sender_fax}} | Sender fax number from workspace settings |
{{date}} | Send date in ISO 8601 (UTC) |
{{page_count}} | Total page count including the cover page |
{{subject}} | Value of the subject field on the request |
{{message}} | Value of the message field on the request |
GET /fax/{id}/image and confirm the cover page shows the recipient name, subject, and message you provided.
Step 3: Use the HIPAA-compliant cover page variant
Thehipaa template prints a confidentiality notice and omits patient-identifiable tokens from the rendered output. You still pass {{recipient_name}} and {{message}} in the request, and mintfax stores them on the fax record for your own tracking. The cover page itself prints only the receiving number, sender company, page count, and the HIPAA confidentiality disclaimer.
Step 4: Build a custom HTML cover page
When you need full control over layout, pass acover_page_html field with your own HTML instead. mintfax renders it as the first page of the fax. Tokens work the same way they do in built-in templates.
Step 5: Set a workspace-level default cover page
You can set a default cover page at the workspace level so you do not have to pass it on every request. Every fax from this workspace uses the default unless the request overrides it.cover_page field. The fax should render with the standard cover page from your workspace defaults.
To override the default on a single fax, pass cover_page or cover_page_html in the send request. To send a fax with no cover page at all when a default is set, pass cover_page: "none".
Verify
Send a fax to the sandbox success number+15005550001 with a cover page attached. Retrieve the fax image with GET /fax/{id}/image and confirm the cover page renders as the first page with your token values filled in.
For HIPAA-regulated workflows, confirm that the hipaa template omits patient-identifiable information from the rendered cover page. The glossary defines fax-domain terms like T.30, ECM, and FoIP that appear in cover page rendering logs.
What to do next
- Glossary - fax-domain terms referenced in this guide
- Webhooks - receive delivery confirmation when your fax (with cover page) is delivered
- Data retention - understand how long fax images, including cover pages, are stored
- Sandbox - test cover page rendering with magic fax numbers