Skip to content

SmsGetTemplates

GET sms/templates/list

Returns the templates of the brand. For the templates a specific manager can actually use in the send dialog, see SmsGetMyProfiles — 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}/sms/templates/list?limit=50&where=%5B%5B%22status%22%2C%22%3D%22%2C%22ENABLED%22%5D%5D
Authorization: <JWT_TOKEN>
{
  "command": "SmsGetTemplates",
  "extID": "1",
  "data": {
    "limit": 50,
    "where": [
      [
        "status",
        "=",
        "ENABLED"
      ]
    ]
  }
}
const res = await platform.SmsGetTemplates({
  limit: 50,
  where: [
    [
      "status",
      "=",
      "ENABLED"
    ]
  ]
});

Request Data

Field Type Required Description
limit int No Page size, 1..500, default 100
offset int No Rows to skip
orderBy array No Sorting, for example ["id", "DESC"]
count array No Row count aggregate, ["id"]
where array No Conditions [field, operator, value], for example [["status", "=", "ENABLED"]]; other filter keys and the field rules are in List queries

Response Data

{
  "rows": [
    {
      "id": 4,
      "brand": "default",
      "name": "Deposit confirmed",
      "description": null,
      "text": "{{name}}, your deposit of {{amount}} is confirmed",
      "language": "EN",
      "kind": "TRANSACTIONAL",
      "triggerId": 2,
      "profileId": null,
      "status": "ENABLED"
    }
  ]
}

Errors

Code Error Description
401 PERMISSION_DENIED No manager session