{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","name":"MailMergic API","description":"# 🚀 Introduction\n\nWith the MailMergic API, you can easily generate transactional documents (both PDF and Word files) and reduce development and maintenance costs.\n\n**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.**\n\n## Authentication\n\nAll API requests require an API key passed in the `X-API-KEY` header:\n\n```\nX-API-KEY: your-api-key-here\n\n ```\n\nYou can obtain your API key from the MailMergic dashboard.\n\n## Template ID\n\nThe `templateId` path parameter accepts both formats on all endpoints:\n\n- With prefix: `tmpl_2LH43zXzZ1ighsivvkHa`\n    \n- Without prefix: `2LH43zXzZ1ighsivvkHa`\n    \n\nBoth formats are accepted interchangeably on every endpoint.\n\n## Placeholders\n\nPlaceholders are the dynamic fields in your template that get replaced with the values you provide. Each placeholder is an object with a `name` and `value` field:\n\n``` json\n{\n  \"placeholders\": [\n    {\"name\": \"First Name\", \"value\": \"Peter\"},\n    {\"name\": \"Age\", \"value\": \"31\"}\n  ]\n}\n\n ```\n\n## Error Responses\n\nAll API error responses use this format:\n\n``` json\n{\"error\":{\"code\":\"ERROR_CODE\",\"message\":\"Human-readable description\"}}\n\n ```\n\n| Code | Status | Description |\n| --- | --- | --- |\n| MISSING_TEMPLATE_ID | 400 | Template ID not provided |\n| INVALID_TEMPLATE_ID | 400 | Invalid format |\n| TEMPLATE_NOT_FOUND | 400 | No template with given ID |\n| INVALID_CHARACTERS | 400 | Disallowed special characters |\n| MISSING_PLACEHOLDERS | 400 | Placeholders array missing |\n| INVALID_PLACEHOLDERS | 400 | Not a valid array or empty |\n| INVALID_PLACEHOLDER_ENTRY | 400 | Entry is not a valid object |\n| MISSING_PLACEHOLDER_NAME | 400 | Missing name field |\n| MISSING_PLACEHOLDER_VALUE | 400 | Missing value field |\n| INVALID_FORM_OUTPUT | 400 | Must be \"keep\" or \"flatten\" |\n| INVALID_CUSTOM_NAME | 400 | Not a valid string |\n| INVALID_EMAIL_DATA | 400 | Not a valid object |\n| MISSING_EMAIL_ENABLED | 400 | isEnabled missing or not boolean |\n| MISSING_EMAIL_FROM | 400 | from object missing |\n| INVALID_EMAIL_FROM | 400 | from.email not valid |\n| MISSING_EMAIL_TO | 400 | to missing |\n| INVALID_EMAIL_TO | 400 | Not valid email |\n| INVALID_EMAIL_CC | 400 | Not valid email |\n| INVALID_EMAIL_BCC | 400 | Not valid email |\n| INVALID_EMAIL_FROM_NAME | 400 | Not a string |\n| INVALID_EMAIL_CONTENT | 400 | Not a string |\n| INVALID_EMAIL_SUBJECT | 400 | Not a string |\n| UNVERIFIED_SENDER | 400 | Sender not verified |\n| INVALID_PASSWORD_PROTECTION | 400 | Not a valid object |\n| INVALID_READ_PASSWORD | 400 | Invalid characters - only Latin letters, digits, and !@#$%^&\\*() allowed |\n| INVALID_MODIFY_PASSWORD | 400 | Same constraint as read password |\n| VALIDATION_ERROR | 400 | Catch-all validation error |\n| MERGE_FAILED | 400/500 | Merge process failed |\n| FILE_GENERATION_FAILED | 500 | Output file could not be generated |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"11129869","team":1331457,"collectionId":"a8a79e21-b514-4cd8-b21f-2c11d7a2785c","publishedId":"2s9YC1WZVy","public":true,"publicUrl":"https://documenter-api.postman.tech/view/11129869/2s9YC1WZVy","privateUrl":"https://go.postman.co/documentation/11129869-a8a79e21-b514-4cd8-b21f-2c11d7a2785c","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"06979e"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"With the MailMergic  API, you can easily generate transactional PDF files and reduce development and maintenance costs. Empower your users to design and manipulate their document templates through an easy-to-use drag-and-drop editor accessible through a web browser, further streamlining operations."},{"name":"title","value":"MailMergic API Documentation"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":"https://content.pstmn.io/9f9fe418-8b8d-4645-8a00-2233168f0c10/MTcxMzQ0MTQ3NTI2NS5wbmc=","colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"06979E"}},{"name":"light","logo":"https://content.pstmn.io/ac5ebda5-cd42-4db9-809a-d07da8902ac1/MTcxMzQ0MTQ3NTI2NS5wbmc=","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"06979e"}}]}},"version":"8.10.1","publishDate":"2025-05-18T19:52:59.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"MailMergic API Documentation","description":"With the MailMergic  API, you can easily generate transactional PDF files and reduce development and maintenance costs. Empower your users to design and manipulate their document templates through an easy-to-use drag-and-drop editor accessible through a web browser, further streamlining operations."},"logos":{"logoLight":"https://content.pstmn.io/ac5ebda5-cd42-4db9-809a-d07da8902ac1/MTcxMzQ0MTQ3NTI2NS5wbmc=","logoDark":"https://content.pstmn.io/9f9fe418-8b8d-4645-8a00-2233168f0c10/MTcxMzQ0MTQ3NTI2NS5wbmc="}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/1d76830d6e47d5214ed80d13f33dbea795691cd19a656aca4d0a5b9bab42fadb","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s9YC1WZVy"}