Message

Message

The message verb sends an SMS via a carrier using the SMPP protocol. It requires that you have added a BYOC carrier configured that supports SMS.

{
  "verb": "message",
  "to": "15083084809",
  "from": "16173334567",
  "text": "Your one-time passcode is 1234",
  "actionHook": "/sms/action"
}

You can use the following attributes with the message verb:

Option Description Required
from Sending number. Yes
to Destination number. Yes
text Text message to send. Yes
carrier Name of the BYOC carrier to use (useful only when you have multiple carriers configured with SMPP support; otherwise, leave out). No
actionHook A webhook that is called when the message verb completes. No

ActionHook Properties

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

Property Name Description
message_sid The unique identifier for the message assigned by Zerpia.
message_status The final status of the message attempt; will be one of: 'success', 'failure', 'no carriers', 'smpp configuration error', or 'system error'.
message_failure_reason In the case of message_status 'failure', this will contain details describing why the outbound SMPP request failed.
carrier The name of the carrier selected to send the SMS.
carrier_message_id The message identifier assigned by the carrier for this SMS.

Ready To Get Started?