v1

latestOpenAPI 3.0.22026-07-12121135.6 KB
Templates

replaceTemplates

Replace variables in handlebars templates

Takes in an array of input templates and outputs the output text with replaced variables

post/v1/template-variables:replace

Request body

inputsstring[]

Example request

{
  "inputs": [
    "Hello, {{contact.first_name}}!\n\n{{{brand.signature}}}\n"
  ],
  "parameters": {
    "main_entity_id": "63753437-c9e2-4e83-82bb-b1c666514561",
    "brand_id": 123451,
    "user_id": "50001",
    "user_org_id": "729224",
    "custom_variables": [
      {
        "variable": "{{craftsmen.invitation_link}}",
        "value": "https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19"
      }
    ],
    "variables_version": "2"
  }
}

Response

ok

outputsstring[]

Example response

{
  "outputs": [
    "[Brand Name GmbH] Order confirmation\nHello Customer Name\n\n<span color=\"#ccc\">Brand Name GmbH</span>\n<img src=\"https://logobucket.s3.amazonaws.com/brandlogo.png\" alt=\"Brand Name\"/>\n<a href=\"https://company.com/imprint\">imprint</a>\n"
  ]
}