Skip to content

MailerGetTemplates

GET mailer/templates/list

Returns the templates of the brand. For the templates a specific manager can use in the send dialog, see MailerGetMyProfiles — it returns them grouped by profile.

Access Control

Allowed roles: admin, leader, manager, within the brand of the caller.

Request

GET request
GET https://{broker_domain}/mailer/templates/list?limit=50&where=%7B%22status%22%3A%22ENABLED%22%7D
Authorization: <JWT_TOKEN>
{
  "command": "MailerGetTemplates",
  "extID": "1",
  "data": {
    "limit": 50,
    "where": {
      "status": "ENABLED"
    }
  }
}
const res = await platform.MailerGetTemplates({
  limit: 50,
  where: {
    status: "ENABLED"
  }
});

Request Data

Field Type Required Description
limit int No Page size, 1..1000, default 100
offset int No Rows to skip
orderBy array No Sorting, for example ["id", "DESC"]
count array No Row count aggregate, ["id"]
where object No Filters, see Table filter syntax

Response Data

{
  "rows": [
    {
      "id": 4,
      "brand": "default",
      "name": "Deposit confirmed",
      "subject": "{{name}}, your deposit is confirmed",
      "preheader": "Funds are already on your account",
      "language": "EN",
      "kind": "TRANSACTIONAL",
      "triggerId": 2,
      "profileId": null,
      "status": "ENABLED"
    }
  ]
}

Errors

Code Error Description
401 PERMISSION_DENIED No manager session