Template

Gets template properties by it's id.

post/template/get.json

Request

  • Base URL: https://api.unione.io/en/transactional/api/v1
  • URL: https://api.unione.io/en/transactional/api/v1/template/get.json
  • Auth: API key in header X-API-KEY

Request body

idstring uuid required

Template id.

Example request

{
  "id": "00000000-0000-0000-0000-000000000000"
}

Response

Template returned successfully.

status'success' required

"success" string

Example response

{
  "template": {
    "editor_type": "html",
    "template_engine": "velocity",
    "body": {
      "html": "<b>Hello, &#7b;&#7b;to_name&#7c;&#7c;</b>",
      "plaintext": "Hello, &#7b;&#7b;to_name&#7c;&#7c;",
      "amp": "<!doctype html><html amp4email><head> <meta charset=\"utf-8\"><script async src=\"https://cdn.ampproject.org/v0.js\"></script> <style amp4email-boilerplate>body{visibility:hidden}</style></head><body> Hello, AMP4EMAIL world.</body></html>"
    },
    "subject": "UniOne test email ",
    "from_name": "John Smith",
    "reply_to": "email@example.com",
    "reply_to_name": "John Smith",
    "headers": {
      "X-MyHeader": "some data",
      "Test-List-Unsubscribe": "<mailto: unsubscribe@example.com?subject=unsubscribe>, <http://www.example.com/unsubscribe/&#7b;&#7b;CustomerId&#7c;&#7c;>"
    },
    "attachments": [
      {
        "type": "text/plain",
        "name": "readme.txt",
        "content": "SGVsbG8sIHdvcmxkIQ=="
      }
    ],
    "inline_attachments": [
      {
        "type": "image/gif",
        "name": "IMAGECID1",
        "content": "R0lGODdhAwADAIABAP+rAP///ywAAAAAAwADAAACBIQRBwUAOw=="
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.