Send group text messages - Manage lists - Broadcast bulk SMS - SMS API - TextMarks is your easy shared short code provider & gateway! Try our free trial.

What do you want the world to know?
Home
Tour
Buzz
Pricing
Developers Center
Help

WARNING: DEPRECATED

The XML-RPC API described here will remain functional but is no longer supported by TextMarks.
Click here to access the new V2 API

XML-RPC API

The TextMarks XML-RPC API allows you to programmatically access TextMarks data and functionality. This enables your web or enterprise applications to utilize the TextMarks platform without going through a mobile phone or the TextMarks website, but directly from code. Some degree of web programming knowledge is required to understand and use this API.

 

Who is this for?

This XML-RPC HTTP API is designed for advanced developers who wish to automate and integrate TextMarks functionality deeply into their applications. There are a variety of easier (less technical) ways to send and receive text messages from and to your apps without using this API.

 

Getting Started

Register for an API Key

To send text message alerts using the TextMarks platform, you'll need to first register for an API key. This allows you to authenticate to the TextMarks API servers. You will typically get an API key within 1 or 2 business days.

Making API Calls

Review the API overview below to understand how the API works. Once you are familiar with the concepts, explore our API Reference for information on specific calls available.

Client Libraries and Sample Code

Ready to get down to business? Check out our PHP Client Library including sample code to get you started. You are welcome to integrate directly with our APIs from any language, but if you're using PHP, this is a great place to start.

Want More? Need Help?

We will be rolling out more API functionality over the coming months. If there are specific functions you'd like exposed sooner rather than later, or if you're stuck and need some help, please feel free to contact us and let us know your needs.

 

API Overview

Technical Summary

The API access is REST-like. Make a HTTP request with parameters passed either as GET or POST. You can use an HTML form to test it, or even type the URL directly into your browser. In production, you may use curl or any other number of methods for accessing a URL programmatically. If you are stuck or getting confusing errors, feel free to contact us for help.

Restrictions

API access is granted on request on an individual basis for limited use. Do not make more than one request per second to the API. Your API Key should be kept private and may be revoked if you violate our Terms of Service.

API Server URL

API calls should be made to the following URL, where PACKAGENAME and FUNCTIONNAME are the respective package and function name of the API call (e.g. "Messaging" and "postAlert"):

http://dev1.api.textmarks.com/PACKAGENAME/FUNCTIONNAME/

Parameters to the function should be passed by GET (on the URL) or POST params.

API Responses

The response from most API methods will be a HTTP 200 OK response containing a text/xml response with a <TMResponse> root node. In TMResponse.TMHead.ResCode you will find the result code, which should be zero (0) to indicate success. If this result code is non-zero, an error occured and will be described in TMResponse.TMHead.ResMsg. As mentioned above, you may wish to test API calls by typing in the URL in your browser and observing the XML response directly.

The TMResponse.TMHead.RefNum additionally contains a reference to the API call made that you may wish to log. If you contact TextMarks support, this value will be necessary to track down the specific call in question.

This is an example of an XML response from the API:

<?xml version="1.0" ?>
<TMResponse v="1.0">
	<TMHead>
		<APIVersion>2.33a-BETA</APIVersion>
		<ResCode>0</ResCode>
		<ResMsg>Success</ResMsg>
		<APIKey>MyAPIKey_12345</APIKey>
		<RefNum>R1001-8904321863</RefNum>
	</TMHead>
	<TMBody>
		<TextMark key="123456" keyword="MYKEYWORD">
			<AlertPosted />
		</TextMark>
	</TMBody>
</TMResponse>
			
 
Service available on the following wireless networks: AT&T, Verizon Wireless, Sprint, T-Mobile, Virgin, Cricket, Alltel.
v2.64e-BETA  -  Copyright © 2008 TextMarks Inc. All rights reserved.