Messaging.postAlertPost an alert to a TextMark such that all subscribers receive a text message. OverviewPosts an alert to a TextMark such that all subscribers receive a text message. See Sending Text Messages for more information on subscribers. Additionally records an alert that will be visible on the TextMark's public web page (if such option is enabled for the TextMark). Also places TextMark in recipients' context to allow short contextual responses. Parameters
ResponseResult code (TMResponse.TMHead.ResCode) of 0 indicates success. Errors (non-zero result) will be described in TMResponse.TMHead.ResMsg. Asking Users QuestionsSending an alert 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. ExamplesExample 1: HTTP Request (whitespace added for clarity):
http://dev1.api.textmarks.com/Messaging/postAlert/?
&apik=MyAPIKey_12345 &auth_user=mytmuser &auth_pass=mytmpass &tm=MYKEYWORD &msg=This+is+an+alert+test Example 1: XML Response: <?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> |