Welcome to TextMarks Lite - free ad-supported text messaging platform. Visit our main site for ad-free service. Free trial available!

Mobilize your world
Home
Tour
Buzz
Developers Center
Help

Messaging.sendText

Send a text message to an individual subscriber.

 

Overview

Send a single text message to a subscriber of one of your TextMarks. See Sending Text Messages for more information on subscribers. Also places TextMark in recipients' context to allow short contextual responses.

Parameters

Parameter Description
apik API Key
auth_user TextMarks user name to authenticate with.
auth_pass TextMarks user password to authenticate with.
tm TextMark the message is related to. Must belong to auth_user.
msg Text message (up to 120 basic ASCII characters).
to Whom to send message to. Phone# or TextMarks user name. User must be subscribed to tm.

Response

Result code (TMResponse.TMHead.ResCode) of 0 indicates success. Errors (non-zero result) will be described in TMResponse.TMHead.ResMsg.

Subscribers

The addressed user (to) must be a subscriber of your TextMark (tm). See Sending Text Messages for more information on subscribers.

If you attempt to address a message to a user who is not an active subscriber of your TextMark, you will get an error indicating so. You should remove the user from your database (as they most likely recently unsubscribed). Note that you may keep track of subscriptions and unsubscriptions automatically using a Sub/Unsub Callback.

Asking Users Questions

Sending a message to a user puts your TextMark in that user's context. Short contextual responses (e.g. 1, 2, B, CA, etc.) will be automatically directed to your keyword. You may therefore ask users questions via alerts and receive answers in your TextMark processing script. Recommended language to ask for response is: "Rply 1 to (option1), 2 to (option2), ..." See Receiving Text Messages for details.

Examples

Example 1: HTTP Request (whitespace added for clarity):

http://dev1.api.textmarks.com/Messaging/sendText/?
&apik=MyAPIKey_12345
&auth_user=mytmuser
&auth_pass=mytmpass
&tm=MYKEYWORD
&msg=This+is+a+test+message
&to=4155551212

Example 1: XML Response:

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