Documentation

For developers who are looking to integrate SMSTech with an existing system, our comprehensive documentation provides all the information required to get you up and running.

Keywords

edit-keyword

Edit an existing keyword.

PARAMETER DESCRIPTION REQUIRED
keyword The first word of a text message YES
number The dedicated virtual number that the keyword belongs to YES
reference Your own reference (up to 100 characters) NO
list_id ID of a list to add respondents to, list ID’s can be found in the title of a list or in the list page URL NO
welcome_message SMS message to send to new members NO
members_message SMS message to existing members NO
activate Whether to make the keyword active immediately.

Possible values:
true – activate immediately (default)
false – create the keyword but do not activate
NO
forward_url Forward messages to a URL NO
forward_email Forward messages to a set of email addresses NO
forward_sms Forward messages to a set of msisdns NO

Example

curl https://api.transmitsms.com/edit-keyword.json \
-u 2e24c1cbdd987221e165d543f34b84bf:secret \
-d 'keyword=NEWS' \
-d 'reference=Gym news' \
-d 'number=61491570156' \
-d 'status=active' \
-d 'billing_date=2013-05-21' \
-d list_id=0 \
-d "welcome_message=Welcome to Mike's gym news" \
-d 'members_message=Thanks for your continued support' \
-d 'forward_url=http://example.com/gym-promo' \
-d 'forward_email=news@http://example.com,mike@http://example.com' \
-d 'forward_sms=61491570157,61491570158'

JSON RESPONSE

{
keyword: "NEWS",
reference: "Gym news",
number: "61491570156",
status: "active",
billing_date: "2013-05-21",
list_id: 0,
welcome_message: "Welcome to Mike's gym news",
members_message: "Thanks for your continued support",
forward_url: "http://example.com/gym-promo",
forward_email: "news@example.com,mike@example.com",
forward_sms: "61491570157,61491570158"
}

XML RESPONSE

<?xmlversion="1.0"encoding="UTF-8"?> <response> <keyword>NEWS</keyword> <reference>Gym news</reference> <number>61491570156</number> <status>active</status> <billing_date>2013-05-21</billing_date> <list_id>0</list_id> <welcome_message>Welcome to Mike&amp;#39;s gym news</welcome_message> <members_message>Thanks for your continued support</members_message> <forward_url>http://example.com/gym-promo</forward_url> <forward_email>news@example.com,mike@example.com</forward_email> <forward_sms>61491570157,61491570158</forward_sms> </response>{ keyword: "NEWS", reference: "Gym news", number: "61491570156", status: "active", billing_date: "2013-05-21", list_id: 0, welcome_message: "Welcome to Mike's gym news", members_message: "Thanks for your continued support", forward_url: "http://example.com/gym-promo", forward_email: "news@example.com,mike@example.com", forward_sms: "61491570157,61491570158" }

PHP Example

<?php include'../../APIClient2.php'; $api=new transmitsmsAPI("API_KEY",'API_SECRET'); //pause a keyword //$result=$api->editKeyword('KEYWORD', '6140000000', null, null, null, null, 'paused'); //change welcome message $result=$api->editKeyword('KEYWORD','6140000000',null,null,'new welcome message'); if($result->error->code=='SUCCESS') { echo"Keyword saved"; } else { echo"Error: {$result->error->description}"; }

add-keyword

Add a keyword to an existing virtual number.

PARAMETER DESCRIPTION REQUIRED
keyword The first word of a text message YES
number The dedicated virtual number that the keyword belongs to YES
reference Your own reference (up to 100 characters) NO
list_id ID of a list to add respondents to, list ID’s can be found in the title of a list or in the list page URL NO
welcome_message SMS message to send to new members NO
members_message SMS message to existing members NO
activate Whether to make the keyword active immediately.

Possible values:
true – activate immediately (default)
false – create the keyword but do not activate
NO
forward_url Forward messages to a URL NO
forward_email Forward messages to a set of email addresses NO
forward_sms Forward messages to a set of msisdns NO

Example

curl https://api.transmitsms.com/add-keyword.json \
-u 2e24c1cbdd987221e165d543f34b84bf:secret \
-d 'keyword=NEWS' \
-d 'reference=Gym news' \
-d 'number=61491570156' \
-d 'status=active' \
-d 'billing_date=2013-05-21' \
-d list_id=0 \
-d "welcome_message=Welcome to Mike's gym news" \
-d 'members_message=Thanks for your continued support' \
-d 'forward_url=http://example.com/gym-promo' \
-d 'forward_email=news@http://example.com,mike@http://example.com' \
-d 'forward_sms=61491570157,61491570158

JSON RESPONSE

{
keyword: "NEWS",
reference: "Gym news",
number: "61491570156",
status: "active",
billing_date: "2013-05-21",
list_id: 0,
welcome_message: "Welcome to Mike's gym news",
members_message: "Thanks for your continued support",
forward_url: "http://example.com/gym-promo",
forward_email: "news@example.com,mike@example.com",
forward_sms: "61491570157,61491570158"
}

XML RESPONSE

<?xmlversion="1.0"encoding="UTF-8"?> <response> <keyword>NEWS</keyword> <reference>Gym news</reference> <number>61491570156</number> <status>active</status> <billing_date>2013-05-21</billing_date> <list_id>0</list_id> <welcome_message>Welcome to Mike&amp;#39;s gym news</welcome_message> <members_message>Thanks for your continued support</members_message> <forward_url>http://example.com/gym-promo</forward_url> <forward_email>news@example.com,mike@example.com</forward_email> <forward_sms>61491570157,61491570158</forward_sms> </response>{ keyword: "NEWS", reference: "Gym news", number: "61491570156", status: "active", billing_date: "2013-05-21", list_id: 0, welcome_message: "Welcome to Mike's gym news", members_message: "Thanks for your continued support", forward_url: "http://example.com/gym-promo", forward_email: "news@example.com,mike@example.com", forward_sms: "61491570157,61491570158" }

PHP Example

<?php include'../../APIClient2.php'; $api=new transmitsmsAPI("API_KEY",'API_SECRET'); $result=$api->addKeyword('KEYWORD','6140000000','',1234, 'hi there new member','hi, you are already registered'); if($result->error->code=='SUCCESS') { echo"Keyword added"; } else { echo"Error: {$result->error->description}"; }

get-keyword

Get a list of existing keywords.

PARAMETER DESCRIPTION REQUIRED
number Filter the list by virtual number NO
page Page number, for pagination NO
max Maximum results returned per page NO

Example

get keywords on a particular number

curl https://api.transmitsms.com/get-keywords.json \
-u 2e24c1cbdd987221e165d543f34b84bf:secret \
-d number=61491570157

JSON RESPONSE

{
keywords_total: 74,
keywords: [
{
keyword: "NEWS",
reference: "Gym news",
number: "61491570156",
status: "active",
billing_date: "2013-05-21",
list_id: 0,
welcome_message: "Welcome to Mike's gym news",
members_message: "Thanks for your continued support",
forward_url: "http://example.com/gym-promo",
forward_email: "news@example.com,mike@example.com",
forward_sms: "61491570157,61491570158"
}
]
,
page: {
count: 1,
number: 1
}
}

XML RESPONSE

<?xmlversion="1.0"encoding="UTF-8"?> <response> <keywords_total>74</keywords_total> <keywords> <keyword>NEWS</keyword> <reference>Gym news</reference> <number>61491570156</number> <status>active</status> <billing_date>2013-05-21</billing_date> <list_id>0</list_id> <welcome_message>Welcome to Mike&amp;#39;s gym news</welcome_message> <members_message>Thanks for your continued support</members_message> <forward_url>http://example.com/gym-promo</forward_url> <forward_email>news@example.com,mike@example.com</forward_email> <forward_sms>61491570157,61491570158</forward_sms> </keywords> <page> <count>1</count> <number>1</number> </page> </response>

PHP Example

<?php include'../../APIClient2.php'; $api=new transmitsmsAPI("API_KEY",'API_SECRET'); $offset=0; $limit=10; $result=$api->getKeywords('6140000000',$offset,$limit); if($result->error->code=='SUCCESS') { echo"There are {$result->keywords_total} keywords, showing page {$result->page->number} of {$result->page->count} <hr>"; foreach($result->keywordsas$keyword){ echo"{$keyword->keyword} - {$keyword->status} <br>"; } } else { echo"Error: {$result->error->description}"; }