Message

New in v0.6.6 (beta) The message verb is used to send an SMS via a carrier using the SMPP protocol. It requires that you have added a BYOC carrier configured that supports SMS.

You can also send SMS via the REST API. See here for more details on that.

1{
2 "verb": "message",
3 "to": "15083084809",
4 "from": "16173334567",
5 "text": "Your one-time passcode is 1234",
6 "actionHook": "/sms/action"
7}

You can use the following options in the message verb:

optiondescriptionrequired
fromsending numberyes
todestination numberyes
texttext message to sendyes
carriername of BYOC carrier to use (useful only when you have multiple carriers configured with SMPP support, otherwise leave out)no
actionHookA webhook that is called when the message verb completesno
actionHook properties

The actionHook that is invoked when the message command completes will include the following properties:

property namedescription
message_sidthe unique identifier for the message assigned by jambonz
message_statusthe final status of the message attempt; will be one of:
  • - success
  • - failure
  • - no carriers
  • - smpp configuration error, or
  • - system error
message_failure_reasonin the case of message_status ‘failure’, this will contain detail describing why the outbound smpp request failed
carrierthe name of the carrier selected to send the SMS
carrier_message_idthe message identifier assigned by the carrier for this SMS