List email template variables

gethttps://api.expiryedge.com/v1/emailTemplateVariables
Optional bearer token; any role60/min
Request
curl 'https://api.expiryedge.com/v1/emailTemplateVariables' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY"
Response
{
  "categories": [
    {
      "key": "expiry",
      "label": "Expiry",
      "icon": "calendar",
      "description": "Fields about the expiring item the email is about",
      "variables": [
        {
          "key": "expiry.name",
          "label": "Name",
          "description": "Display name of the expiry",
          "sample": "Acme Insurance Policy"
        },
        {
          "key": "expiry.daysLeft",
          "label": "Days Left",
          "description": "Days until expiry (negative if expired)",
          "sample": 14
        }
      ]
    }
  ],
  "sample": {
    "expiry": {
      "name": "Acme Insurance Policy",
      "daysLeft": 14
    }
  },
  "allKeys": [
    "expiry.name",
    "expiry.daysLeft"
  ]
}

Without a valid token the static variable set is returned. With a token, adds one custom_<templateId> category per custom expiry template (custom.<field> keys, up to 40 fields each). Never returns an error.

Returns

200
Variable catalog.
  • categoriesarray of objects
  • sampleobject
    Sample render context (category -> field -> value).
  • allKeysarray of string

Errors

401
Missing, expired or invalid bearer token.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.