NAV

Keyword(Last Updated : 01/11/2017)

The following section provides the parameters and template for making requests to manage mobile keywords. Example response from the system is also provided.

Methods

Create Keyword /http/v2/createkeyword
Check Keyword /http/v2/checkkeyword
Update Keyword /http/v2/updatekeyword
Delete Keyword /http/v2/deletekeyword

Create Keyword

This function creates a new mobile keyword. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/createkeyword.

Resource Information

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

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
keyword * The keyword to create. Check availability before creating.

Example value: Join
list_names * Enter the names of the lists you want to associate the keyword with. Separate multiple list names with commas: name1,name2,name3…

Example value: listname001, listname002
user_response * TRUE or FALSE. This enables users to add an optional message or response after the keyword. This message will be sent to your Inbox.
keyword_message * This is the automated message sent to someone who texts in the keyword. The message body must be in plain text. 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.
send_alternate TRUE or FALSE. If send_auto_response is not '1’, send an alternate auto response after the first time. This is sent only if the subscriber already exists in your contact database.

Default value: FALSE
alternate_message Enter the body content of the alternate message that will be sent if send_alternate is TRUE. The message body must be in plain text. 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.
change_org_name By setting this parameter, you can temporarily change your organization name in the keyword_message and alternate_message responses. But you can use only registered organization names. You can register organization names via the website (Sign in > Account > Organization Profile).

The default structure of a mobile-text message is as follows:
Organization Name: your message content Txt STOP to OptOut
send_auto_response Configure when the keyword auto response message should be sent.
Value Description
1 Only once per mobile number
2 (Default) Every time
3 Only once every minute
4 Only once every hour
5 Only once every day
6 Only once every week
7 Only once every month
8 Only once every year
use_notify TRUE or FALSE. When someone texts in this keyword, send a notification.

Default value: FALSE
notify_email Email addresses to where a notification will be sent when someone signs up via this keyword.

Example value: email@domain.com
notify_mobile Mobile phone numbers to where a notification will be sent when someone signs up via this keyword.

Example value: 7776542222
notify_type1 TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me when someone texts in this keyword without an optional message.

Default value: FALSE
notify_type2 TRUE or FALSE. If user_response is TRUE, use_notify is TRUE, and notify_type1 is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database.

Default value: FALSE
notify_type3 TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me when someone texts in this keyword with an optional message.

Default value: FALSE
notify_type4 TRUE or FALSE. If user_response is TRUE, use_notify is TRUE, and notify_type3 is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database.

Default value: FALSE
notify_type5 TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database.

Default value: FALSE
optin_type The opt-in types for keyword sign-up. You can change the default value at Sign In > Account > General Default Setting. The default opt-in type is used if this parameter is not specified.
Value Description
1 Single Opt-In: The subscriber only needs to text in a keyword to complete their sign-up.
2 Double Opt-In: After a subscriber texts in a keyword, they will be asked to reply yes or no to verify their sign-up. If they reply yes, their sign-up is complete.

Request Example

GET Method

http://api.trumpia.com/http/v2/createkeyword?&apikey=123456789abc1011&keyword=TestKeyword&list_names=TestList1,TestList2&user_response=TRUE&keyword_message=test%20message&send_alternate=TRUE&alternate_message=test%20message&change_org_name=orgname&send_auto_response=2&use_notify=TRUE&notify_email=abc@abc.com&notify_mobile=1234567890&notify_type1=TRUE&notify_type2=TRUE&notify_type3=TRUE&notify_type4=TRUE

POST Method

<form method="post" action="http://api.trumpia.com/http/v2/createkeyword"> <input type="text" name="apikey" value="123456789abc1011"> <input type="text" name="keyword" value="TestKeyword"> <input type="text" name="list_names" value="TestList1,TestList2"> <input type="text" name="user_response" value="TRUE"> <input type="text" name="keyword_message" value="test message"> <input type="text" name="send_alternate" value="TRUE"> <input type="text" name="alternate_message" value="test message"> <input type="text" name="change_org_name" value="orgname"> <input type="text" name="send_auto_response" value="2"> <input type="text" name="use_notify" value="TRUE"> <input type="text" name="notify_email" value="abc@abc.com"> <input type="text" name="notify_mobile" value="1234567890"> <input type="text" name="notify_type1" value="TRUE"> <input type="text" name="notify_type2" value="TRUE"> <input type="text" name="notify_type3" value="TRUE"> <input type="text" name="notify_type4" value="TRUE"> <input type="text" name="notify_type5" value=""> </form>

Response Example

{ "requestID" : "1234561234567asdf123" }

Check Keyword

This function returns the availability of a keyword. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/checkkeyword.

Resource Information

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

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
keyword * The keyword you want to check the availability of.

Example value: MobileKeyword

Request Example

GET Method

http://api.trumpia.com/http/v2/checkkeyword?apikey=123456789abc1011&keyword=TestKeyword

POST Method

<form method="post" action="http://api.trumpia.com/http/v2/checkkeyword"> <input type="text" name="apikey" value="123456789abc1011"> <input type="text" name="keyword" value="TestKeyword"> </form>

Response Example

Keyword is available.

{ "statuscode" : "1", "message" : "Query Success", "isavailable" : "AVAILABLE" }

Keyword is unavailable.

{ "statuscode" : "1", "message" : "Query Success", "isavailable" : "UNAVAILABLE" }

Update Keyword

This function allows you to update an existing keyword. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/updatekeyword.

Resource Information

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

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
keyword * The keyword you wish to update.

Example value: Join
list_names Enter the names of the lists you want to associate the keyword with. Separate multiple list names with commas: name1,name2,name3…

Example values: listname001, listname002
user_response TRUE or FALSE. This enables users to add an optional message or response after the keyword. This message will be sent to your Inbox.
keyword_message This is the automated message sent to someone who texts in the keyword. The message body must be in plain text. 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.
send_alternate TRUE or FALSE. If send_auto_response is not '1’, send an alternate auto response after the first time. This is sent only if the subscriber already exists in your contact database.

Default value: FALSE
alternate_message Enter the body content of the alternate message that will be sent if send_alternate is TRUE. The message body must be in plain text. 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.
change_org_name By setting this parameter, you can temporarily change your organization name in the keyword_message and alternate_message responses. But you can use only registered organization names. You can register organization names via the website (Sign in > Account > Organization Profile).

The default structure of a mobile-text message is as follows:
Organization Name: your message content Txt STOP to OptOut
send_auto_response Configure when the keyword auto response message should be sent.
Value Description
1 Only once per mobile number
2 (Default) Every time
3 Only once every minute
4 Only once every hour
5 Only once every day
6 Only once every week
7 Only once every month
8 Only once every year
use_notify TRUE or FALSE. When someone texts in this keyword, send a notification.

Default value: FALSE
notify_email Email addresses to where a notification will be sent when someone signs up via this keyword.

Example value: email@domain.com
notify_mobile Mobile phone numbers to where a notification will be sent when someone signs up via this keyword.

Example value: 7776542222
notify_type1 TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me when someone texts in this keyword without an optional message.

Default value: FALSE
notify_type2 TRUE or FALSE. If user_response is TRUE, use_notify is TRUE, and notify_type1 is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database.

Default value: FALSE
notify_type3 TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me when someone texts in this keyword with an optional message.

Default value: FALSE
notify_type4 TRUE or FALSE. If user_response is TRUE, use_notify is TRUE, and notify_type3 is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database.

Default value: FALSE
notify_type5 TRUE or FALSE. If user_response is TRUE and use_notify is TRUE, notify me only when the keyword subscriber's mobile number is new to my contact database.

Default value: FALSE
optin_type The opt-in types for keyword sign-up. You can change the default value at Sign In > Account > General Default Setting. The default opt-in type is used if this parameter is not specified.
Value Description
1 Single Opt-In: The subscriber only needs to text in a keyword to complete their sign-up.
2 Double Opt-In: After a subscriber texts in a keyword, they will be asked to reply yes or no to verify their sign-up. If they reply yes, their sign-up is complete.

Request Example

GET Method

http://api.trumpia.com/http/v2/updatekeyword?&apikey=123456789abc1011&keyword=TestKeyword&list_names=TestList1,TestList3&user_response=TRUE&keyword_message=test%20message&send_alternate=TRUE&alternate_message=test%20message&change_org_name=orgname&send_auto_response=2&use_notify=TRUE&notify_email=abc@abc.com&notify_mobile=1234567890&notify_type1=TRUE&notify_type2=TRUE&notify_type3=TRUE&notify_type4=TRUE

POST Method

<form method="post" action="http://api.trumpia.com/http/v2/updatekeyword"> <input type="text" name="apikey" value="123456789abc1011"> <input type="text" name="keyword" value="TestKeyword"> <input type="text" name="list_names" value="TestList1,TestList3"> <input type="text" name="user_response" value="TRUE"> <input type="text" name="keyword_message" value="test message"> <input type="text" name="send_alternate" value="TRUE"> <input type="text" name="alternate_message" value="test message"> <input type="text" name="change_org_name" value="orgname"> <input type="text" name="send_auto_response" value="2"> <input type="text" name="use_notify" value="TRUE"> <input type="text" name="notify_email" value="abc@abc.com"> <input type="text" name="notify_mobile" value="1234567890"> <input type="text" name="notify_type1" value="TRUE"> <input type="text" name="notify_type2" value="TRUE"> <input type="text" name="notify_type3" value="TRUE"> <input type="text" name="notify_type4" value="TRUE"> <input type="text" name="notify_type5" value=""> </form>

Response Example

{ "requestID" : "1234561234567asdf123" }

Delete Keyword

This function deletes a mobile keyword. By doing so, that keyword is available for use by other users. At the beginning of your request, you must specify the URL of the resource: http://api.trumpia.com/http/v2/deletekeyword.

Resource Information

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

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
keyword * The keyword you wish to delete.

Example value: MobileKeyword

Request Example

GET Method

http://api.trumpia.com/http/v2/deletekeyword?apikey=123456789abc1011&keyword=TestKeyword

POST Method

<form method="post" action="http://api.trumpia.com/http/v2/deletekeyword"> <input type="text" name="apikey" value="123456789abc1011"> <input type="text" name="keyword" value="TestKeyword"> </form>

Response Example

{ "requestID" : "1234561234567asdf123" }