NAV

Direct SMS(Last Updated : 03/08/2017)

Send a message via mobile-text message (SMS).

Methods

Send Verification SMS /http/v2/sendverificationsms

Send Verification SMS

Resource Information

Response Formats JSON
Allowed Methods GET/POST
URL http://api.trumpia.com/http/v2/sendverificationsms

Body Parameters

* required parameters
Parameter Description
apikey * The API key is located in API Settings within the system. An API certification must be approved before a key is generated.

Example value: 123456789abc1011
country_code Mobile phone number’s country code. If left blank then it will be assumed to be a U.S. number. If the country_code value is 0, the mobile_number value will be used to infer the country code.

Default value: 1
mobile_number * For U.S., the 10-digit number without the leading 0 or 1. For some international numbers, the leading 0 or 1 also must be omitted. No symbols or spaces.

Example value: 7774443210

If the country_code value is 0, the mobile_number value will be used to infer the country code. To ensure that the system accepts the mobile number you enter, the mobile number needs to be formatted in the E.164 standard. This means that a “+” needs to be in front of the full mobile number of the recipient. If the “+” is not listed before the number, the system will reject your request.

Example value: +17774443210
message * The message you wish to send. Supported Character Set.

Character limits vary per country. The maximum length for a message is 160 characters as default. For instance, SMS messages for Canadian accounts are limited to 140 characters. Although a 160 character message can be sent in full to US mobile numbers, Canadian mobile devices will only receive the first 140 characters.

Also, please note that the SMS header and footer are counted as part of the message and should be taken into consideration when composing a message.
first_name First name of the contact. Max 30 characters. Must contain only alphanumeric characters.

Example value: John
last_name Last name of the contact. Max 30 characters. Must contain only alphanumeric characters.

Example value: Doe
user_name Message Provider.
Max 20 characters. Must contain only alphanumeric characters.

Request Example

GET Method

http://api.trumpia.com/http/v2/sendverificationsms?apikey=123456789abc1011&country_code=1&mobile_number=4564564560&message=test%20message&first_name=John&last_name=Doe&user_name=username

POST Method

<form method="post" action="http://api.trumpia.com/sendverificationsms"> <input type="text" name="apikey" value="123456789abc1011"> <input type="text" name="country_code" value="1"> <input type="text" name="mobile_number" value="4564564560"> <input type="text" name="message" value="test message"> <input type="text" name="first_name" value="John"> <input type="text" name="last_name" value="Doe"> <input type="text" name="user_name" value="username"> </form>

GET Method (Country code as part of the mobile number)

http://api.trumpia.com/http/v2/sendverificationsms?apikey=123456789abc1011&country_code=0&mobile_number=%2B14564564560&message=test%20message&first_name=John&last_name=Doe&user_name=username

POST Method (Country code as part of the mobile number)

<form method="post" action="http://api.trumpia.com/sendverificationsms"> <input type="text" name="apikey" value="123456789abc1011"> <input type="text" name="country_code" value="0"> <input type="text" name="mobile_number" value="+14564564560"> <input type="text" name="message" value="test message"> <input type="text" name="first_name" value="John"> <input type="text" name="last_name" value="Doe"> <input type="text" name="user_name" value="username"> </form>

Response Example

{ "requestID" : "1234561234567asdf123" }