Follow

Create SMS Message

The Create SMS Message command allows you to define message content to send via SMS.  The command requires the following arguments: Command, Realm, Password, Message Name, and Message Text.

api_web?r=myrealm&p=mypass&c=createsmsmessage&messagename=My+SMS+Message&messagetext=SMS+message+text

The command is ‘createsmsmessage', the realm is ‘myrealm’ and the password is ‘mypass’.  The message named ‘My SMS Message’ contains the message ‘SMS Message Text’ .

Example

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

api_web?r=myrealm&p=mypass&c=createsmsmessage&messagename=Welcome+Back&messagetext=Welcome+back+to+our+list!&label=welcome

Successful results return, where ‘6’ is the ID of the new message:

SUCCESS: 6

Results

The Create SMS Message command outputs either a SUCCESS or FAILURE message. 

Success

The command success message returns the SUCCESS message followed by the new message ID.  The result format is: 

SUCCESS: [message_id]

Failure

The command will fail for several reasons, including if a message with the same name already exists, name is missing, label does not exist, or the message is too long.  The result format is:

FAILURE: [Reason]

Errors include:

FAILURE: Error label name not found (The message will still be created, but with no label) 
FAILURE: Message text cannot be more than 160 characters long
FAILURE: Message text cannot be empty.

Arguments

The command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=createlistdefinition
c=createlistdefinition

Realm

Yes

Name of the realm to run the command.  This is required, and the command will fail if the realm and password do not match.

realm=[realm_name]
r=[realm_name]

Password

Yes

Authentication code for API access.  This is required, and the command will fail if the realm and password do not match.

pwd=[password]
p=[password]

Message Name

Yes

Name of the SMS message to create. To include spaces, use + or %20 to avoid possible issues with spaces in a URL.

messagename=[list_name]

Message Text

 Yes

The message to send, limited to 160 characters. To include spaces, use + or %20 to avoid possible issues with spaces in a URL. 

messagetext=[text]

Labels   

Comma separated list of identifiers of custom keywords to identify and report items that have a similar use or purpose.  The label(s) must be defined for the Account and associated to the SMS product in order to save.

label=[label_id(s)]

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

Comments

Powered by Zendesk