{"info":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","description":"<html><head></head><body><h1 id=\"introduction\">🚀 Introduction</h1>\n<p>With the MailMergic API, you can easily generate transactional documents (both PDF and Word files) and reduce development and maintenance costs.</p>\n<p><strong>API access requires a Starter, Pro or Enterprise subscription plan. Users on other plans will receive a 403 error when authenticating with an API key.</strong></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>All API requests require an API key passed in the <code>X-API-KEY</code> header:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>X-API-KEY: your-api-key-here\n\n</code></pre><p>You can obtain your API key from the MailMergic dashboard.</p>\n<h2 id=\"template-id\">Template ID</h2>\n<p>The <code>templateId</code> path parameter accepts both formats on all endpoints:</p>\n<ul>\n<li><p>With prefix: <code>tmpl_2LH43zXzZ1ighsivvkHa</code></p>\n</li>\n<li><p>Without prefix: <code>2LH43zXzZ1ighsivvkHa</code></p>\n</li>\n</ul>\n<p>Both formats are accepted interchangeably on every endpoint.</p>\n<h2 id=\"placeholders\">Placeholders</h2>\n<p>Placeholders are the dynamic fields in your template that get replaced with the values you provide. Each placeholder is an object with a <code>name</code> and <code>value</code> field:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"placeholders\": [\n    {\"name\": \"First Name\", \"value\": \"Peter\"},\n    {\"name\": \"Age\", \"value\": \"31\"}\n  ]\n}\n\n</code></pre>\n<h2 id=\"error-responses\">Error Responses</h2>\n<p>All API error responses use this format:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\"error\":{\"code\":\"ERROR_CODE\",\"message\":\"Human-readable description\"}}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>MISSING_TEMPLATE_ID</td>\n<td>400</td>\n<td>Template ID not provided</td>\n</tr>\n<tr>\n<td>INVALID_TEMPLATE_ID</td>\n<td>400</td>\n<td>Invalid format</td>\n</tr>\n<tr>\n<td>TEMPLATE_NOT_FOUND</td>\n<td>400</td>\n<td>No template with given ID</td>\n</tr>\n<tr>\n<td>INVALID_CHARACTERS</td>\n<td>400</td>\n<td>Disallowed special characters</td>\n</tr>\n<tr>\n<td>MISSING_PLACEHOLDERS</td>\n<td>400</td>\n<td>Placeholders array missing</td>\n</tr>\n<tr>\n<td>INVALID_PLACEHOLDERS</td>\n<td>400</td>\n<td>Not a valid array or empty</td>\n</tr>\n<tr>\n<td>INVALID_PLACEHOLDER_ENTRY</td>\n<td>400</td>\n<td>Entry is not a valid object</td>\n</tr>\n<tr>\n<td>MISSING_PLACEHOLDER_NAME</td>\n<td>400</td>\n<td>Missing name field</td>\n</tr>\n<tr>\n<td>MISSING_PLACEHOLDER_VALUE</td>\n<td>400</td>\n<td>Missing value field</td>\n</tr>\n<tr>\n<td>INVALID_FORM_OUTPUT</td>\n<td>400</td>\n<td>Must be \"keep\" or \"flatten\"</td>\n</tr>\n<tr>\n<td>INVALID_CUSTOM_NAME</td>\n<td>400</td>\n<td>Not a valid string</td>\n</tr>\n<tr>\n<td>INVALID_EMAIL_DATA</td>\n<td>400</td>\n<td>Not a valid object</td>\n</tr>\n<tr>\n<td>MISSING_EMAIL_ENABLED</td>\n<td>400</td>\n<td>isEnabled missing or not boolean</td>\n</tr>\n<tr>\n<td>MISSING_EMAIL_FROM</td>\n<td>400</td>\n<td>from object missing</td>\n</tr>\n<tr>\n<td>INVALID_EMAIL_FROM</td>\n<td>400</td>\n<td>from.email not valid</td>\n</tr>\n<tr>\n<td>MISSING_EMAIL_TO</td>\n<td>400</td>\n<td>to missing</td>\n</tr>\n<tr>\n<td>INVALID_EMAIL_TO</td>\n<td>400</td>\n<td>Not valid email</td>\n</tr>\n<tr>\n<td>INVALID_EMAIL_CC</td>\n<td>400</td>\n<td>Not valid email</td>\n</tr>\n<tr>\n<td>INVALID_EMAIL_BCC</td>\n<td>400</td>\n<td>Not valid email</td>\n</tr>\n<tr>\n<td>INVALID_EMAIL_FROM_NAME</td>\n<td>400</td>\n<td>Not a string</td>\n</tr>\n<tr>\n<td>INVALID_EMAIL_CONTENT</td>\n<td>400</td>\n<td>Not a string</td>\n</tr>\n<tr>\n<td>INVALID_EMAIL_SUBJECT</td>\n<td>400</td>\n<td>Not a string</td>\n</tr>\n<tr>\n<td>UNVERIFIED_SENDER</td>\n<td>400</td>\n<td>Sender not verified</td>\n</tr>\n<tr>\n<td>INVALID_PASSWORD_PROTECTION</td>\n<td>400</td>\n<td>Not a valid object</td>\n</tr>\n<tr>\n<td>INVALID_READ_PASSWORD</td>\n<td>400</td>\n<td>Invalid characters - only Latin letters, digits, and !@#$%^&amp;*() allowed</td>\n</tr>\n<tr>\n<td>INVALID_MODIFY_PASSWORD</td>\n<td>400</td>\n<td>Same constraint as read password</td>\n</tr>\n<tr>\n<td>VALIDATION_ERROR</td>\n<td>400</td>\n<td>Catch-all validation error</td>\n</tr>\n<tr>\n<td>MERGE_FAILED</td>\n<td>400/500</td>\n<td>Merge process failed</td>\n</tr>\n<tr>\n<td>FILE_GENERATION_FAILED</td>\n<td>500</td>\n<td>Output file could not be generated</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"🚀 Introduction","slug":"introduction"}],"owner":"11129869","collectionId":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","publishedId":"2s9YC1WZVy","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"06979e"},"publishDate":"2025-05-18T19:52:59.000Z"},"item":[{"name":"Generate Document","event":[{"listen":"test","script":{"id":"26741423-3c1a-4fd0-a226-8903b090253b","exec":["pm.test(\"Successful POST request\", function () {\r","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r","});"],"type":"text/javascript","packages":{}}}],"id":"0223fd54-e8cf-4a14-8a7a-c0b75cac2276","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"placeholders\": [\r\n        {\r\n            \"name\": \"First Name\", // Placeholder name matching the one in your template\r\n            \"value\": \"Peter\" // The value to be printed in the PDF can be specified here.\r\n        },\r\n        {\r\n            \"name\": \"Age\",\r\n            \"value\": \"31\"\r\n        },\r\n        {\r\n            \"name\": \"Image\", // Image placeholders can be printed if the placeholder type has been saved as \"Image\" through the web app\r\n            \"value\": \"peter.jpg\" // Upload the image through the web app and send the filename as value (case sensitivity is enforced for both uppercase and lowercase letters)\r\n        }\r\n    ],\r\n    \"formOutput\": \"flatten\", // optional, possible values: 'keep', 'flatten'\r\n    \"customDocumentName\": \"Document Name without extension\", // string without a filename extension, it cannot include special characters such as <>:\"/|?*.\r\n    \"passwordProtection\": {\r\n       // The password fields accepts only Latin alphabet characters (A–Z, a–z), digits (0–9), and the following special characters: !@#$%^&*()\r\n       \"modify\": \"123\", \r\n       \"read\": \"abc\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/v1/templates/:templateId/merges","description":"<p>Triggers the creation of a single PDF document that is merged with the data provided in the request. Returns an HTTP 201 response with the merge details and a temporary signed URL to download the generated PDF.</p>\n<p>The <code>templateId</code> path parameter accepts both formats: with prefix (e.g., <code>tmpl_2LH43zXzZ1ighsivvkHa</code>) or without (e.g., <code>2LH43zXzZ1ighsivvkHa</code>).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","type":"collection"}},"urlObject":{"path":["v1","templates",":templateId","merges"],"host":["{{base_url}}"],"query":[],"variable":[{"description":{"content":"<p>(Required) Template unique identifier</p>\n","type":"text/plain"},"type":"any","value":"{{tmpl_templateId}}","key":"templateId"}]}},"response":[{"id":"948ddb5c-3079-47e8-9423-6722603f7c3f","name":"Generate Document","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"data\": [\r\n        {\r\n            \"placeholder\": \"First Name\", // Placeholder name matching the one in your template\r\n            \"value\": \"Peter\" // The value to be printed in the PDF can be specified here.\r\n        },\r\n        {\r\n            \"placeholder\": \"Age\",\r\n            \"value\": \"31\"\r\n        },\r\n        {\r\n            \"placeholder\": \"Image\", // Image placeholders can be printed if the placeholder type has been saved as \"Image\" through the web app\r\n            \"value\": \"dog.jpeg\" // Upload the image through the web app and send the filename as value (case sensitivity is enforced for both uppercase and lowercase letters)\r\n        }\r\n    ],\r\n    \"formOutput\": \"flatten\", // optional, possible values: 'keep', 'flatten'\r\n    \"customDocumentName\": \"Document Name without extension\" // string without a filename extension, it cannot include special characters such as <>:\"/|?*.\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/v1/templates/:templateId/merges","host":["{{base_url}}"],"path":["v1","templates",":templateId","merges"],"variable":[{"key":"templateId","value":"{{tmpl_templateId}}","description":"(Required) Template unique identifier"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"vary","value":"Origin, Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"access-control-allow-origin","value":"*"},{"key":"x-ratelimit-limit","value":"2"},{"key":"x-ratelimit-remaining","value":"1"},{"key":"x-ratelimit-reset","value":"1699457400"},{"key":"ratelimit-policy","value":"2;w=1"},{"key":"ratelimit-limit","value":"2"},{"key":"ratelimit-remaining","value":"1"},{"key":"ratelimit-reset","value":"1"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"etag","value":"W/\"10f18-Icbll9y+SAHH5xuhtRxkBMEDoFw\""},{"key":"Content-Encoding","value":"gzip"},{"key":"X-Cloud-Trace-Context","value":"f1f9fa64abb6c18f2907025fc0c16e0d;o=1"},{"key":"Date","value":"Wed, 08 Nov 2023 15:30:11 GMT"},{"key":"Server","value":"Google Frontend"},{"key":"Cache-Control","value":"private"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"createdAt\": \"2023-11-08T15:30:11.514Z\",\n    \"templateId\": \"tmpl_dvvUDyVpCcRWKMlyUu9G\",\n    \"mergeId\": \"mrg_619c98ba-c0a0-4705-9ce4-c20858988e4a\",\n    \"file\": {\n        \"type\": \"application/pdf\",\n        \"name\": \"Document Name without extension.\",\n        \"extension\": \"pdf\",\n        \"data\": \"data:application/pdf;base64, ...base64Data... ==\"\n    },\n    \"request\": {\n        \"data\": [\n            {\n                \"placeholder\": \"First Name\",\n                \"value\": \"Peter\"\n            },\n            {\n                \"placeholder\": \"Age\",\n                \"value\": \"31\"\n            },\n            {\n                \"placeholder\": \"Image\",\n                \"value\": \"peter.jpg\"\n            }\n        ],\n        \"formOutput\": \"flatten\",\n        \"customDocumentName\": \"Document Name without extension\"\n    }\n}"},{"id":"40298c0f-a740-4335-82ad-9f46e718c8de","name":"Successful Generation","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"placeholders\": [\n        {\"name\": \"First Name\", \"value\": \"Peter\"},\n        {\"name\": \"Age\", \"value\": \"31\"},\n        {\"name\": \"Image\", \"value\": \"peter.jpg\"}\n    ],\n    \"formOutput\": \"flatten\",\n    \"customDocumentName\": \"Document Name without extension\",\n    \"passwordProtection\": {\n       \"modify\": \"123\", \n       \"read\": \"abc\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/v1/templates/:templateId/merges","host":["{{base_url}}"],"path":["v1","templates",":templateId","merges"],"variable":[{"key":"templateId","value":"tmpl_2LH43zXzZ1ighsivvkHa","enabled":true}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\\n  \"createdAt\": \"2026-03-27T10:30:00.000Z\",\\n  \"templateId\": \"tmpl_2LH43zXzZ1ighsivvkHa\",\\n  \"mergeId\": \"mrg_550e8400-e29b-41d4-a716-446655440000\",\\n  \"file\": {\\n    \"mimeType\": \"application/pdf\",\\n    \"filename\": \"Document Name.pdf\",\\n    \"url\": \"https://storage.googleapis.com/...signed-url...\"\\n  },\\n  \"request\": {\\n    \"data\": [\\n      {\"name\": \"First Name\", \"value\": \"Peter\"},\\n      {\"name\": \"Age\", \"value\": \"31\"}\\n    ],\\n    \"formOutput\": \"flatten\",\\n    \"customDocumentName\": \"Document Name without extension\",\\n    \"passwordProtection\": {\\n      \"modify\": \"123\",\\n      \"read\": \"abc\"\\n    }\\n  }\\n}"}],"_postman_id":"0223fd54-e8cf-4a14-8a7a-c0b75cac2276"},{"name":"Generate Document & Send by Email","event":[{"listen":"test","script":{"id":"26741423-3c1a-4fd0-a226-8903b090253b","exec":["pm.test(\"Successful POST request\", function () {\r","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);\r","});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"65780181-ce0d-4bad-8457-9601fa61e7fa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"placeholders\": [\r\n        {\r\n            \"name\": \"First Name\", // Placeholder name matching the one in your template\r\n            \"value\": \"Peter\" // The value to be printed in the PDF can be specified here.\r\n        },\r\n        {\r\n            \"name\": \"Age\",\r\n            \"value\": \"31\"\r\n        },\r\n        {\r\n            \"name\": \"Image\", // Image placeholders can be printed if the placeholder type has been saved as \"Image\" through the web app\r\n            \"value\": \"peter.jpg\" // Upload the image through the web app and send the filename as value (case sensitivity is enforced for both uppercase and lowercase letters)\r\n        }\r\n    ],\r\n    \"formOutput\": \"flatten\", // optional, possible values: 'keep', 'flatten'\r\n    \"customDocumentName\": \"Document Name without extension\", // string without a filename extension, it cannot include special characters such as <>:\"/|?*.\r\n    \"passwordProtection\": {\r\n       // The password fields accepts only Latin alphabet characters (A–Z, a–z), digits (0–9), and the following special characters: !@#$%^&*()\r\n       \"modify\": \"123\", \r\n       \"read\": \"abc\"\r\n    },\r\n    \"email\": {\r\n       \"isEnabled\": true, // Set to true to enable email sending\r\n       \"to\": \"peter@example.com\", // Enter recipient's email address; only one address is allowed\r\n       \"cc\": \"jane@example.com\", // Enter CC recipient's email address; only one address is allowed\r\n       \"bcc\": \"john@example.com\", // Enter BCC recipient's email address; only one address is allowed\r\n       \"from\": {\r\n           \"email\": \"lennart.guth@gmail.com\", // Specify the email address of the sender; it must be created and verified in advance at my.mailmergic.com\r\n           \"name\": \"Peter Doe\" // Specify the name of the sender\r\n       },\r\n       \"subject\": \"Important Message\", // Enter the subject of the email\r\n       \"content\": \"Dear recipient…\" // Add the content of the email, simple HTML tags are supported (https://pdfmailmerger.com/faq/email-text-formatting)\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"{{base_url}}/v1/templates/:templateId/merges","description":"<p>Triggers the creation of a single PDF document that is merged with the data specified in the request and sent to the specified recipients. Returns an HTTP 201 response with the merge details, a temporary signed URL to download the generated PDF, and the email delivery status.</p>\n<p>The <code>templateId</code> path parameter accepts both formats: with prefix (e.g., <code>tmpl_2LH43zXzZ1ighsivvkHa</code>) or without (e.g., <code>2LH43zXzZ1ighsivvkHa</code>).</p>\n<p><strong>Note:</strong> The <code>from.email</code> must be a verified sender in your MailMergic account. Unverified senders will fail with error code <code>UNVERIFIED_SENDER</code>.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","type":"collection"}},"urlObject":{"path":["v1","templates",":templateId","merges"],"host":["{{base_url}}"],"query":[],"variable":[{"description":{"content":"<p>(Required) Template unique identifier</p>\n","type":"text/plain"},"type":"any","value":"{{tmpl_templateId}}","key":"templateId"}]}},"response":[{"id":"b75ddfa0-01d2-4dd8-8015-f91af6e2b162","name":"Generate Document & Send by Email","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"data\": [\r\n        {\r\n            \"placeholder\": \"First Name\", // Placeholder name matching the one in your template\r\n            \"value\": \"Peter\" // The value to be printed in the PDF can be specified here.\r\n        },\r\n        {\r\n            \"placeholder\": \"Age\",\r\n            \"value\": \"31\"\r\n        },\r\n        {\r\n            \"placeholder\": \"Image\", // Image placeholders can be printed if the placeholder type has been saved as \"Image\" through the web app\r\n            \"value\": \"peter.jpg\" // Upload the image through the web app and send the filename as value (case sensitivity is enforced for both uppercase and lowercase letters)\r\n        }\r\n    ],\r\n    \"formOutput\": \"flatten\", // optional, possible values: 'keep', 'flatten'\r\n    \"customDocumentName\": \"Document Name without extension\", // string without a filename extension, it cannot include special characters such as <>:\"/|?*.\r\n     \"email\": {\r\n        \"isEnabled\": true, // Set to true to enable email sending\r\n        \"to\": \"support@pdfmailmerger.com\", // Enter recipient's email address; only one address is allowed\r\n        \"cc\": \"support2@pdfmailmerger.com\", // Enter CC recipient's email address; only one address is allowed\r\n        \"bcc\": \"support3@pdfmailmerger.com\", // Enter BCC recipient's email address; only one address is allowed\r\n        \"from\": {\r\n            \"email\": \"support@pdfmailmerger.com\", // Specify the email address of the sender; it must be created and verified in advance in the web app\r\n            \"name\": \"PDF Mail Merger Support\" // Specify the name of the sender\r\n        },\r\n        \"subject\": \"Important Message\", // Enter the subject of the email\r\n        \"content\": \"Dear recipient…\" // Add the content of the email, simple HTML tags are supported (https://pdfmailmerger.com/faq/email-text-formatting)\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/v1/templates/:templateId/merges","host":["{{base_url}}"],"path":["v1","templates",":templateId","merges"],"variable":[{"key":"templateId","value":"{{tmpl_templateId}}","description":"(Required) Template unique identifier"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"vary","value":"Origin, Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"access-control-allow-origin","value":"*"},{"key":"x-ratelimit-limit","value":"2"},{"key":"x-ratelimit-remaining","value":"1"},{"key":"x-ratelimit-reset","value":"1699457888"},{"key":"ratelimit-policy","value":"2;w=1"},{"key":"ratelimit-limit","value":"2"},{"key":"ratelimit-remaining","value":"1"},{"key":"ratelimit-reset","value":"1"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"etag","value":"W/\"d488-QdPpPhTnqkI6BHoHVZZS+zT9Ch0\""},{"key":"Content-Encoding","value":"gzip"},{"key":"X-Cloud-Trace-Context","value":"8a590bf86cc421a41e311cbcd1166a4e;o=1"},{"key":"Date","value":"Wed, 08 Nov 2023 15:38:13 GMT"},{"key":"Server","value":"Google Frontend"},{"key":"Cache-Control","value":"private"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"createdAt\": \"2023-11-08T15:38:13.407Z\",\n    \"templateId\": \"tmpl_dvvUDyVpCcRWKMlyUu9G\",\n    \"mergeId\": \"mrg_ffe3e80c-d5e3-4666-a064-5bcac7d15cad\",\n    \"file\": {\n        \"type\": \"application/pdf\",\n        \"name\": \"Document Name without extension\",\n        \"extension\": \"pdf\",\n        \"data\": \"data:application/pdf;base64, ...base64Data... ==\"\n    },\n    \"email\": {\n        \"status\": \"accepted\",\n        \"isEnabled\": true,\n        \"to\": \"peter@example.com\",\n        \"cc\": \"jane@example.com\",\n        \"bcc\": \"john@example.com\",\n        \"from\": {\n            \"email\": \"support@example.com\",\n            \"name\": \"Peter Doe\"\n        },\n        \"subject\": \"Important Message\",\n        \"content\": \"Dear recipient…\"\n    },\n    \"request\": {\n        \"data\": [\n            {\n                \"placeholder\": \"First Name\",\n                \"value\": \"Peter\"\n            },\n            {\n                \"placeholder\": \"Age\",\n                \"value\": \"31\"\n            },\n            {\n                \"placeholder\": \"Image\",\n                \"value\": \"peter.jpg\"\n            }\n        ],\n        \"formOutput\": \"flatten\",\n        \"customDocumentName\": \"Document Name without extension\"\n    }\n}"},{"id":"c183cc75-eda4-41e5-8304-e95533ff2a58","name":"Successful Generation with Email","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"placeholders\": [\n        {\"name\": \"First Name\", \"value\": \"Peter\"},\n        {\"name\": \"Age\", \"value\": \"31\"},\n        {\"name\": \"Image\", \"value\": \"peter.jpg\"}\n    ],\n    \"formOutput\": \"flatten\",\n    \"customDocumentName\": \"Document Name without extension\",\n    \"passwordProtection\": {\n       \"modify\": \"123\", \n       \"read\": \"abc\"\n    },\n    \"email\": {\n       \"isEnabled\": true,\n       \"to\": \"peter@example.com\",\n       \"cc\": \"jane@example.com\",\n       \"bcc\": \"john@example.com\",\n       \"from\": {\n           \"email\": \"support@example.com\",\n           \"name\": \"Peter Doe\"\n       },\n       \"subject\": \"Important Message\",\n       \"content\": \"Dear recipient\\u2026\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{base_url}}/v1/templates/:templateId/merges","host":["{{base_url}}"],"path":["v1","templates",":templateId","merges"],"variable":[{"key":"templateId","value":"tmpl_2LH43zXzZ1ighsivvkHa","enabled":true}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","enabled":true}],"cookie":[],"responseTime":null,"body":"{\\n  \"createdAt\": \"2026-03-27T10:30:00.000Z\",\\n  \"templateId\": \"tmpl_2LH43zXzZ1ighsivvkHa\",\\n  \"mergeId\": \"mrg_550e8400-e29b-41d4-a716-446655440000\",\\n  \"file\": {\\n    \"mimeType\": \"application/pdf\",\\n    \"filename\": \"Document Name.pdf\",\\n    \"url\": \"https://storage.googleapis.com/...signed-url...\"\\n  },\\n  \"request\": {\\n    \"data\": [\\n      {\"name\": \"First Name\", \"value\": \"Peter\"},\\n      {\"name\": \"Age\", \"value\": \"31\"}\\n    ],\\n    \"formOutput\": \"flatten\",\\n    \"customDocumentName\": \"Document Name without extension\",\\n    \"passwordProtection\": {\\n      \"modify\": \"123\",\\n      \"read\": \"abc\"\\n    }\\n  },\\n  \"email\": {\\n    \"status\": \"accepted\",\\n    \"isEnabled\": true,\\n    \"to\": \"peter@example.com\",\\n    \"cc\": \"jane@example.com\",\\n    \"bcc\": \"john@example.com\",\\n    \"from\": {\\n      \"email\": \"support@example.com\",\\n      \"name\": \"Peter Doe\"\\n    },\\n    \"subject\": \"Important Message\",\\n    \"content\": \"Dear recipient...\"\\n  }\\n}"}],"_postman_id":"65780181-ce0d-4bad-8457-9601fa61e7fa"},{"name":"Validate API Key","id":"1c034351-0372-4256-905e-0964a42dce47","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{base_url}}/v1/apiKeys/validate","description":"<p>Checks whether the API key provided in the request is valid and active. Returns the user's account details including their billing plan.</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","type":"collection"}},"urlObject":{"path":["v1","apiKeys","validate"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[{"id":"2719b0ed-ce86-48dc-9b8d-b2d9280a3c51","name":"Invalid API Key","originalRequest":{"method":"GET","header":[],"url":"{{base_url}}/v1/apiKeys/validate"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"vary","value":"Origin, Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"access-control-allow-origin","value":"*"},{"key":"x-ratelimit-limit","value":"2"},{"key":"x-ratelimit-remaining","value":"1"},{"key":"x-ratelimit-reset","value":"1753272815"},{"key":"ratelimit-policy","value":"2;w=1"},{"key":"ratelimit-limit","value":"2"},{"key":"ratelimit-remaining","value":"1"},{"key":"ratelimit-reset","value":"1"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"etag","value":"W/\"37-+ZlBVU7bsW7nZKN3HAWSixldQb4\""},{"key":"x-cloud-trace-context","value":"5758bfa737b9627021e4e7bb3dbad0b9"},{"key":"date","value":"Wed, 23 Jul 2025 12:13:33 GMT"},{"key":"server","value":"Google Frontend"},{"key":"Content-Length","value":"55"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unauthorized. Missing or invalid API token.\"\n}"},{"id":"b38ed729-2515-48ed-8883-8ee4c538338f","name":"Valid API Key","originalRequest":{"method":"GET","header":[],"url":"{{base_url}}/v1/apiKeys/validate"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\\n  \"uid\": \"abc123def456ghi78901\",\\n  \"billingPlan\": \"Pro\",\\n  \"firstName\": \"Peter\",\\n  \"lastName\": \"Doe\",\\n  \"email\": \"peter@example.com\"\\n}"}],"_postman_id":"1c034351-0372-4256-905e-0964a42dce47"},{"name":"Get Placeholders","id":"cff05fed-a5f4-47cb-b5b6-0fe222e4f2dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{base_url}}/v1/templates/:templateId","description":"<p>Retrieves all data for a specific template, including its metadata and placeholders.</p>\n<p>The <code>templateId</code> path parameter accepts both formats: with prefix (e.g., <code>tmpl_2LH43zXzZ1ighsivvkHa</code>) or without (e.g., <code>2LH43zXzZ1ighsivvkHa</code>).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","type":"collection"}},"urlObject":{"path":["v1","templates",":templateId"],"host":["{{base_url}}"],"query":[],"variable":[{"description":{"content":"<p>Use Template ID without tmpl_ prefix</p>\n","type":"text/plain"},"type":"any","value":"{{tmpl_templateId}}","key":"templateId"}]}},"response":[],"_postman_id":"cff05fed-a5f4-47cb-b5b6-0fe222e4f2dd"},{"name":"List Merges","id":"2a74d954-d477-4170-9cce-85b271db9c57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{base_url}}/v1/templates/:templateId/merges","description":"<p>Lists all merges for a specific template. Returns an array of merge records with their status and details.</p>\n<p>The <code>templateId</code> path parameter accepts both formats: with prefix (e.g., <code>tmpl_2LH43zXzZ1ighsivvkHa</code>) or without (e.g., <code>2LH43zXzZ1ighsivvkHa</code>).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","type":"collection"}},"urlObject":{"path":["v1","templates",":templateId","merges"],"host":["{{base_url}}"],"query":[],"variable":[{"type":"any","value":"{{tmpl_templateId}}","key":"templateId"}]}},"response":[{"id":"1d1707fa-d6ac-4f4e-89dc-38630ebce113","name":"Successful List","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/v1/templates/:templateId/merges","host":["{{base_url}}"],"path":["v1","templates",":templateId","merges"],"variable":[{"key":"templateId","value":"tmpl_2LH43zXzZ1ighsivvkHa","enabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"createdAt\": \"2026-03-27T10:30:00.000Z\",\n    \"templateId\": \"tmpl_2LH43zXzZ1ighsivvkHa\",\n    \"mergeId\": \"mrg_550e8400-e29b-41d4-a716-446655440000\",\n    \"status\": \"completed\",\n    \"file\": {\n      \"mimeType\": \"application/pdf\",\n      \"filename\": \"Invoice March.pdf\",\n      \"url\": \"https://storage.googleapis.com/...signed-url...\"\n    }\n  },\n  {\n    \"createdAt\": \"2026-03-26T08:15:00.000Z\",\n    \"templateId\": \"tmpl_2LH43zXzZ1ighsivvkHa\",\n    \"mergeId\": \"mrg_7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n    \"status\": \"completed\",\n    \"file\": {\n      \"mimeType\": \"application/pdf\",\n      \"filename\": \"Invoice February.pdf\",\n      \"url\": \"https://storage.googleapis.com/...signed-url...\"\n    }\n  }\n]"}],"_postman_id":"2a74d954-d477-4170-9cce-85b271db9c57"},{"name":"Get Merge","id":"8d50bc17-8492-407a-ad67-1f1066c02e7d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{base_url}}/v1/templates/:templateId/merges/:mergeId","description":"<p>Retrieves the status and details of a specific merge, including the file download URL if the merge is complete.</p>\n<p>The <code>templateId</code> path parameter accepts both formats: with prefix (e.g., <code>tmpl_2LH43zXzZ1ighsivvkHa</code>) or without (e.g., <code>2LH43zXzZ1ighsivvkHa</code>).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","type":"collection"}},"urlObject":{"path":["v1","templates",":templateId","merges",":mergeId"],"host":["{{base_url}}"],"query":[],"variable":[{"type":"any","value":"{{tmpl_templateId}}","key":"templateId"},{"type":"any","value":"","key":"mergeId"}]}},"response":[{"id":"dad70249-72c6-4fb2-9e62-92e7167bf1ed","name":"Successful Get","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{base_url}}/v1/templates/:templateId/merges/:mergeId","host":["{{base_url}}"],"path":["v1","templates",":templateId","merges",":mergeId"],"variable":[{"key":"templateId","value":"tmpl_2LH43zXzZ1ighsivvkHa","enabled":true},{"key":"mergeId","value":"mrg_550e8400-e29b-41d4-a716-446655440000","enabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"createdAt\": \"2026-03-27T10:30:00.000Z\",\n  \"templateId\": \"tmpl_2LH43zXzZ1ighsivvkHa\",\n  \"mergeId\": \"mrg_550e8400-e29b-41d4-a716-446655440000\",\n  \"status\": \"completed\",\n  \"file\": {\n    \"mimeType\": \"application/pdf\",\n    \"filename\": \"Document Name.pdf\",\n    \"url\": \"https://storage.googleapis.com/...signed-url...\"\n  },\n  \"request\": {\n    \"data\": [\n      {\"name\": \"First Name\", \"value\": \"Peter\"},\n      {\"name\": \"Age\", \"value\": \"31\"}\n    ],\n    \"formOutput\": \"flatten\",\n    \"customDocumentName\": \"Document Name without extension\",\n    \"passwordProtection\": {\n      \"modify\": \"123\",\n      \"read\": \"abc\"\n    }\n  }\n}"}],"_postman_id":"8d50bc17-8492-407a-ad67-1f1066c02e7d"},{"name":"Delete Merge","id":"62986593-1f67-429c-a11b-2c1b1cac5d63","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{base_url}}/v1/templates/:templateId/merges/:mergeId","description":"<p>Deletes a specific merge and its associated files permanently.</p>\n<p>The <code>templateId</code> path parameter accepts both formats: with prefix (e.g., <code>tmpl_2LH43zXzZ1ighsivvkHa</code>) or without (e.g., <code>2LH43zXzZ1ighsivvkHa</code>).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","type":"collection"}},"urlObject":{"path":["v1","templates",":templateId","merges",":mergeId"],"host":["{{base_url}}"],"query":[],"variable":[{"type":"any","value":"{{tmpl_templateId}}","key":"templateId"},{"type":"any","value":"","key":"mergeId"}]}},"response":[{"id":"fb76dc8f-9e00-42ed-a838-9422806d66a8","name":"Successful Deletion","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"{{base_url}}/v1/templates/:templateId/merges/:mergeId","host":["{{base_url}}"],"path":["v1","templates",":templateId","merges",":mergeId"],"variable":[{"key":"templateId","value":"tmpl_2LH43zXzZ1ighsivvkHa","enabled":true},{"key":"mergeId","value":"mrg_550e8400-e29b-41d4-a716-446655440000","enabled":true}]}},"status":"No Content","code":204,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","enabled":true}],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"mergeId\": \"mrg_661f9511-f30c-52e5-b827-557766551111\",\n    \"templateId\": \"2LH43zXzZ1ighsivvkHa\",\n    \"progress\": 100,\n    \"createdAt\": \"2026-03-26T08:15:00.000Z\",\n    \"recipientCount\": 5,\n    \"placeholderCount\": 3,\n    \"mergeUrls\": [\"https://storage.googleapis.com/...\"],\n    \"isMailingTriggered\": true,\n    \"isMailingCompleted\": true,\n    \"isCancel\": false,\n    \"emailsCount\": 5,\n    \"emailSnapshot\": {\n      \"subject\": \"Your Invoice\",\n      \"fromEmail\": \"billing@example.com\",\n      \"fromName\": \"Billing\"\n    },\n    \"eventSummary\": {\n      \"total\": 5,\n      \"delivered\": 4,\n      \"opened\": 2,\n      \"failed\": 1\n    }\n  }\n]"}],"_postman_id":"62986593-1f67-429c-a11b-2c1b1cac5d63"},{"name":"Cancel Merge","id":"133b2d80-6f03-49ac-a2d9-58bc217de54a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{base_url}}/v1/templates/:templateId/merges/:mergeId/cancel","description":"<p>Cancels a merge that is currently in progress. Only merges with a pending or processing status can be cancelled.</p>\n<p>The <code>templateId</code> path parameter accepts both formats: with prefix (e.g., <code>tmpl_2LH43zXzZ1ighsivvkHa</code>) or without (e.g., <code>2LH43zXzZ1ighsivvkHa</code>).</p>\n","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]},"isInherited":true,"source":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","type":"collection"}},"urlObject":{"path":["v1","templates",":templateId","merges",":mergeId","cancel"],"host":["{{base_url}}"],"query":[],"variable":[{"type":"any","value":"","key":"templateId"},{"type":"any","value":"","key":"mergeId"}]}},"response":[{"id":"025c6617-46ae-490c-a88c-d3e8cb0d5f0f","name":"Successful Cancellation","originalRequest":{"method":"PATCH","header":[],"url":{"raw":"{{base_url}}/v1/templates/:templateId/merges/:mergeId/cancel","host":["{{base_url}}"],"path":["v1","templates",":templateId","merges",":mergeId","cancel"],"variable":[{"key":"templateId","value":"tmpl_2LH43zXzZ1ighsivvkHa","enabled":true},{"key":"mergeId","value":"mrg_550e8400-e29b-41d4-a716-446655440000","enabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n  \"createdAt\": \"2026-03-27T10:30:00.000Z\",\n  \"templateId\": \"tmpl_2LH43zXzZ1ighsivvkHa\",\n  \"mergeId\": \"mrg_550e8400-e29b-41d4-a716-446655440000\",\n  \"status\": \"cancelled\"\n}"}],"_postman_id":"133b2d80-6f03-49ac-a2d9-58bc217de54a"}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"X-API-KEY"},{"key":"value","value":"{{key_apiKey}}"}]}},"event":[{"listen":"prerequest","script":{"id":"d8e9531b-5b70-4b23-bb1a-b172a8a50785","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"66945151-ae55-4481-9b1d-d7946e92ede3","type":"text/javascript","exec":[""]}}]}