Follow

Send Message to Sender Code

The Send SMS Message to Sender Code command allows you to send an SMS Message to all Subscribers assigned to a Sender Code or Group. The command requires the following arguments: Command, Realm, Password, Sender Code, Message Name, and SMS Campaign Name.

api_web?r=myrealm&p=mypass&c=smssendmessagetosendercode&sender_code=120162701555&message_name=Welcome&name=WelcomeDaily

The command is ‘smssendmessagetosendercode', the realm is ‘myrealm’ and the password is ‘mypass’.  The Welcome message content will be sent to all Subscribers in associated to the sender code '120162701555'.

Example

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

api_web?r=myrealm&p=mypass&c=smssendmessagetosendercode&sender_code=120162701555&message_name=Alert&name=201802Alert&group_name=Alerts

Successful results return:

SUCCESS: Sending message to subscriber was successful

Results

The Send SMS Message to Sender Code command outputs either a SUCCESS or FAILURE message. 

Success

The command success message returns the SUCCESS message.  The result format is:

SUCCESS: Sending message to subscriber was successful

Failure

The command will fail if if the message is not found or an argument is invalid.  The result format is:

FAILURE: [Reason]  

Arguments

The command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=smssendmessagetosendercode

c=smssendmessagetosendercode

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]

Sender Code

Yes 

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.

sender_code=[sender_code]

Message Name

Yes

The name of the pre-defined Message.

message_name=[string]

SMS Campaign Name

Yes

The name of the Campaign to associate for reporting.

name=[string]

SMS Group Name

 

The name of the subset of Subscribers in the Sender Code to target.

group_name=[string]

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

Comments

Powered by Zendesk