Skip to content

SmsGetTriggerSubscriptions

GET sms/triggers/subscriptions

Returns what the running module is subscribed to right now — not what is configured in the database.

The two can differ: subscriptions are refreshed by a cron, so a trigger created a second ago may not be live yet, and a trigger for an event nobody publishes will never fire. This is the method that answers "why did my trigger not work".

Access Control

Allowed role: admin.

Request

GET request
GET https://{broker_domain}/sms/triggers/subscriptions
Authorization: <JWT_TOKEN>
{
  "command": "SmsGetTriggerSubscriptions",
  "extID": "1",
  "data": {}
}
const res = await platform.SmsGetTriggerSubscriptions({});

Request Data

This method takes no parameters.

Response Data

enabled: false means trigger processing is switched off in the module configuration — then nothing fires regardless of what is configured.

subscribed is the list of event names the module announces to the platform in Moleculer INFO. An event listed under events but missing from subscribed is configured but not live yet, and the platform will not send it.

{
  "enabled": true,
  "subscribed": ["customer.password_reset.delivery_requested"],
  "events": [
    {
      "event": "customer.password_reset.delivery_requested",
      "subscribed": true,
      "triggers": [
        {
          "id": 2,
          "brand": "default",
          "type": "PRIVATE",
          "match": { "delivery_route": "customer-recovery" }
        }
      ]
    }
  ]
}

Errors

Code Error Description
401 PERMISSION_DENIED Not an admin session