v97

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-04231129815.9 KB
Templates

Get template

Returns one email template. Transactional email IDs and slugs are also resolved for compatibility, as is the emailId returned by campaign endpoints, so this can read the blocks of an email designed in the dashboard.

get/templates/{templateId}

Path parameters

templateIdstring required

Template ID, transactional email ID, or transactional slug.

Response

Template returned

successboolean
transactionalobject nullable

Example response

{
  "success": true,
  "template": {
    "id": "email_abc123",
    "name": "[Template] Welcome",
    "subject": "Welcome!",
    "labels": [
      "edm",
      "template"
    ],
    "companyId": "company_abc123",
    "blocks": [
      {
        "id": "block_123",
        "type": "html",
        "content": "<h1>Hello</h1>",
        "styles": {
          "backgroundColor": "#f8fafc",
          "backgroundOpacity": 80,
          "textColor": "#111827",
          "borderRadius": 12,
          "borderColor": "#cbd5e1",
          "borderWidth": 1
        },
        "conditions": [
          {
            "id": "c1",
            "value": "plan:pro"
          }
        ]
      }
    ]
  }
}