A marketing letter that introduces a new product line and offers samples to loyal customers. It is addressed to each contact with their job title, company and address, and mentions the product release date. Download the Word file to replace the wording with your own, then generate a letter for every customer.
Upload the letter template, then send the structured data to get the finished document. Make sure to replace YOUR_API_KEY with your unique key and YOUR_TEMPLATE_ID with the ID of your template.
Send an array of JSON objects and get one document for each object, returned in a ZIP archive. Use the output_name parameter to customize each filename with the merge tags from your template.
Upload an Excel spreadsheet and every row becomes a document, with the column headers matching your merge tags. Use the sheet parameter to read a specific sheet from the Excel file.
curl -X 'POST' \
'https://api.docugenerate.com/v1/document' \
-H 'Accept: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"template_id": "YOUR_TEMPLATE_ID",
"output_format": ".pdf",
"data": {
"Name": "Olivia Treece",
"Job Title": "Financial Analyst",
"Company Name": "Block-Franecki",
"Street Address": "062 Hazelcrest Way",
"City": "Washington",
"State": "District of Columbia",
"Zip Code": "20210",
"Date of Product Release": "5/28/2024"
}
}' curl -X 'POST' \
'https://api.docugenerate.com/v1/document' \
-H 'Accept: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"template_id": "YOUR_TEMPLATE_ID",
"output_format": ".pdf",
"single_file": false,
"output_name": "Marketing Letter [Name]",
"data": [
{ "Name": "Olivia Treece", "Job Title": "Financial Analyst", "Company Name": "Block-Franecki", "Street Address": "062 Hazelcrest Way", "City": "Washington", "State": "District of Columbia", "Zip Code": "20210", "Date of Product Release": "5/28/2024" },
{ "Name": "Valentina Maben", "Job Title": "Design Engineer", "Company Name": "Blanda, Walker and Hoppe", "Street Address": "74201 Sunnyside Junction", "City": "Huntington", "State": "West Virginia", "Zip Code": "25726", "Date of Product Release": "1/22/2024" },
{ "Name": "Marleen Harkes", "Job Title": "Legal Assistant", "Company Name": "Morar and Sons", "Street Address": "78 Knutson Center", "City": "Durham", "State": "North Carolina", "Zip Code": "27717", "Date of Product Release": "2/3/2024" },
{ "Name": "Megan Dickey", "Job Title": "Social Worker", "Company Name": "Jerde and Sons", "Street Address": "606 Brentwood Park", "City": "Savannah", "State": "Georgia", "Zip Code": "31405", "Date of Product Release": "9/27/2024" },
{ "Name": "Andrea Cassells", "Job Title": "Tax Accountant", "Company Name": "Gottlieb and Sons", "Street Address": "347 Hansons Lane", "City": "San Antonio", "State": "Texas", "Zip Code": "78260", "Date of Product Release": "6/15/2024" },
{ "Name": "Charmian O’Shevlan", "Job Title": "Geologist IV", "Company Name": "Volkman Group", "Street Address": "59690 Scoville Center", "City": "New York City", "State": "New York", "Zip Code": "10110", "Date of Product Release": "5/24/2024" },
{ "Name": "Shirline Torricina", "Job Title": "Director of Sales", "Company Name": "O'\''Conner-Weimann", "Street Address": "9 Cherokee Avenue", "City": "Bakersfield", "State": "California", "Zip Code": "93386", "Date of Product Release": "3/20/2024" },
{ "Name": "Dix Beards", "Job Title": "Business Systems Development Analyst", "Company Name": "Reinger-Brakus", "Street Address": "123 Old Gate Plaza", "City": "Salt Lake City", "State": "Utah", "Zip Code": "84125", "Date of Product Release": "12/11/2023" },
{ "Name": "Bobbie Houchin", "Job Title": "Director of Sales", "Company Name": "Boyer and Sons", "Street Address": "245 Manley Park", "City": "Oklahoma City", "State": "Oklahoma", "Zip Code": "73167", "Date of Product Release": "7/16/2024" },
{ "Name": "Ame Batram", "Job Title": "Marketing Assistant", "Company Name": "Macejkovic-Kirlin", "Street Address": "3 Sage Road", "City": "Houston", "State": "Texas", "Zip Code": "77288", "Date of Product Release": "7/4/2024" }
]
}' curl -X 'POST' \
'https://api.docugenerate.com/v1/document' \
-H 'Accept: application/json' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: multipart/form-data' \
-F 'template_id=YOUR_TEMPLATE_ID' \
-F 'file=@Marketing Letter Batch.xlsx' \
-F 'output_format=.pdf' \
-F 'single_file=false' \
-F 'output_name=Marketing Letter [Name]' Questions frequently asked about our letter templates
Get started with 20 free documents per month and our ready-to-use letter templates.