Developers Index |
TextMarks V2 APIThe TextMarks V2 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 V2 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 KeyTo 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. Making API Calls (API Function Reference)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. Each API method even has a test widget so you can try it out right on the reference web page. Client Libraries and Sample CodeReady to get down to business? Check out our PHP Client Library and Python 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 or Python, 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 SummaryTo call functions of the API, you simply make a HTTP request with parameters passed either as GET or POST, similarly to how a form gets posted. 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. The response is typically JSON and easy to parse in any language. If you are stuck or getting confusing errors, feel free to contact us for help. RestrictionsAPI access is granted on request on an individual basis for limited use. Default system throttling limits API use to approximately 1 request per second. If you hit any limits, you can ask us for an extension on your API Key. Your API Key should be kept private and may be revoked if you violate our Terms of Service. API Server URLAPI 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. "GroupLeader" and "broadcast_message"): http://dev1.api2.textmarks.com/PACKAGENAME/FUNCTIONNAME/ Parameters to the function should be passed by GET (on the URL) or POST params. All methods accept POST params, but methods that modify data or execute actions typically require it. API ResponsesThe response from most API methods will be a HTTP 200 OK response containing an application/json (MIME type) response with a single object (key/value dictionary) containing head and body sub-objects. In head.rescode you will find the result code, which should be zero (0) to indicate success. If this result code is non-zero, an error occurred and will be described in head.resmsg. This is an example of a JSON response from the API (response from method Anybody.keyword_status):
{
"head": {
"rescode": 0,
"resmsg": "OK",
"version": "2.57a-BETA"
},
"body": {
"available": true,
"status": "available",
"keyword": "MYKEYWORD"
}
}
Let's see some functions already!Our API Reference contains detailed descriptions of each function call available. You can even try them out right on their reference web pages. |