Template gallery / letterhead
letterhead
Business letter on letterhead: masthead rule, date and reference line, inside address, subject, body paragraphs, closing and signature block, enclosures and cc. Continuation pages keep a short running head.
chromium default PDF 17 top-level fields 1 unit per page
Fields
The full JSON Schema is below. Required fields are marked; anything missing comes back as a 422 naming the path, the expected type and a value that would be accepted.
| Field | Type | Required | Description |
|---|---|---|---|
| date | string (date) | required | |
| reference | string | optional | Your own file reference. |
| their_reference | string | optional | |
| delivery_method | string | optional | |
| subject | string | optional | |
| subject_label | string | optional | |
| salutation | string | optional | |
| valediction | string | optional | |
| accent | string | optional | |
| text_align | "left" | "justify" | optional | |
| footer | string | optional | Optional rule and note at the foot of the sheet. |
| sender | object { organization, strapline, address, phone, … } | required | |
| recipient | object { name, title, organization, address_lines } | required | |
| body | array of object { text, list } | required | Paragraphs in order. A block is either { text } or { list: [...] } for a bulleted run. |
| signature | object { name, title, organization, script } | required | |
| enclosures | array of string | optional | |
| cc | array of string | optional |
Default render options
Applied unless you override them. Options are part of the cache key.
| page_size | "Letter" |
| margin | "0.8in" |
| print_background | true |
Example payload
This exact object renders the preview above. It is also what the API echoes back in a validation error, so an agent can repair a payload without a round trip to the docs.
{
"date": "2026-09-16",
"reference": "HR-2026-118",
"delivery_method": "By certified mail and email",
"subject": "Notice of substantial completion — 412 Ash Street",
"salutation": "Dear Ms. Reyes,",
"accent": "#0f2e3d",
"sender": {
"organization": "Halyard Remodeling LLC",
"strapline": "Residential remodeling since 2009",
"address": "18 Dock St, Fernandina Beach, FL 32034",
"phone": "(904) 555-0142",
"email": "office@halyardremodel.test",
"website": "halyardremodel.test",
"license_number": "CBC1259847"
},
"recipient": {
"name": "Dana Reyes",
"title": "Homeowner",
"address_lines": [
"412 Ash Street",
"Fernandina Beach, FL 32034"
]
},
"body": [
{
"text": "The hall bathroom remodel at the address above reached substantial completion on September 14, 2026, when Nassau County signed off on the final inspection. The room is safe to use and the work is complete except for the punch items below."
},
{
"text": "Our crew will return on Tuesday, September 22, to close out the following:"
},
{
"list": [
"Touch-up paint at the door casing and the return above the tub",
"Replace the vanity drawer pull that arrived scratched",
"Adjust the pocket door guide, which drags at the last inch",
"Silicone bead at the tub-to-tile joint once the grout has cured a full week"
]
},
{
"text": "The one-year workmanship warranty begins on the date of substantial completion above, not on the date the punch list closes. The enclosed certificate of completion has also been filed with your permit record."
},
{
"text": "Your final invoice is enclosed. It reflects the original contract sum, the three authorized change orders, and the niche credit, and is due within 30 days."
},
{
"text": "It has been a pleasure working in your home. Please call the office directly if anything comes up this year — warranty calls skip the scheduling queue."
}
],
"valediction": "Sincerely,",
"signature": {
"name": "Priya Raman",
"title": "Owner",
"organization": "Halyard Remodeling LLC",
"script": "Priya Raman"
},
"enclosures": [
"Certificate of completion",
"Final invoice INV-1042",
"Change orders CO-001 through CO-003"
],
"cc": [
"Marcus Reyes",
"Nassau County Building Dept. (file copy)"
]
} Render it
curl -sS https://api.galleyrender.com/v1/render \
-H "Authorization: Bearer $GALLEY_API_KEY" \
-H 'content-type: application/json' \
-d '{
"template": "letterhead@1",
"format": "pdf",
"data": "… the example payload above …"
}' # No API key. The first call mints a 50-render trial.
curl -sS https://mcp.galleyrender.com/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "render",
"arguments": {
"template": "letterhead",
"format": "pdf",
"data": { … see the example payload above … }
}
}
}'
Pin the version — letterhead@1 — in anything you ship. Publishing a new
version never changes an old one. Render endpoint reference →
Renders the example payload on the production service. No account, no key.
JSON Schema
schema.json (17 top-level properties)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Letter on letterhead",
"type": "object",
"required": [
"sender",
"recipient",
"date",
"body",
"signature"
],
"additionalProperties": true,
"properties": {
"date": {
"type": "string",
"format": "date",
"examples": [
"2026-09-16"
]
},
"reference": {
"type": "string",
"description": "Your own file reference.",
"examples": [
"HR-2026-118"
]
},
"their_reference": {
"type": "string",
"examples": [
"CLM-88421"
]
},
"delivery_method": {
"type": "string",
"examples": [
"By certified mail and email"
]
},
"subject": {
"type": "string",
"examples": [
"Notice of substantial completion — 412 Ash Street"
]
},
"subject_label": {
"type": "string",
"default": "Re:",
"examples": [
"Re:"
]
},
"salutation": {
"type": "string",
"default": "Dear Sir or Madam,",
"examples": [
"Dear Ms. Reyes,"
]
},
"valediction": {
"type": "string",
"default": "Sincerely,",
"examples": [
"Sincerely,"
]
},
"accent": {
"type": "string",
"examples": [
"#0f2e3d"
]
},
"text_align": {
"type": "string",
"enum": [
"left",
"justify"
],
"default": "left",
"examples": [
"left"
]
},
"footer": {
"type": "string",
"description": "Optional rule and note at the foot of the sheet.",
"examples": [
"Halyard Remodeling LLC · CBC1259847 · halyardremodel.test"
]
},
"sender": {
"type": "object",
"required": [
"organization"
],
"properties": {
"organization": {
"type": "string",
"examples": [
"Halyard Remodeling LLC"
]
},
"strapline": {
"type": "string",
"examples": [
"Residential remodeling since 2009"
]
},
"address": {
"type": "string",
"examples": [
"18 Dock St, Fernandina Beach, FL 32034"
]
},
"phone": {
"type": "string",
"examples": [
"(904) 555-0142"
]
},
"email": {
"type": "string",
"format": "email",
"examples": [
"office@halyardremodel.test"
]
},
"website": {
"type": "string",
"examples": [
"halyardremodel.test"
]
},
"license_number": {
"type": "string",
"examples": [
"CBC1259847"
]
},
"logo_url": {
"type": "string",
"format": "uri",
"examples": [
"https://example.com/logo.png"
]
}
}
},
"recipient": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"examples": [
"Dana Reyes"
]
},
"title": {
"type": "string",
"examples": [
"Homeowner"
]
},
"organization": {
"type": "string",
"examples": [
"Acme Robotics"
]
},
"address_lines": {
"type": "array",
"description": "One line per line of the inside address.",
"items": {
"type": "string",
"examples": [
"412 Ash Street"
]
},
"examples": [
[
"412 Ash Street",
"Fernandina Beach, FL 32034"
]
]
}
}
},
"body": {
"type": "array",
"minItems": 1,
"description": "Paragraphs in order. A block is either { text } or { list: [...] } for a bulleted run.",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"examples": [
"The hall bathroom remodel reached substantial completion on September 14, 2026."
]
},
"list": {
"type": "array",
"items": {
"type": "string",
"examples": [
"Touch-up paint at the door casing"
]
},
"examples": [
[
"Touch-up paint at the door casing"
]
]
}
}
}
},
"signature": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"examples": [
"Priya Raman"
]
},
"title": {
"type": "string",
"examples": [
"Owner"
]
},
"organization": {
"type": "string",
"examples": [
"Halyard Remodeling LLC"
]
},
"script": {
"type": "string",
"description": "Drawn above the name in italic serif, in place of a scanned signature.",
"examples": [
"Priya Raman"
]
}
}
},
"enclosures": {
"type": "array",
"items": {
"type": "string",
"examples": [
"Certificate of completion"
]
},
"examples": [
[
"Certificate of completion",
"Final invoice INV-1042"
]
]
},
"cc": {
"type": "array",
"items": {
"type": "string",
"examples": [
"Marcus Reyes"
]
},
"examples": [
[
"Marcus Reyes"
]
]
}
}
}