Table of Contents

API : Message templates : List

Introduction

Every template of the scope - the master templates, or one reseller's own versions - with which languages have an edited version. See messagetemplates for the lookup order and access.

Request

URL https://api.telecomx.dk/messagetemplates
Method GET
Access level Without reseller: RESELLER_ADMIN, ADMIN.
With reseller: RESELLER for its own tree, RESELLER_ADMIN, ADMIN.
Query reseller Id [optional] Reseller whose own versions are listed. Without it, the master templates.

Query example

https://api.telecomx.dk/messagetemplates?reseller=64b000000000000000000001

Response

Field Type Description
reseller Object _id and name of the reseller, null for the master templates.
templates Array The templates the user may see in the scope, in the order of the editor:
templates[].channel String EMAIL, SMS or PDF.
templates[].key String Key of the template, e.g. newEmployee. _layout is the e-mail layout.
templates[].languages Array Per language: language (da/en), master ({ updatedAt, updatedByName } when the master has been changed in the portal, else null), masterMissing (true when there is no master version yet - the message is not sent until one is saved in the editor) and own (the same as master for the reseller's version, or null).
templates[].audience String Who receives it: CUSTOMER, RESELLER, OPERATOR or INTERNAL.
templates[].sensitive Boolean True when it carries a password, pin code or login link - the rules for secrets apply.
templates[].resellerEditable Boolean True when a reseller may have its own version.
templates[].description Object da and en description.
templates[].writable Boolean True when the user may save, revert and test it in this scope.

Example

{
  reseller: { _id: '64b000000000000000000001', name: 'Eksempel Forhandler ApS' },
  templates: [
    {
      channel: 'EMAIL', key: 'newEmployee', audience: 'CUSTOMER', sensitive: true, resellerEditable: true, writable: true,
      description: { da: 'Velkomst til en ny medarbejder med brugernavn og adgangskode', en: 'Welcome to a new employee with user name and password' },
      languages: [
        { language: 'da', master: null, masterMissing: false, own: { updatedAt: '2026-10-30T14:59:12.000Z', updatedByName: 'Jens Hansen' } },
        { language: 'en', master: null, masterMissing: false, own: null }
      ]
    }
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level, or a reseller outside the user's tree
404 reseller Reseller not found (the customer is not a reseller)
422 reseller Not a valid id
500 internal_error <Unspecified>