Skip to content

SmsGetTriggers

GET sms/triggers/list

Returns the triggers of the brand, including global ones. Pair it with SmsGetTriggerSubscriptions to tell a configured trigger from one the module is actually listening to.

Access Control

Allowed role: admin, within the brand of the caller.

Request

GET request
GET https://{broker_domain}/sms/triggers/list?limit=50&orderBy=%5B%22event%22%2C%22ASC%22%5D
Authorization: <JWT_TOKEN>
{
  "command": "SmsGetTriggers",
  "extID": "1",
  "data": {
    "limit": 50,
    "orderBy": [
      "event",
      "ASC"
    ]
  }
}
const res = await platform.SmsGetTriggers({
  limit: 50,
  orderBy: [
    "event",
    "ASC"
  ]
});

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": 2,
      "brand": "default",
      "event": "crm.customer.deposit",
      "description": null,
      "merge": { "client.msisdn": "phone", "payment.sum": "amount" },
      "arguments": null,
      "type": "PRIVATE",
      "global": false,
      "status": "ENABLED"
    }
  ]
}

Errors

Code Error Description
401 PERMISSION_DENIED Not an admin session