
8.5 × 11 in
Letters
Formal business letter
A US Letter business letter in full block format below a centred letterhead. It covers the date, delivery notation, inside address, a Re: line, paragraphs from an array and a signature block, with enclosures and cc lists printed only when provided.
PDFLetter portraitLocale en-USHTML + Jinja
Opens Dynamic Document API with this template preloaded in a free workspace.
Template language features
- Loops
- Conditionals
- Filters
- Date formatting
Filters such as format_currency and qrcode are described in the template language reference.
Variables
Derived from the sample data: 6 top-level fields, 26 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| sender | object | |
| sender.organization | string | "Redwater Valley Growers Cooperative" |
| sender.department | string | "Procurement Office" |
| sender.address | string | "2140 Orchard Loop Road, Alder Springs, OR 9703…" |
| sender.phone | string | "+1 202-555-0134" |
| sender.email | string | "procurement@redwatervalley.example.org" |
| sender.website | string | "redwatervalley.example.org" |
| letter | object | |
| letter.date | date | "2026-09-17" |
| letter.locale | string | "en-US" |
| letter.delivery_method | string | "Via email and certified mail" |
| letter.subject | string | "Supply agreement SA-2024-117, changes for the …" |
| letter.salutation | string | "Dear Mr. Carvalho:" |
| letter.paragraphs | array<string> · 4 | "Thank you for your team's support throughout t…" |
| letter.closing | string | "Sincerely," |
| letter.typist_initials | string | "EVH/jmt" |
| recipient | object | |
| recipient.name | string | "Mr. Daniel Carvalho" |
| recipient.title | string | "Director of Customer Accounts" |
| recipient.organization | string | "Alder & Finch Packaging Co." |
| recipient.address | string | "655 Riverside Industrial Parkway, Suite 300 ⏎ …" |
| signatory | object | |
| signatory.name | string | "Eleanor V. Hastings" |
| signatory.title | string | "Director of Procurement" |
| enclosures | array<string> · 2 | "Packaging specification sheet RVG-PS-07, revis…" |
| cc | array<string> · 2 | "Dana Whitfield, Operations Manager, Redwater V…" |
Render it with the API
After adding the template to your workspace, render it by ID and pass your data. Arrays are shortened here.
curl -X POST https://api-eu.dynamicdocumentapi.com/v1/renders \
-H "Authorization: Bearer $DYNAMIC_DOCUMENT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"sender": {
"organization": "Redwater Valley Growers Cooperative",
"department": "Procurement Office",
"address": "2140 Orchard Loop Road, Alder Springs, OR 97031",
"phone": "+1 202-555-0134",
"email": "procurement@redwatervalley.example.org",
"website": "redwatervalley.example.org"
},
"letter": {
"date": "2026-09-17",
"locale": "en-US",
"delivery_method": "Via email and certified mail",
"subject": "Supply agreement SA-2024-117, changes for the 2027 season",
"salutation": "Dear Mr. Carvalho:",
"paragraphs": [
"Thank you for your team'\''s support throughout the 2026 harvest. As we prepare for the 2027 season, I am writing to confirm two changes to the packaging and deliveries covered by our supply agreement.",
"From January 11, 2027, our member orchards will switch from 40-pound corrugated cases to 30-pound cases with reinforced hand holds. The enclosed specification sheet lists the new dimensions, board grade and print layout. Our forecast volumes are unchanged once converted to the smaller case size."
],
"closing": "Sincerely,",
"typist_initials": "EVH/jmt"
},
"recipient": {
"name": "Mr. Daniel Carvalho",
"title": "Director of Customer Accounts",
"organization": "Alder & Finch Packaging Co.",
"address": "655 Riverside Industrial Parkway, Suite 300\nTacoma, WA 98421"
},
"signatory": {
"name": "Eleanor V. Hastings",
"title": "Director of Procurement"
},
"enclosures": [
"Packaging specification sheet RVG-PS-07, revision C",
"Revised delivery calendar, January to June 2027"
],
"cc": [
"Dana Whitfield, Operations Manager, Redwater Valley Growers Cooperative",
"Luis Carrasco, Quality Assurance Lead, Alder & Finch Packaging Co."
]
},
"output": {
"format": "pdf",
"filename": "letter-business-formal.pdf"
}
}'const response = await fetch("https://api-eu.dynamicdocumentapi.com/v1/renders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DYNAMIC_DOCUMENT_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"sender": {
"organization": "Redwater Valley Growers Cooperative",
"department": "Procurement Office",
"address": "2140 Orchard Loop Road, Alder Springs, OR 97031",
"phone": "+1 202-555-0134",
"email": "procurement@redwatervalley.example.org",
"website": "redwatervalley.example.org"
},
"letter": {
"date": "2026-09-17",
"locale": "en-US",
"delivery_method": "Via email and certified mail",
"subject": "Supply agreement SA-2024-117, changes for the 2027 season",
"salutation": "Dear Mr. Carvalho:",
"paragraphs": [
"Thank you for your team's support throughout the 2026 harvest. As we prepare for the 2027 season, I am writing to confirm two changes to the packaging and deliveries covered by our supply agreement.",
"From January 11, 2027, our member orchards will switch from 40-pound corrugated cases to 30-pound cases with reinforced hand holds. The enclosed specification sheet lists the new dimensions, board grade and print layout. Our forecast volumes are unchanged once converted to the smaller case size."
],
"closing": "Sincerely,",
"typist_initials": "EVH/jmt"
},
"recipient": {
"name": "Mr. Daniel Carvalho",
"title": "Director of Customer Accounts",
"organization": "Alder & Finch Packaging Co.",
"address": "655 Riverside Industrial Parkway, Suite 300\nTacoma, WA 98421"
},
"signatory": {
"name": "Eleanor V. Hastings",
"title": "Director of Procurement"
},
"enclosures": [
"Packaging specification sheet RVG-PS-07, revision C",
"Revised delivery calendar, January to June 2027"
],
"cc": [
"Dana Whitfield, Operations Manager, Redwater Valley Growers Cooperative",
"Luis Carrasco, Quality Assurance Lead, Alder & Finch Packaging Co."
]
},
"output": {
"format": "pdf",
"filename": "letter-business-formal.pdf"
}
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const result = await response.json();
console.log(result);import os
import uuid
import requests
response = requests.post(
"https://api-eu.dynamicdocumentapi.com/v1/renders",
headers={
"Authorization": f"Bearer {os.environ['DYNAMIC_DOCUMENT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C",
},
"data": {
"sender": {
"organization": "Redwater Valley Growers Cooperative",
"department": "Procurement Office",
"address": "2140 Orchard Loop Road, Alder Springs, OR 97031",
"phone": "+1 202-555-0134",
"email": "procurement@redwatervalley.example.org",
"website": "redwatervalley.example.org",
},
"letter": {
"date": "2026-09-17",
"locale": "en-US",
"delivery_method": "Via email and certified mail",
"subject": "Supply agreement SA-2024-117, changes for the 2027 season",
"salutation": "Dear Mr. Carvalho:",
"paragraphs": ["Thank you for your team's support throughout the 2026 harvest. As we prepare for the 2027 season, I am writing to confirm two changes to the packaging and deliveries covered by our supply agreement.", "From January 11, 2027, our member orchards will switch from 40-pound corrugated cases to 30-pound cases with reinforced hand holds. The enclosed specification sheet lists the new dimensions, board grade and print layout. Our forecast volumes are unchanged once converted to the smaller case size."],
"closing": "Sincerely,",
"typist_initials": "EVH/jmt",
},
"recipient": {
"name": "Mr. Daniel Carvalho",
"title": "Director of Customer Accounts",
"organization": "Alder & Finch Packaging Co.",
"address": "655 Riverside Industrial Parkway, Suite 300\nTacoma, WA 98421",
},
"signatory": {
"name": "Eleanor V. Hastings",
"title": "Director of Procurement",
},
"enclosures": ["Packaging specification sheet RVG-PS-07, revision C", "Revised delivery calendar, January to June 2027"],
"cc": ["Dana Whitfield, Operations Manager, Redwater Valley Growers Cooperative", "Luis Carrasco, Quality Assurance Lead, Alder & Finch Packaging Co."],
},
"output": {
"format": "pdf",
"filename": "letter-business-formal.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())