Follow

Subscribe to SMS (SMS Save)

**Coming Soon**

The SMS Save or Subscribe to SMS command allows you to add a Subscriber to send SMS messages.  The Subscribe to SMS command requires the following arguments: Command, Data with Sender Code, Country, and Phone.

cmd=smssave&data=sender,country,phone^18005559999,US,5095551212

The command is ‘smssave', and a subscription for the US phone number '5095551212' will be added to SMS Sender Code '18005559999'.

You can add one or many subscribers with the same subscribe command.  To add multiple subscribers, include additional subscribers separated by the carat (^) character.  Each additional subscriber must have the same number of data fields defined.

The SMS Save command expects as least three fields in the Data argument: the SMS sender, SMS Subscriber phone number and country code are always required to create an SMS subscription record.  A normal Subscriber record is not necessary. 

The Phone number must be unique to a single SMS Subscriber.  Attempting to add an SMS Subscription using the same Phone number for multiple subscribers will result in a failure.  The SMS subscription will also fail when attempting to add with a Subscriber email that does not exist.  If multiple subscribers have the same email address, you must include the first name with the email address, or use the subscriber ID, in order to associate the SMS subscription to the correct subscriber.

The Data fields supported include:

Name  Field Description
SMS Sender  sender

Sender Code representing the message sender.  A Sender Code is either a short code or number. It represents the 'from' field when deploying an SMS. The message recipient will see this sender on their mobile device when a message is received.

Subscriber Phone   phone

Numeric phone number for the subscriber.  Do not include special characters (such as parenthesis or dash). 

Country  country

Two letter country code for the Subscriber phone carrier. 

Subscriber ID  subscriber_id

Subscriber ID of the SMS Subscriber to subscribe.

First Name  first

First name of the SMS Subscriber to subscribe.

Email  email

Email address of the SMS Subscriber to subscribe. SMS Subscriber must already exist.

Customer Key  customer_key

Customer Key of the SMS Subscriber to subscribe.

SMS Group   sms_group_id 

Group to associate SMS Subscription for sending batch messages.  

Resubscribe

When an SMS Subscriber opts out of future messages, an Opt Out record is created which prevents both future subscriptions and sending future messages.  To override an opt out you must use the force_subscribe argument in the header of your FTP file.  This should only be used in very specific cases in which you have verified the subscriber's desire to opt in to your list.  To learn more about Force Subscribe, see the FTP API Conventions.

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

cmd=smssave&data=sender,phone,country,subscriber_id,first,email,sms_group_id^18005559999,5095551212,US,969,Jane,jane@domain.com,12

The normal Subscriber, ‘jane@domain.com’, will be subscribed to SMS Sender ‘18005559999’ in the SMS Group with ID '12'. 

Customer Key Example

Some systems have the ability to define a unique Customer Key per subscriber.  If your realm has Customer Key enabled, then you can use the customer_key in the data argument to identify the Subscriber. For example:

cmd=smssave&data=sender,phone,country,customer_key,sms_group_id^18005559999,5095551212,US,JD969,12

You can also identify the Subscriber using email and first name or subscriber ID.

Errors

The SMS Save command will fail if an invalid sender, subscriber, or SMS group is specified or if an optout is encountered for the phone number.  The command will also fail if the Subscriber does not exist or an SMS subscription already exists for the specified phone number. 

Arguments

The SMS Save command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=smssave

Data Yes

Subscriber related data.  Phone, Country, and Sender are always required, and additional fields are optional.

data=[fields]

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk